Project

General

Profile

Actions

Bug #11703

closed

Node properties local override does not function as one would expect

Added by Nicolas CHARLES about 7 years ago. Updated almost 7 years ago.

Status:
Released
Priority:
N/A
Category:
System techniques
Target version:
Severity:
Critical - prevents main use of Rudder | no workaround | data loss | security
UX impact:
User visibility:
Operational - other Techniques | Technique editor | Rudder settings
Effort required:
Priority:
76
Name check:
Fix check:
Regression:

Description

Local override works more like a replacement than a merge, which makes it quite unexpected

If we have local node properties json file with:

{
"properties":{
"property_key1":"local node prop",
"property_key2":{
"more":"local node prop",
"and":"local node prop",
},
}
}

The agent then load node properties from /var/rudder/cfengine-community/inputs/properties.d/ and from /var/rudder/local/properties.d/, and merge them at the "properties"'s children level with local properties winning;

So if Rudder properties was:

{
"properties":{
"property_key0":"from rudder",
"property_key1":{
"key1":"from rudder",
"key2":"from rudder also"
},
"property_key2":{
"key1":"from rudder",
"key2":"from rudder also"
},
}
}

The results is:

{
"properties":{
"property_key0":"from rudder",
"property_key1":"local node prop",
"property_key2":{
"more":"local node prop",
"and":"local node prop"
},
}
}

but what we really expect is:

{
"properties":{
"property_key0":"from rudder",
"property_key1":"local node prop",
"property_key2":{
"key1":"from rudder",
"key2":"from rudder also",
"more":"local node prop",
"and":"local node prop"
},
}
}


Related issues 1 (0 open1 closed)

Related to Rudder - User story #11618: Node properties local overrideReleasedAlexis MoussetActions
Actions

Also available in: Atom PDF