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.
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.
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"
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
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.
Temporarily adding the keyword "SubBug" so we can be sure we have accounted for all the bugs. keyword: new = Tracking + FutureFeature + SubBug
making sure we're not missing any bugs in rhq_triage
this is in master now
qa -> rtimaniy
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.
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
Mass-closure of verified bugs against JON.
Trying out rally integration