Bug #11703
closedNode properties local override does not function as one would expect
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"
},
}
}