Bug 702440
| Summary: | Generate synthetic agent deletes in cumin based on heartbeats and agent list [RFE] | |||
|---|---|---|---|---|
| Product: | Red Hat Enterprise MRG | Reporter: | Trevor McKay <tmckay> | |
| Component: | cumin | Assignee: | Trevor McKay <tmckay> | |
| Status: | CLOSED ERRATA | QA Contact: | Jan Sarenik <jsarenik> | |
| Severity: | medium | Docs Contact: | ||
| Priority: | medium | |||
| Version: | Development | CC: | croberts, jross, jsarenik, ltoscano, matt | |
| Target Milestone: | 2.0.1 | |||
| Target Release: | --- | |||
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| Fixed In Version: | cumin-0.1.4840-1 | Doc Type: | Bug Fix | |
| Doc Text: |
Cause
Cumin did not have a way to recognize inactive agents in its database.
Consequence
Stopping agents while cumin was shutdown or configuring cumin to point to a different broker could cause objects from missing agents to display in the UI when cumin was restarted. These stale objects would never be deleted.
Fix
All dynamic data in cumin is deleted when cumin starts. Agents and objects are rediscovered as cumin runs.
Result
Cumin will only display data from active agents. Overall performance is not discernibly affected by deletion of dynamic data on startup.
|
Story Points: | --- | |
| Clone Of: | ||||
| : | 736494 (view as bug list) | Environment: | ||
| Last Closed: | 2011-09-07 16:43:39 UTC | Type: | --- | |
| Regression: | --- | Mount Type: | --- | |
| Documentation: | --- | CRM: | ||
| Verified Versions: | Category: | --- | ||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
| Cloudforms Team: | --- | Target Upstream Version: | ||
| Embargoed: | ||||
| Bug Depends On: | ||||
| Bug Blocks: | 723887, 736494 | |||
|
Description
Trevor McKay
2011-05-05 16:51:46 UTC
BZ595774 is related to this, and contains a bunch of links to other related BZs. Possible solution outline: Add a table in the database which tracks agents and the last time a heartbeat was heard from that agent. Periodically scan the table and delete agents which have not received a heartbeat in N seconds (first run of the thread needs to be offset from cumin start time to give agents a chance to "show up"). Also delete any objects associated with that agent as we do on agent delete or agent creation. We already delete all objects associated with an agent when we first see that agent after cumin starts up (restricted by bound classes). This covers objects that we will see again, as well as objects that we would not have seen, associated with that agent. We also delete objects when a broker tells us an agent went away. The only group left is objects associated with agents that we will never see during a given session (if they show up late, we will delete their objects, noted above). This is in fact the group that we are targeting in this BZ. The union of these two sets is simply all objects of bound classes for a particular cumin-data instance. So doesn't handling phantom data just resolve to deleting all objects of all bound classes when cumin-data starts? I think yes. Will try. (sample data is not deleted except by the expiration thread, when it is 24 hours old) One additional note, we do not delete the Collector object when we see its agent created or deleted. I don't understand why not, maybe some historical reason. Especially with collector filtering turned off, I can't see that this is too much of a problem. Fixed in revision 4808. All non-sample data associated with bound classes is deleted by cumin-data instances on startup. User is presented with a friendly banner noting the absence of the collector until the collector object is seen. No longer any need to delete data when an agent create is seen. Objects are still deleted when an agent delete is seen. User data is also preserved. Verified with cumin-0.1.4878-1.el5
Technical note added. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.
New Contents:
Cause
Cumin did not have a way to recognize inactive agents in its database.
Consequence
Stopping agents while cumin was shutdown or configuring cumin to point to a different broker could cause objects from missing agents to display in the UI when cumin was restarted. These stale objects would never be deleted.
Fix
All dynamic data in cumin is deleted when cumin starts. Agents and objects are rediscovered as cumin runs.
Result
Cumin will only display data from active agents. Overall performance is not discernibly affected by deletion of dynamic data on startup.
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHSA-2011-1249.html |