Bug 536101 (RHQ-488) - PC does not enforce a timeout when calling ResourceDiscoveryComponent.discoverResources()
Summary: PC does not enforce a timeout when calling ResourceDiscoveryComponent.discove...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: RHQ-488
Product: RHQ Project
Classification: Other
Component: Plugin Container
Version: 1.0
Hardware: All
OS: All
medium
medium
Target Milestone: ---
: ---
Assignee: RHQ Project Maintainer
QA Contact:
URL: http://jira.rhq-project.org/browse/RH...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-05-15 18:39 UTC by Ian Springer
Modified: 2014-05-12 20:04 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-05-12 20:04:30 UTC
Embargoed:


Attachments (Terms of Use)

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.


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