Bug 536101 (RHQ-488)

Summary: PC does not enforce a timeout when calling ResourceDiscoveryComponent.discoverResources()
Product: [Other] RHQ Project Reporter: Ian Springer <ian.springer>
Component: Plugin ContainerAssignee: RHQ Project Maintainer <rhq-maint>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 1.0CC: asantos, ccrouch, jshaughn, mazz
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
URL: http://jira.rhq-project.org/browse/RHQ-488
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-05-12 20:04:30 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ian Springer 2008-05-15 18:39:00 UTC
This is bad, because discoverResources() could hang for some reason and cause the entire discovery thread to hang.


Comment 1 Joseph Marques 2008-07-02 11:48:28 UTC
this will improve the stability of the PC if one rouge plugin wasn't allowed to affect the others.  setting to 1.1 to see if we have time for it.

Comment 2 Red Hat Bugzilla 2009-11-10 21:10:20 UTC
This bug was previously known as http://jira.rhq-project.org/browse/RHQ-488


Comment 3 John Mazzitelli 2010-08-10 15:32:16 UTC
not sure if this is true anymore:

org.rhq.core.pc.inventory.InventoryManager.invokeDiscoveryComponent(ResourceDiscoveryComponent, ResourceDiscoveryContext)

        try {
            ResourceDiscoveryComponent proxy = this.discoveryComponentProxyFactory.getDiscoveryComponentProxy(context
                .getResourceType(), component, timeout);
            Set<DiscoveredResourceDetails> results = proxy.discoverResources(context);
            return results;
        } catch (TimeoutException te) {
            log.warn("Discovery for Resources of [" + context.getResourceType() + "] has been running for more than "
                + timeout + " milliseconds. This may be a plugin bug.", te);
            return null;
        } catch (BlacklistedException be) {
            // Discovery did not run, because the ResourceType was blacklisted during a prior discovery scan.
            log.debug(ThrowableUtil.getAllMessages(be));
            return null;
        }

we even blacklist discovery components that DO take longer than the timeout so we don't try them again until someone clears the blacklist.

Comment 4 Ian Springer 2010-08-10 15:39:00 UTC
Yep, I think this can be resolved. Notice it was reported back in May 08.