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   
Whiteboard:
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:
Embargoed:

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$ComponentInvocationThread.call(DiscoveryComponentProxyFactory.java:270)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:637)
Caused by: java.lang.IllegalStateException: Could not list files in /etc/cron.d
        at org.rhq.augeas.util.Glob.match(Glob.java:128)
        at org.rhq.augeas.util.Glob.matchAll(Glob.java:145)
        at org.rhq.plugins.augeas.AugeasConfigurationDiscoveryComponent.checkFiles(AugeasConfigurationDiscoveryComponent.java:130)
        at org.rhq.plugins.augeas.AugeasConfigurationDiscoveryComponent.discoverResources(AugeasConfigurationDiscoveryComponent.java:63)
        at sun.reflect.GeneratedMethodAccessor107.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.rhq.core.pc.util.DiscoveryComponentProxyFactory$ComponentInvocationThread.call(DiscoveryComponentProxyFactory.java:266)
        ... 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?
Thanks
Charles

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.