Project

General

Profile

Bug #11213

Non normalize hooks env var names for node info

Added by François ARMAND about 2 months ago. Updated about 1 month ago.

Status:
Released
Priority:
N/A
Category:
System integration
Target version:
Target version (plugin):
Severity:
Minor - inconvenience | misleading | easy workaround
User visibility:
Operational - other Techniques | Technique editor | Rudder settings
Effort required:
Priority:
32

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

Associated revisions

Revision c77b7f0e
Added by François ARMAND about 1 month ago

Fixes #11213: Non normalize hooks env var names for node info

Revision f2734c4f
Added by François ARMAND about 1 month ago

Fixes #11213: Non normalize hooks env var names for node info

History

#1 Updated by François ARMAND about 2 months 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)

#2 Updated by François ARMAND about 2 months ago

  • Description updated (diff)

#3 Updated by François ARMAND about 2 months 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

#4 Updated by François ARMAND about 1 month ago

  • Status changed from Pending technical review to Pending release

#6 Updated by Vincent MEMBRÉ about 1 month 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.

Also available in: Atom PDF