Bug 828938

Summary: The agent running in background is stopped after removing plugins with types in inventory.
Product: [Other] RHQ Project Reporter: Filip Brychta <fbrychta>
Component: Agent, PluginsAssignee: Simeon Pinder <spinder>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: unspecified Docs Contact:
Priority: high    
Version: 4.4CC: ahovsepy, hrupp, loleary, spinder
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugzilla.redhat.com/show_bug.cgi?id=818673
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 838153 (view as bug list) Environment:
Last Closed: 2013-09-03 13:01:13 EDT Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 838153    
Description Flags
logs none

Description Filip Brychta 2012-06-05 11:18:47 EDT
Created attachment 589558 [details]

Description of problem:
The agent running on the background is stopped after removing jBossAS7 plugin from jon.

Version-Release number of selected component (if applicable):
Version: 3.1.0.CR2
Build Number: 05c820d:aaa5a79

How reproducible:

Steps to Reproduce:
1.Clean installation of jon3.1.0.CR2 + jon-plugin-pack-eap-3.1.0.CR2 is running, eap6 running and imported to jon inventory, the rhq agent is running on the background
2.go to administration>agent plugins
3.disable jBossAS7 plugin
4.delete jBossAS7 plugin
Actual results:
The agent is stopped.

Expected results:
The agent is running.

Additional info:
Logs attached.
Comment 1 Simeon Pinder 2012-07-02 09:04:05 EDT
I've reproduced this with JON 3.1.0.GA EAP and Postgres plugins.  Although the agent was unaffected when deleting plugins that were not being used(Ex. IIS plugin on Linux box). Not sure if that's relevant yet.  Moving this to ON_DEV.
Comment 2 Simeon Pinder 2012-07-02 09:07:09 EDT
A few more data points.  
- Doesn't seem to happen when agent is running in console mode.  
- After background agent goes down if you restart the agent it seems then operate unaffected.
Comment 3 Simeon Pinder 2012-07-03 16:59:34 EDT
This is fixed with commit 0a0c9a990684675c to master.

Leaving this ON_DEV as this commit needs to be cherrypicked to the release branch for 3.1.1 still.
Comment 4 Simeon Pinder 2012-07-05 09:12:09 EDT
Another update(typo and thread identification) for this issue to master with commit 21ca86fc1c1be1d5c41089.

Updated title to reflect how this issue is not exclusively related to AS7 specifically but to any plugins where types have been imported into inventory and then later deleted.
Comment 5 Simeon Pinder 2012-07-09 13:05:56 EDT
This has always been a problem from we implemented resource type deletion.  The problem was that the request to reboot the agent was always running as a daemon thread which meant that when the PC reboot killed all non-daemon threads that the VM would stop as it should.  If you tested resource type deletion, in 'console' mode, the input loop was running as a non-daemon thread such that the vm persisted and the logic proceeded as expected. 

We should update the release notes for 3.0/3.1 about this as it means that deleting imported types would cause all background agents to shutdown requiring restart.
Comment 6 Armine Hovsepyan 2012-07-31 09:30:42 EDT
Comment 7 Larry O'Leary 2012-12-04 17:03:41 EST
Removing target as this was not addressed in the product and was only committed and verified in master.
Comment 8 Heiko W. Rupp 2013-09-03 13:01:13 EDT
Bulk closing of old issues that are in VERIFIED state.