Bug #25978
Updated by François ARMAND 23 days ago
For historical reasons, the custom properties (inventory properties) are not saved in the same place than user properties in LDAP:
- custom properties are in saved in inventory branch,
- node properties are saved in node branch.
They are merged in node fact to present an unified view to users in node properties and API.
The problem happens when the LDAP storage is asked to retrieve a node without inventory attributes. In that case, it only fetches node branch entry, and so it doesn'd see custom properties.
EDIT: actually, we already get it for software update. But not for CustomProperties.
We have -two- three possibilities to change that:
- 1/ either save all properties in the same location. There isn't any technical reason to keep them seperated since node entry is created for pending nodes now.
- 2/ or compensate for the missing bit at node fact repo level, since that level know about all properties from bootstrap, and then can be smart about adding them back when storage lies. It can be made sound since either we have a save with inventory parts, and so we get them, or we only have a save without inv parts, and so we are sure custom properties are not changed, and we can just copy them from original node fact.
- 3/ EDIT: just add custom properties in the second retrieval.
3/ is the actual bug correction and we will do it in that issue.
1/ is much simpler and go toward more consistency for the long term. But I'm not sure about what it implies for the migration from current state to next state on existing Rudder, nor what if there is other externalities. So it will be done in an other ticket: #25979