Bug 683545
| Summary: | Uploaded plugins can not be (re)deployed? | ||
|---|---|---|---|
| Product: | [Other] RHQ Project | Reporter: | Corey Welton <cwelton> |
| Component: | Plugins | Assignee: | John Sanda <jsanda> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Corey Welton <cwelton> |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | 4.0.0.B02 | CC: | jsanda, mfoley |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 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: | 683540 | ||
|
Description
Corey Welton
2011-03-09 16:55:19 UTC
This seems to be intermittent -- though it seems to happen more reliably with the Hudson plugin, for example. Turns out that the problem is not plugin specific. The plugin scanner maintains a cache of plugins on the file system. That cache is updated every time the scanner runs. If you delete/purge/re-add the plugin before the scanner has run, the scanner's cache in effect becomes invalid, and it fails to detect that the plugin on the file system is new. Committed changes to address a problem that occurs when deleting, purging, then
re-adding the plugin. The agent plugin scanner maintains a cache of plugins on the file system, and that cache was getting dirty. This results in the scanner failing to detect a plugin that has been re-added as a new plugin, and consequently, the plugin did not get re-installed. Now when deleting a plugin, a scan is immediately triggered.
Then if you went yo purge right away, you could wind up with a constraint violation in rhq_resource_type. Resource types are purged in a scheduled job, so it was possible to purge and re-add a plugin before its resource types have been purged. Now the plugin is marked to be purged. The purge is done in a scheduled job and is not done until all resource types from the plugin have been purged.
Once the user sees that the plugin has been purged, he knows it is safe to re-add it
commit hash: da19c1a6b8d117e0ca04702938e5c7abce6348b6
With the da19c1a6 commit, the UI no longer allows you to purge a plugin that you have not already deleted. Tested RHQ 4.0 community release, as follows: uploaded a test plugin (Top Server, which was attached to another bz), did 'update plugins' on the agent, then 'discovery -f', imported the resource from the auto-discovery portlet, deleted and purged the plugin. Then repeated this a 2nd time. RHQ 4.0 is good with plugin upload/delete/purge ... and re-upload/delete/purge... additionally verified the uploads, deletes in the oracle database with this SQL select id, name from rhq_plugin where name = 'ResourceFactoryPlugin'; Bookkeeping - closing bug - fixed in recent release. Bookkeeping - closing bug - fixed in recent release. Bookkeeping - closing bug - fixed in recent release. Bookkeeping - closing bug - fixed in recent release. |