Bug 711502

Summary: Resources using the ResourceContext.createAvailabilityCollectorRunnable unable to start up when loaded from the disk
Product: [Other] RHQ Project Reporter: Lukas Krejci <lkrejci>
Component: Plugin ContainerAssignee: Lukas Krejci <lkrejci>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: high Docs Contact:
Priority: high    
Version: 3.0.0CC: hrupp
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:
Bug Depends On:    
Bug Blocks: 678340, 734807    

Description Lukas Krejci 2011-06-07 16:30:19 UTC
Description of problem:

Resources using ResourceContext.createAvailablityCollectorRunnable() to enable async availability collections are unable to do so when they are being restored
from the persistent storage during plugin container start up.

The AvailabilityCollectorThreadPool is only initialized *after* the resources are loaded from disk and activated, and therefore the above call will always end up with an exception (because the thread pool is null by the time the resources are started up).

Version-Release number of selected component (if applicable):
RHQ 3.0.0 and up

How reproducible:
always

Steps to Reproduce:
1. Inventory JBoss AS 5 resource, set the "Availability Check Period" property to a valid value.
2. restart the agent

  
Actual results:
The JBoss AS 5 resource is forever down

Expected results:
the resource is up and async availability collection is working

Additional info:

in case of JBoss AS 5 resource, the workaround is unset the above mentioned property in its connection settings. This will prevent the resource from trying the async avail collection and fall back to detecting it synchronously.

Comment 2 Lukas Krejci 2011-10-12 11:52:30 UTC
commit 10e42d6f44b3ddb36f42f81079ae5fddbad58cdc
Author: Lukas Krejci <lkrejci>
Date:   Wed Oct 12 12:25:22 2011 +0200

    BZ 711502 - make sure the availability collectors are initialized before any resource component is started.

Comment 3 Mike Foley 2011-10-13 18:32:18 UTC
observed BZ 744803 while verifying this.  

this is verified by following the reproduction steps

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

Comment 5 Mike Foley 2012-02-07 19:30:43 UTC
marking VERIFIED BZs to CLOSED/CURRENTRELEASE