Description of problem: If I try to upload a plugin, it seems to get uploaded, but not deployed. Quite possibly there is no method in the UI to actually deploy something after it has been uploaded? Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. Make a backup of your agent plugins 2. Delete and purge one or more plugins (i.e., IIS, Hudson) 3. Uupload your plugin(s) again via the upload widget. 4. Try various things, including "Scan for Updates" to see if your plugins have been added Actual results: Nothing shows up Expected results: The plugins should show up... Additional info: ...However, I am not sure all the steps for deployment are here in the UI. I can upload any number of plugins. Upon doing so, I see them in the upload UI -- and I can hit "Clear" to remove them from said UI. This looks like more of a "staging" area for uploading them to the server versus actual deployment. But in this case I cannot find a method for actually getting the uploaded plugins deployed...
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.