-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #16017: nodeslist.json can take up to 5 minutes to be updated a…
…fter accepting a node
- Loading branch information
Showing
1 changed file
with
15 additions
and
0 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
...ore/src/main/resources/hooks.d/policy-generation-finished/40-nodelist-relay-configuration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/sh | ||
|
||
# Hooks parameter are passed by environment variable: | ||
# | ||
# - RUDDER_GENERATION_DATETIME : generation datetime: ISO-8601 YYYY-MM-ddTHH:mm:ss.sssZ date/time that identify that policy generation. | ||
# - RUDDER_END_GENERATION_DATETIME : generation end time: ISO-8601 YYYY-MM-ddTHH:mm:ss.sssZ date/time when the generation ended (minus these hooks) | ||
# - RUDDER_NODE_IDS_PATH : path to a sourcable file with variable RUDDER_NODE_IDS containing a bash array of node id updated | ||
# during the process, or the empty array if no nodes were updated. | ||
# - RUDDER_NUMBER_NODES_UPDATED : integer >= 0; number of nodes updated (could be found by counting $RUDDER_NODE_IDS) | ||
# - RUDDER_ROOT_POLICY_SERVER_UPDATED: 0 if root was updated, anything else if not | ||
|
||
# Copy nodelist.json to its final destination and reload relayd | ||
|
||
cp /var/rudder/cfengine-community/inputs/distributePolicy/1.0/nodeslist.json /var/rudder/lib/relay/ | ||
/opt/rudder/bin/rudder relay reload -p |