Red Hat Bugzilla – Bug 536650
persist inventory.dat earlier
Last modified: 2014-05-15 17:51:23 EDT
when you start the agent, there is no inventory.dat file. After the agent gets resources in inventory, I noticed there still isn't any data/inventory.dat file. Only when you shutdown, will that file get written.
If the agent crashed prior to shutdown, it will never have persisted its inventory - if the agent then comes up but there is no server available for the agent to sync with, the agent will not be able to monitor its resources because it will not have inventory.
We should consider having the agent persist the inventory.dat earlier in its lifecycle.
I'm raising this to major for possible fixing in 1.2. Here's why:
Typically, you install an agent and forget it. you normally won't shut it down after the inventory is finally synced. it just runs "forever". But if the server crashes or otherwise is brought down harshly, the inventory.dat will never get written out and you will have to re-sync the next time its started. And the loop continues - since inventory.dat isn't persisted in a timely manner, the cycle will continue - agent runs until its brought down and if its not brough down nicely, the inventory.dat won't get written.
Moving features/improvements to 1.4
This bug was previously known as http://jira.rhq-project.org/browse/RHQ-979
mass add of key word FutureFeature to help track
mazz - what would it take to fix this?
when I last looked, this was not going to be trivial to do. We'd have to pick a time to write inventory.dat, and anytime inventory changes (added/removed/modified a resource) we probably would want to write it out again. Unsure how easy it would be to do this and how long it would take to implement, but it would be a good idea to keep inventory.dat updated throughout the lifetime of the agent.