Werk #23077 · Nov 30, 26
HW/SW Inventory: Central site kept an outdated inventory tree of a remote host
In a distributed setup, the central site syncs the inventory trees of a remote
site whenever an inventory tree on the remote site has been saved, and after
each activation of changes. For each host, it compares the timestamp of the
tree file var/check_mk/inventory/<HOST>.json and fetches the gzipped copy
var/check_mk/inventory/<HOST>.json.gz if the timestamp has changed.
The remote site saved a new tree in the wrong order:
- It moved the current tree to the history and deleted its gzipped copy.
- It wrote the new tree file.
- It wrote the new gzipped copy.
If the central site fetched the tree between steps 2 and 3, it got the previous tree, or no tree at all, under the timestamp of the new tree. The central site then considered the tree up to date and showed the outdated tree until the tree of the host changed again.
The remote site now writes the new gzipped copy before the new tree file:
- If the tree has changed, it moves the current tree to the history and deletes its gzipped copy.
- It writes the new gzipped copy.
- It writes the new tree file.
The central site may still fetch the new gzipped copy before the new tree file exists. It then stores the new tree under an older timestamp and replaces it once it sees the new tree file.
Details
- Class:
- Bug Fixes
- Level:
- Trivial
- Component:
- Inventory
- Versions:
- 3.0.0b1Not yet releasedProUltimateUltimate + MTCloud
- 2.5.0p24Not yet releasedProUltimateUltimate + MTCloud
- 2.4.0p44Not yet releasedProUltimateUltimate + MTCloud