Description of problem:
Previous to RHQ 4.12 install, I deleted the cobbler plugin (and several others) I did not want.
When I installed RHQ 4.12, the server tries to install them again.
22:07:47,154 ERROR [org.rhq.enterprise.server.core.plugin.ProductPluginDeployer] (pool-6-thread-1) Failed to register RHQ plugin file [file:/usr/local/rhq-server/modules/org/rhq/server-startup/main/deployments/rhq.ear/rhq-downloads/rhq-plugins/rhq-cobbler-plugin-4.12.0.jar]: javax.ejb.EJBException: java.lang.IllegalStateException: A deleted version of AgentPlugin [id=0, name=Cobbler, md5=f9c89087eff0099abbec8c9fe4195b0b] already exists in the database. The plugin cannot be installed until the deleted version is purged from the database (which should happen a couple of minutes after all servers acknowledged the plugin was deleted). Especially, the plugin won't be purged if ANY of the servers in the HA cloud have been down at the point in time the plugin was deleted and haven't gone back up yet.
Version-Release number of selected component (if applicable): 4.12
How reproducible: Always
Steps to Reproduce:
1. Use RHQ version < 4.12
2. Delete a plugin that ships with RHQ (e.g. cobbler)
3. Upgrade to RHQ 4.12
Exception, error, etc.
Probably should be just a warning with no stack trace, if anything, but now there's a giant stack trace and error.
It might make sense to also just delete the .jar files if they aren't needed from the new version.
If a plugin is deleted/purged in 4.11; when upgrading to 4.12 it will reinstall them again. This may mean no error message, but may not be desirable as well.