Project

General

Profile

Bug #11213

Updated by François ARMAND over 6 years ago

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:  

 <pre> 
 # - 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 
 </pre> 

 


 That means migrating: 

 <pre> 
 - 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 
 </pre> 
 

Back