Bug 784730 - Enabled event sources cause initial resource component start to time out
Summary: Enabled event sources cause initial resource component start to time out
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: Agent
Version: 4.2
Hardware: All
OS: All
high
high
Target Milestone: ---
: JON 3.0.1
Assignee: RHQ Project Maintainer
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On: 773435
Blocks: jon30-sprint10, rhq43-sprint10
TreeView+ depends on / blocked
 
Reported: 2012-01-25 23:26 UTC by Larry O'Leary
Modified: 2018-12-03 17:27 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 773435
Environment:
Last Closed: 2013-09-03 15:14:15 UTC
Embargoed:


Attachments (Terms of Use)

Description Larry O'Leary 2012-01-25 23:26:52 UTC
Backport fix d1a4410a78bfbed7baa8b65b71abea0315a3fea0 to JON 3.0.1

+++ This bug was initially created as a clone of Bug #773435 +++

Ever wonder why it takes a while to get your first batch of log file
events...

During component start plugins that support event sources create the
logfile event pollers for enabled event sources.  Unfortunately the
poller creation is blocked because it is trying to use to the
eventManager to access Sigar.  This is because the initial
component start takes place during container initialization, which
holds a write lock and does not yet allow access to the managers. This
results in a 60 second timeout, waiting for the lock. Which in turn
(quietly) fails the component start.  Eventually the component will
be started again, when the pc for any reason tries to interact
with the resource container.  But the interrupted component start and
poller creation is not good, and can potentially introduce issues
depending on how well the plugin (and our poller code) is written.

--- Additional comment from jshaughn on 2012-01-11 16:57:00 EST ---

commit d1a4410a78bfbed7baa8b65b71abea0315a3fea0

lazily access sigar on the first polling, which happens after container
initialization.


Test Notes
Perhaps not super-easy to test but with debug logging on the agent and
and an enabled event source (enable the built in event source for the
RHQ Server resource) you should see no related messages of any severity
for the component startup (at agent startup time). Also, the log
event generation should work as expected, generating an event for each 
server log entry (assuming the default settings)

--- Additional comment from jshaughn on 2012-01-18 12:29:16 EST ---

*** Bug 782796 has been marked as a duplicate of this bug. ***

Comment 1 Jay Shaughnessy 2012-01-31 20:21:51 UTC
release/jon3.0.x cherry pick:

commit d44638c22a94b4997fd3a5af9f27b642bed97ef0

[Bug 773435 - Enabled event sources cause initial resource component start to time out]
lazily access sigar on the first polling, which happens after container
initialization.

Conflicts:

    modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/event/log/LogFileEventPoller.java

Comment 2 Simeon Pinder 2012-02-02 19:34:55 UTC
Moving to ON_QA as 3.0.1 RC2 is available from here:

https://brewweb.devel.redhat.com//buildinfo?buildID=197202

Comment 3 Sunil Kondkar 2012-02-16 12:04:37 UTC
Verified on Version: 3.0.1.GA RC4 (Build Number: dd8a001:c5270fb)

Verified by enabling debug logging on the agent and enabling event source for the
RHQ Server resource. Also, verified that event logs are generated for each 
server log entry.

Comment 4 Heiko W. Rupp 2013-09-03 15:14:15 UTC
Bulk closing of old issues in VERIFIED state.


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