Bug #11213
closedNon normalize hooks env var names for node info
Description
This is awful.
We are using for the same info different names in different hooks: RUDDER_POLICIES_DIRECTORY_CURRENT, RUDDER_POLICIES_DIRECTORY and RUDDER_POLICIES_DIRECTORY_NEW, RUDDER_NEXT_POLICIES_DIRECTORY.
This must stop ASAP (error prone, maintenance nightmare, extremely surprising, etc).
In 4.1, support both but undocument the one that will be removed, in 4.2 and up stop supporting the redondant name.
Also, we need to provide a common set of var names, and node hostname must be on them.
So, to sum up, node related hooks must have at least:
# - RUDDER_NODE_ID: the nodeId # - RUDDER_NODE_HOSTNAME: the fully qualified hostname of the node # - RUDDER_NODE_POLICY_SERVER_ID: the node policy server id # - RUDDER_POLICIES_DIRECTORY_CURRENT: the full path of the base directory containing policies for that node # - RUDDER_POLICIES_DIRECTORY_NEW: the full path of the base directory containing next policies for that node (during a generation) # - RUDDER_POLICIES_DIRECTORY_ARCHIVE: the full path of the base directory containing previous policies for that node
That means migrating:
- RUDDER_NODEID => RUDDER_NODE_ID - RUDDER_NODE_POLICY_SERVER => RUDDER_NODE_POLICY_SERVER_ID - RUDDER_POLICIES_DIRECTORY => RUDDER_POLICIES_DIRECTORY_CURRENT - RUDDER_NEXT_POLICIES_DIRECTORY => RUDDER_POLICIES_DIRECTORY_NEW
Updated by François ARMAND about 7 years ago
- Description updated (diff)
That means migrating:
- RUDDER_NODEID => RUDDER_NODE_ID
- RUDDER_NODE_POLICY_SERVER => RUDDER_NODE_POLICY_SERVER_ID
- RUDDER_POLICIES_DIRECTORY => RUDDER_POLICIES_DIRECTORY_CURRENT
- RUDDER_NEXT_POLICIES_DIRECTORY => RUDDER_POLICIES_DIRECTORY_NEW
(main description updated)
Updated by François ARMAND about 7 years ago
- Status changed from In progress to Pending technical review
- Assignee changed from François ARMAND to Vincent MEMBRÉ
- Pull Request set to https://github.com/Normation/rudder/pull/1711
Updated by François ARMAND about 7 years ago
- Status changed from Pending technical review to Pending release
Applied in changeset rudder|c77b7f0e94e35b947c3dec51d87f4e1d70e2cc1a.
Updated by François ARMAND about 7 years ago
Applied in changeset rudder|f2734c4f66f443c8f3ed1ce495791349fbbb1522.
Updated by Vincent MEMBRÉ about 7 years ago
- Status changed from Pending release to Released
This bug has been fixed in Rudder 4.1.6 and 4.2.0~beta3 which were released today.
- 4.1.6: Announce Changelog
- 4.2.0~beta3: Announce Changelog
- Download: https://www.rudder-project.org/site/get-rudder/downloads/