Project

General

Profile

Actions

Bug #11213

closed

Non normalize hooks env var names for node info

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

Status:
Released
Priority:
N/A
Category:
System integration
Target version:
Severity:
Minor - inconvenience | misleading | easy workaround
UX impact:
User visibility:
Operational - other Techniques | Technique editor | Rudder settings
Effort required:
Priority:
32
Name check:
Fix check:
Regression:

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
Actions #1

Updated by François ARMAND over 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)

Actions #2

Updated by François ARMAND over 7 years ago

  • Description updated (diff)
Actions #3

Updated by François ARMAND over 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
Actions #4

Updated by François ARMAND over 7 years ago

  • Status changed from Pending technical review to Pending release
Actions #6

Updated by Vincent MEMBRÉ over 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.

Actions

Also available in: Atom PDF