Red Hat Bugzilla – Bug 549852
Add support for deleting RHQ plugin from RHQ Server/Agents
Last modified: 2011-11-10 11:37:46 EST
Description of problem:
After changing a custom developed plugin, the plugin is not completely removed from inventory and the file system. Using the Un-inventory function, the console says the plugins have been un-inventoried. However, they still show up in the Plugin list at:
Administration -> System Configuration -> Plugins (http://localhost:7080/rhq/admin/plugin/plugin-list.xhtml)
Even after shutting down both the server and agent and then manually deleting the plugin JAR files from the file system, the plugin still shows up. This appears to be because the plugin is persisted in the database and upon start-up, the plug-in is copied to the server's file system.
This is causing a problem with updates to plug-ins because if I update and change the name of a plug-in, the previous copy in not erased.
I need a method to properly remove a no longer needed plug-in from the server and agent.
Steps to Reproduce:
1. developed three plugins:
- one is the HTTP test example from "How to write a plugin for
JBoss ON , Jopr and RHQ" by Heiko W. Rupp. I followed the example exactly so that it shows up as a server that can be used to configure several child services.
- one is a custom plug-in that depends on an RHQ Agent and "run inside" to appear in the container of the RHQ Agent in the web interface.
- one is a custom plug-in that was first an adaptation of the HTTP test plugin but then later changed to depend on RHQ Agent and "run inside" to appear in the container of the RHQ Agent in the web interface.
2. Using the RHQ web interface I first "un-inventoried" the plugins.
Plug-ins were still there so:
3. Shut down agent and server.
4. Delete plug-in JARs from file system of server and agent.
5. Start-up server.
Plug-ins still showed up under Administration -> System Configuration -> Plugins and plug-in JARs were written to server's file system
Plug-ins should not have showed up under Administration -> System Configuration -> Plugins
Temporarily adding the keyword "SubBug" so we can be sure we have accounted for all the bugs.
new = Tracking + FutureFeature + SubBug
making sure we're not missing any bugs in rhq_triage
The original description is not particularly accurate regarding what the cause of the problem is, its not about the plugin still showing up after deletion from the filesystem.
We should be able to support going to the JON UI and uninventorying a plugin
and have that remove/disable all aspects of the plugin from the system. It should then be possible for a new plugin with same name and version to be installed and for that to work as expected, without picking up any of the old settings.
Mazz can describe at a high level the remaining items now that RHQ-2 is done
First step is to analyze whats left to do and then make a start. This work should be done in a separate branch and not merged to master without a thorough code review and then impact sign-off from me.
discussing with ccrouch. trying to determine the verification steps more clearly. or if this is a duplicate of another issue. tbd.
documenting that I am able to uninventory RHQ Agent and Server in 4.1 Master 7/28 build.