Bug 536101 - (RHQ-488) PC does not enforce a timeout when calling ResourceDiscoveryComponent.discoverResources()
PC does not enforce a timeout when calling ResourceDiscoveryComponent.discove...
Status: CLOSED CURRENTRELEASE
Product: RHQ Project
Classification: Other
Component: Plugin Container (Show other bugs)
1.0
All All
medium Severity medium (vote)
: ---
: ---
Assigned To: RHQ Project Maintainer
http://jira.rhq-project.org/browse/RH...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-05-15 14:39 EDT by Ian Springer
Modified: 2014-05-12 16:04 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-05-12 16:04:30 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Ian Springer 2008-05-15 14:39:00 EDT
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 07:48:28 EDT
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 16:10:20 EST
This bug was previously known as http://jira.rhq-project.org/browse/RHQ-488
Comment 3 John Mazzitelli 2010-08-10 11:32:16 EDT
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 11:39:00 EDT
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.