Bug 596109 - Suppress Augeas Exceptions
Summary: Suppress Augeas Exceptions
Alias: None
Product: RHQ Project
Classification: Other
Component: Plugins
Version: 3.0.0
Hardware: All
OS: Linux
Target Milestone: ---
: ---
Assignee: RHQ Project Maintainer
QA Contact: Mike Foley
Depends On:
TreeView+ depends on / blocked
Reported: 2010-05-26 10:37 UTC by Heiko W. Rupp
Modified: 2014-05-29 18:11 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2014-05-29 18:11:47 UTC

Attachments (Terms of Use)

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?

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.

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