Actions
User story #10568
closedCreate a hook for pre and post node deletion event
Pull Request:
UX impact:
Suggestion strength:
Want - This would make my life a lot easier but I can manage without
User visibility:
Operational - other Techniques | Technique editor | Rudder settings
Effort required:
Medium
Name check:
Fix check:
Regression:
Description
We want to add a hook for pre and post node deletion event.
A first idea is to have the following parameters to each hook:
node-delete-pre:
Required information via Environment (in addition to any possible other default information – so it might be redundant):
- UUID of Node - RUDDER_NODEID
- Role(s) of Node (none / policy server / etc) – RUDDER_NODE_ROLES (?)
- Full patch of its policy root-directory (since it might be chained through different relays) – for cleanup – RUDDER_POLICIES_DIRECTORY
- Policy server it belongs to. – RUDDER_NODE_POLICY_SERVER (?)
Return code in addition to the default ones:
- Cancel the removal = 100
- it would mean successful executed of the hook (without errors), but this node should not be removed (like protecting some nodes on the lowest level)
- it should be returned differently than a hook-failure to the UI/API
node-delete-post:
Required information via Environment (in addition to any possible other default information – so it might be redundant):
- UUID of Node - RUDDER_NODEID
- Role(s) of Node (none / policy server / etc) – RUDDER_NODE_ROLES (?)
- Full patch of its policy root-directory (since it might be chained through different relays) – for cleanup – RUDDER_POLICIES_DIRECTORY
- Policy server it belongs to. – RUDDER_NODE_POLICY_SERVER (?)
Possible exit code strategies:
- Error in hook + warning in hook:
- same behavior as an error would trigger in other hooks
Actions