Bug 711484

Summary: An exception thrown in ResourceComponent.start() will fail the agent start up
Product: [Other] RHQ Project Reporter: Lukas Krejci <lkrejci>
Component: Plugin ContainerAssignee: RHQ Project Maintainer <rhq-maint>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: urgent Docs Contact:
Priority: high    
Version: 4.1CC: hrupp, skondkar
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 678340    

Description Lukas Krejci 2011-06-07 15:32:55 UTC
Description of problem:

An exception thrown inside the ResourceComponent.start() method will get rethrown as InvalidPluginConfigurationException which is not being caught inside the InventoryManager.

As a result, the agent will stop the plugin container and will try to restart it a couple of times, eventually giving up.

How reproducible:
always

Steps to Reproduce:
1. Inventory apache, unset the pinging URL in its connection properties
2. Stop the apache server
3. Restart the agent
  
Actual results:
agent will not start up again with an exception coming from the apache plugin

Expected results:
the agent starts up, only the apache resource will be stopped

Additional info:

Comment 1 Lukas Krejci 2011-06-16 10:22:21 UTC
commit 47a5ff64c25c0f4d8648ed8101152d17863abe4d
Author: Lukas Krejci <lkrejci>
Date:   Tue Jun 7 18:40:22 2011 +0200

    BZ 711484 - catching all the exceptions that can happen during resource activation

Comment 2 Lukas Krejci 2011-06-16 10:23:53 UTC
Note that for the repro steps to work, the SNMP module must NOT be setup in the apache instance.

Comment 3 Sunil Kondkar 2011-06-20 10:12:37 UTC
Verified on build 149 (Version: 4.1.0-SNAPSHOT Build Number: 04f721e)

Inventoried Apache which is not configured for SNMP module.
After unsetting the URL property, stopped the apache server and restarted the agent successfully.
The avail command at the agent prompt displays the Apache resource as down.

Marking as verified.

Comment 4 Mike Foley 2012-02-07 19:31:33 UTC
marking VERIFIED BZs to CLOSED/CURRENTRELEASE

Comment 5 Mike Foley 2012-02-07 19:31:35 UTC
changing status of VERIFIED BZs for JON 2.4.2 and JON 3.0 to CLOSED/CURRENTRELEASE