Project

General

Profile

Actions

User story #10568

closed

Create a hook for pre and post node deletion event

Added by François ARMAND over 7 years ago. Updated over 2 years ago.

Status:
Released
Priority:
N/A
Category:
System integration
Target version:
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

Subtasks 1 (0 open1 closed)

Bug #11307: "node-post-deletion" and "node-pre-deletion" readme main title are incorrectReleasedAlexis MoussetActions

Related issues 2 (0 open2 closed)

Related to Rudder - User story #8353: Implement notifications for different server-side actions and events (hooks)ReleasedJonathan CLARKE2016-12-22Actions
Related to Rudder - User story #10724: adding a Hook after node validationRejectedActions
Actions

Also available in: Atom PDF