Bug 711484 - An exception thrown in ResourceComponent.start() will fail the agent start up
Summary: An exception thrown in ResourceComponent.start() will fail the agent start up
Alias: None
Product: RHQ Project
Classification: Other
Component: Plugin Container
Version: 4.1
Hardware: Unspecified
OS: Unspecified
urgent vote
Target Milestone: ---
: ---
Assignee: RHQ Project Maintainer
QA Contact: Mike Foley
Depends On:
Blocks: jon3
TreeView+ depends on / blocked
Reported: 2011-06-07 15:32 UTC by Lukas Krejci
Modified: 2012-02-07 19:31 UTC (History)
2 users (show)

Clone Of:
Last Closed:

Attachments (Terms of Use)

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:

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@redhat.com>
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

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

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