Bug 535894 - (RHQ-2) Plugin container should be told what plugins to ignore
Plugin container should be told what plugins to ignore
Status: CLOSED CURRENTRELEASE
Product: RHQ Project
Classification: Other
Component: Plugin Container (Show other bugs)
1.0
All All
medium Severity medium (vote)
: ---
: ---
Assigned To: John Mazzitelli
Rajan Timaniya
http://jira.rhq-project.org/browse/RHQ-2
: FutureFeature, SubBug
Depends On:
Blocks: 549852 jon-plugin-dev
  Show dependency treegraph
 
Reported: 2008-02-22 12:20 EST by John Mazzitelli
Modified: 2012-03-28 10:51 EDT (History)
2 users (show)

See Also:
Fixed In Version: 2.4
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-08-12 12:47:05 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description John Mazzitelli 2008-02-22 12:20:00 EST
In order to reduce the footprint of the agent at runtime, we want to be able to configure the plugin container to ignore certain plugins.  When the agent's plugin container is told to ignore certain plugins, the PC should just not load it, thus reducing the memory footprint of the agent.  Reducing the number of types to discover and manage also reduces CPU utilization of the agent.

If the PC is told to ignore a plugin that is a dependency of a unignored plugin, an error should result.  You can't disable or ignore plugins that other, unignored, plugins need.   The agent startup should fail in this case.
Comment 1 Heiko W. Rupp 2008-12-02 14:43:22 EST
We should allow to manage this from the admin gui in the 'usual' per PC and template way, meaning that I can e.g. set the virt plugin to ignored for all agents, but enable it for one. Or the other way around.

I think this will become more important in the future.
Comment 2 John Mazzitelli 2009-04-08 13:54:02 EDT
RHQ-1930 introduces the concept of a discovery component blacklist (needed to avoid the agent crashing due to trying to call misbehaved plugin discovery components).

But this also has the side effect of essentially not discoverying resources of a specific type. We can add to this concept by being able to, on the fly, tell the PC "ignore resource types from plugin X"
Comment 3 Red Hat Bugzilla 2009-11-10 16:06:32 EST
This bug was previously known as http://jira.rhq-project.org/browse/RHQ-2
This bug is related to RHQ-847
This bug relates to RHQ-1
This bug relates to RHQ-61
This bug relates to RHQ-1930
Comment 4 John Mazzitelli 2010-02-05 01:02:41 EST
i checked in a solution to this in the bundle branch, sha ce7eb3d0afc94d75274b1a5a751c30653bfedba6

i'll let it stew there for a bit and cherry pick it over to master once I'm more confident that is works.
Comment 5 wes hayutin 2010-02-16 11:55:46 EST
Temporarily adding the keyword "SubBug" so we can be sure we have accounted for all the bugs.

keyword:
new = Tracking + FutureFeature + SubBug
Comment 6 wes hayutin 2010-02-16 12:00:50 EST
making sure we're not missing any bugs in rhq_triage
Comment 7 John Mazzitelli 2010-02-18 08:31:09 EST
this is in master now
Comment 8 Corey Welton 2010-03-23 23:00:52 EDT
qa -> rtimaniy
Comment 9 John Mazzitelli 2010-03-24 08:51:53 EDT
1) Start the server and an agent.
2) Make sure you have the "rhq-agent" agent plugin deployed (the plugin that lets you manage the agent itself).
3) Import into inventory the "RHQ Agent" resource.
4) Wait for that resource to go "availability green" so we know the agent has this in its inventory and its running normally.
5a) Shutdown the agent [*]
  OR....
5b) Skip this step - do not shutdown the agent [*]
6a) Now uninventory that resource from the GUI [**]
  OR...
6b) Skip this step - do not uninventory that resource [**]
7) Go to Administration>SystemConfiguration>Plugins in server GUI and select the "Agent" tab to show the agent plugins (not the "Server" plugins).
8) Select the "RHQ Agent" plugin in the list and click the "DISABLE" button.
9) Make sure the RHQ Agent plugin now shows the red icon next to it (not the green check mark).
10a) If you stopped the agent in step 5a, start the agent back up again.
  OR...
10b) If you did not stop the agent in step 5a, enter "inventory -f" in the agent prompt to force it to send an inventory report up to the server.
11) From the agent prompt, enter "plugins update" and confirm that the RHQ Agent plugin doesn't show up in the list.
12) Confirm the RHQ Agent resource does not show up in the auto-discovery queue (i.e. the agent didn't discovery the RHQ Agent resource and you can't commit it into inventory)

There are a few notes to be said here:

[*] I am not sure if step 5 is necessary. I would actually like to know what would happen if you don't shut down the agent - so first test this when doing step 5a and test again without doing step 5a. If you don't shut down the agent, I'm not sure if bad things will happen after you disable the agent and the agent would happen to send up an inventory report with resources in it that are from a disabled plugin. (note: disabling a plugin in the GUI does not automatically send down a message to agents for them to disable their plugin - you have to tell the agent to update its plugins (or restart the agent) in order for that to happen.

[**] Step 6 is odd but I think it has to get done. I think you have to uninventory all resources from disabled plugins because if you don't, I think when the agent syncs up its inventory with the server, it will get these resources that are no longer valid to the agent (those resources will have disabled resource types, don't know what the agent will do in that case). Again, I would like to see a test where step 6a is done and another test where you do step 6b and see what happens.

So I see that we need a few test runs here:

Test 1: steps 1,2,3,4,5a,6a,7,8,9,10a,11,12
Test 2: steps 1,2,3,4,5b,6a,7,8,9,10b,11,12
Test 3: steps 1,2,3,4,5a,6b,7,8,9,10a,11,12
Test 4: steps 1,2,3,4,5b,6b,7,8,9,10b,11,12

Test 1 will SHUTDOWN the agent and the resource will be uninventoried before disabling the plugin.
Test 2 will leave the agent RUNNING and the resource will be uninventoried before the plugin is disabled.
Test 3 will SHUTDOWN the agent and the resource will REMAIN in inventory throughout the test.
Test 4 will leave the agent RUNNING and the resource will REMAIN in inventory throughout the test.

The results of these tests will tell us what future enhancements we need to make to allow for easier plugin disablement.
Comment 10 Rajan Timaniya 2010-03-25 10:09:29 EDT
Verified on master - GIT revision 59ef9c778f809c2723d3764c8dcd5bdf7660f909 

Test 1: steps 1,2,3,4,5a,6a,7,8,9,10a,11,12 (SHUTDOWN the agent and the resource will be uninventoried before disabling the plugin)
- Ignore resource not shown in resource browser and not shown up in the auto-discovery queue



Test 2: steps 1,2,3,4,5b,6a,7,8,9,10b,11,12 (Leave the agent RUNNING and the resource will be uninventoried before the plugin is disabled) 
- When uninventoried the resource it (before plugin disabled) goes out from the resource list and shown up in auto-discovery queue.

- I have changed the sequence of steps, first I have disabled the plugin and then univentoried the resource. The result of this, neither resource shown in resource browser nor it shown up in the auto-discovery queue.



Test 3: steps 1,2,3,4,5a,6b,7,8,9,10a,11,12 (SHUTDOWN the agent and the resource will REMAIN in inventory

throughout the test)
- Ignore resource show in resource browser with disabled status and not shown up in the auto-discovery queue



Test 4: steps 1,2,3,4,5b,6b,7,8,9,10b,11,12 (leave the agent RUNNING and the resource will REMAIN in inventory

throughout the test)
- Ignore resource show in resource browser with disabled status and not shown up in the auto-discovery queue
Comment 11 Corey Welton 2010-08-12 12:47:05 EDT
Mass-closure of verified bugs against JON.
Comment 12 Charles Crouch 2012-03-26 16:39:51 EDT
Trying out rally integration
Comment 13 Charles Crouch 2012-03-28 10:51:54 EDT
Trying out rally integration

Note You need to log in before you can comment on or make changes to this bug.