Bug 549852

Summary: Add support for deleting RHQ plugin from RHQ Server/Agents
Product: [Other] RHQ Project Reporter: Larry O'Leary <loleary>
Component: PluginsAssignee: Mike Foley <mfoley>
Status: CLOSED UPSTREAM QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: 1.3CC: dsteigne, mfoley, tao
Target Milestone: ---Keywords: FutureFeature, Reopened, SubBug
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-11-10 11:37:46 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On: 535289, 535894    
Bug Blocks: 565628, 577992, 625146    

Description Larry O'Leary 2009-12-22 14:59:24 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.


How reproducible:
Everytime

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.

  
Actual results:
Plug-ins still showed up under Administration -> System Configuration -> Plugins and plug-in JARs were written to server's file system

Expected results:
Plug-ins should not have showed up under Administration -> System Configuration -> Plugins
Comment 1 wes hayutin 2010-02-16 11:58:36 EST
Temporarily adding the keyword "SubBug" so we can be sure we have accounted for all the bugs.

keyword:
new = Tracking + FutureFeature + SubBug
Comment 2 wes hayutin 2010-02-16 12:03:21 EST
making sure we're not missing any bugs in rhq_triage
Comment 3 Charles Crouch 2010-05-20 11:51:40 EDT
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.
Comment 4 Mike Foley 2011-06-10 13:29:25 EDT
discussing with ccrouch.  trying to determine the verification steps more clearly.  or if this is a duplicate of another issue.  tbd.
Comment 5 Mike Foley 2011-07-28 14:39:08 EDT
documenting that I am able to uninventory RHQ Agent and Server in 4.1 Master 7/28 build.