Bug 535283 (RHQ-1996)
| Summary: | fix mtime-based inventory sync logic | ||
|---|---|---|---|
| Product: | [Other] RHQ Project | Reporter: | Joseph Marques <jmarques> |
| Component: | Inventory | Assignee: | Ian Springer <ian.springer> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Jeff Weiss <jweiss> |
| Severity: | medium | Docs Contact: | |
| Priority: | urgent | ||
| Version: | 1.3 | CC: | ccrouch, cwelton, dajohnso, jshaughn, tao |
| Target Milestone: | --- | Keywords: | CodeChange |
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| URL: | http://jira.rhq-project.org/browse/RHQ-1996 | ||
| Whiteboard: | |||
| Fixed In Version: | 2.4 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2010-08-12 16:52:41 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: | 535564 | ||
| Bug Blocks: | 557793 | ||
|
Description
Joseph Marques
2009-04-21 21:55:00 UTC
not enough time left in this release to address this with an appropriate amount of QA to give us confidence that we haven't regressed...and inventory synchronization mechanisms are too important to just brush over. let's try to get this into the next release. Automated tests as described in RHQ-792 should be added to confirm this fix. REPRO STEPS ============= Use the following procedure: 1) Inventory only the platform. 2) execute "inventory --xml --export=export-1.xml" on the agent command line 3) shut down the agent 4) Go to Administration>System Configuration>Templates 5) Edit Metric Templates for CPU 6) check "Update schedules for existing resources", set collection interval to 10 minutes for "Idle" metrics (this will enable that metric as well) 7) Check that this metric got updated for the individual CPU resources in their Monitor>Schedule sub tabs 8) start up the agent 9) wait 30s (shouldn't be necessary) 10) execute "inventory --xml --export=export-2.xml" on the agent commandline 11) Locate the <schedule> element with name CpuPerc.idle for the same CPU resource in both export-1.xml and export-2.xml Expected results: The schedule in export-1.xml should be disabled and the interval should be 1200000. The schedule in export-2.xml should be enabled and interval should be 600000. Actual results (prior to this bug being fixed): The schedule looks the same in both files. Fixed by updating the mtime externally from SLSB methods, rather than inside Resource entity's setters (git commit e22d84ed25a635fc2cbc416bdee87dc340166749). Tested fix using the above repro steps. Also tested that name/description/location updates done while the Agent is offline get synced when the Agent comes back online. Fixed in RHQ_1_2_0_GA_PERF branch - r5255. Ian, can you merge this into 1.3.1 too. Thanks Associated case: 344497 Fixed in 1.3 CP branch - r5256. Charles, is that what you meant by 1.3.1? r5258 - When updating metric schedules, if pushing the updated schedules to the Agents fails, throw an Exception, rather than just touching the mtime on the corresponding Resources; ***NOTE*** THIS IS A SPECIAL FIX FOR THIS BRANCH ONLY AND SHOULD NOT BE MERGED INTO TRUNK! git commit for fix to trunk: e22d84ed25a635fc2cbc416bdee87dc340166749 It turns out the mtime also needs to be set on Resources when inventoryStatus is updated, otherwise inventory statuses never get synced to Agents... This is fixed by the following commits: master - commit fdd23ec2bb428e6bde53e70d9b31c6ae22465da0 1.3 CP branch - r5262 1.2 PERF branch - r5261 This bug was previously known as http://jira.rhq-project.org/browse/RHQ-1996 This bug relates to RHQ-792 The backward patching was incomplete in the RHQ_1_3_0_GA_CP branch. This has been resolved in r5269. qa -> gneelaka This has the same repro steps as https://bugzilla.redhat.com/show_bug.cgi?id=535564 QA Verified. Mass-closure of verified bugs against JON. |