Bug 977350 - Log events will not be collected if target log file doesn't exist at the time the resource is started by the plug-in container
Log events will not be collected if target log file doesn't exist at the time...
Status: CLOSED CURRENTRELEASE
Product: JBoss Operations Network
Classification: JBoss
Component: Plugin -- JBoss EAP 6 (Show other bugs)
JON 3.1.2
Unspecified Unspecified
low Severity low
: DR01
: JON 3.2.1
Assigned To: Thomas Segismont
Mike Foley
:
Depends On: 977352
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-24 07:21 EDT by bkramer
Modified: 2014-05-08 13:43 EDT (History)
5 users (show)

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


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 406713 None None None Never

  None (edit)
Description bkramer 2013-06-24 07:21:20 EDT
Description of problem:
Newly added monitoring server "test-jboss-managed-server" is not started so there is no test-jboss-managed-server folder under domain/servers. When we enable event monitoring, the following message will be logged:

ERROR [ResourceContainer.invoker.daemon-1] (core.pluginapi.event.log.LogFileEventResourceComponentHelper)- LOGFILE: Logfile at location /opt/app/jboss-eap-6.1/domain/servers/test-jboss-managed-server/log/server.log does not exist or is not readable. Can not start watching the event log.

and the events will not be captured.


Version-Release number of selected component (if applicable):
JBoss ON 3.1.2

How reproducible:
Always

Steps to Reproduce:
1. Import JBoss 6.1 in domain mode into JBoss ON inventory;
2. Create new managed server "test-jboss-managed-server";
3. Before above server is started, enable log monitoring (test-jboss-managed-server resource -> Inventory -> Connection Settings);
4. check domain/servers and confirm that test-jboss-managed-server folder does not exist;


Actual results:
The error message will be logged:

ERROR [ResourceContainer.invoker.daemon-1] (core.pluginapi.event.log.LogFileEventResourceComponentHelper)- LOGFILE: Logfile at location /opt/app/jboss-eap-6.1/domain/servers/test-jboss-managed-server/log/server.log does not exist or is not readable. Can not start watching the event log.

and no events are captured.


Expected results:
No errors are logged and events are properly captured.

Additional info:
If the server is first started and then log monitoring is enabled, then events are captured properly.
Comment 3 Thomas Segismont 2014-01-30 12:17:00 EST
Fixed in master

commit b4c048f8dfe3aab6f4c8347e856b80f40e66f29a
Author: Thomas Segismont <tsegismo@redhat.com>
Date:   Thu Jan 30 18:15:50 2014 +0100

Changed the warning message to indicate that the poller will be started even if the file does not exist

Changed the poller implementation to support "bad" files (non existing or file is a directory): event polling will start as soon as a regular file is found
Comment 4 Jirka Kremser 2014-01-31 05:54:09 EST
commit in the release branch: 3e109d407
Comment 5 Simeon Pinder 2014-02-18 10:08:19 EST
Moving to ON_QA as available for testing in the following brew build:
https://brewweb.devel.redhat.com//buildinfo?buildID=336752

Note: the installed version is still JON 3.2.0.GA by design and this represents part of the payload for JON 3.2.1 also known as cumulative patch 1 for 3.2.0.GA.  How this will be delivered to customers is still being discussed.
Comment 6 Jan Bednarik 2014-02-25 12:52:03 EST
Moving to VERIFIED

Verified on JON 3.2.1 DR01 (Build Number : c758688:4c03150) and EAP 6.0, EAP 6.1, EAP 6.2

Followed the steps and verified that instead of former ERROR message there is a new "info" message (LOGFILE: Logfile at location /home/hudson/jboss-eap6-domain/domain/servers/test-jboss-managed-server3/log/server.log does not exist or is not readable. The poller will be started but no events will be polled until the file is created.) and that after the log file is created the events are logged.
Comment 7 Mike Foley 2014-05-08 13:43:50 EDT
JON 3.2.1 released week of 5/5/2014

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