Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 596109

Summary: Suppress Augeas Exceptions
Product: [Other] RHQ Project Reporter: Heiko W. Rupp <hrupp>
Component: PluginsAssignee: RHQ Project Maintainer <rhq-maint>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: medium Docs Contact:
Priority: low    
Version: 3.0.0CC: jshaughn
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-05-29 18:11:47 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Heiko W. Rupp 2010-05-26 10:37:33 UTC
On hosts where augeas can not access /etc/cron.d for whaterver reason (or any of the other augeas based resources) the log is filled with exceptions like the one below

We should catch those and just log a one liner of with the the message of the IllegalStateException that Augeas was throwing and then return an empty collection instead of letting the Exception bubble up into the plugin container.

2010-05-26 12:33:44,017 WARN  [InventoryManager.discovery-1] (rhq.core.pc.inventory.InventoryManager)- Failure during discovery for [Cron] Resources - failed after 17 ms.
java.lang.Exception: Discovery component invocation failed.
        at org.rhq.core.pc.util.DiscoveryComponentProxyFactory$
        at java.util.concurrent.FutureTask$Sync.innerRun(
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(
        at java.util.concurrent.ThreadPoolExecutor$
Caused by: java.lang.IllegalStateException: Could not list files in /etc/cron.d
        at org.rhq.augeas.util.Glob.match(
        at org.rhq.augeas.util.Glob.matchAll(
        at org.rhq.plugins.augeas.AugeasConfigurationDiscoveryComponent.checkFiles(
        at org.rhq.plugins.augeas.AugeasConfigurationDiscoveryComponent.discoverResources(
        at sun.reflect.GeneratedMethodAccessor107.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
        at java.lang.reflect.Method.invoke(
        at org.rhq.core.pc.util.DiscoveryComponentProxyFactory$
        ... 5 more

Comment 1 Charles Crouch 2010-05-26 15:07:04 UTC
Heiko, Can you confirm you are seeing this with an RHQ build and not a JON build?

Comment 2 Heiko W. Rupp 2010-05-26 20:23:15 UTC
I currently see it with RHQ, but did not try on JON.
I have not the very latest version of master, so I can't say if any fixes by Filip are already in.

Comment 3 Heiko W. Rupp 2010-05-31 14:48:27 UTC
Yes, JON#172 does not have the issue as plugins for e.g.. cron or hosts are not supplied.

Comment 4 Corey Welton 2010-09-24 12:41:15 UTC
Triaged 21-Sept, keeping status same.