Bug 596109 - Suppress Augeas Exceptions
Suppress Augeas Exceptions
Status: CLOSED CURRENTRELEASE
Product: RHQ Project
Classification: Other
Component: Plugins (Show other bugs)
3.0.0
All Linux
low Severity medium (vote)
: ---
: ---
Assigned To: RHQ Project Maintainer
Mike Foley
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-05-26 06:37 EDT by Heiko W. Rupp
Modified: 2014-05-29 14:11 EDT (History)
1 user (show)

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


Attachments (Terms of Use)

  None (edit)
Description Heiko W. Rupp 2010-05-26 06:37:33 EDT
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 11:07:04 EDT
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 16:23:15 EDT
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 10:48:27 EDT
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 08:41:15 EDT
Triaged 21-Sept, keeping status same.

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