Bug 1021346

Summary: server.log is at debug priority after jboss update
Product: Red Hat Enterprise Virtualization Manager Reporter: David Jaša <djasa>
Component: ovirt-engine-setupAssignee: Alon Bar-Lev <alonbl>
Status: CLOSED CURRENTRELEASE QA Contact: Jiri Belka <jbelka>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.3.0CC: acathrow, alonbl, bazulay, gickowic, iheim, mperina, parsonsa, pstehlik, Rhev-m-bugs, sbonazzo, yeylon
Target Milestone: ---Keywords: Triaged
Target Release: 3.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: integration
Fixed In Version: is20.2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1026487    
Attachments:
Description Flags
stock ovirt-engine.xml.in
none
/etc/ovirt-engine/notifier/log4j.xml
none
/etc/ovirt-engine/engine-manage-domains/log4j.xml
none
/etc/ovirt-engine/engine-config/log4j.xml none

Description David Jaša 2013-10-21 06:50:09 UTC
Created attachment 814433 [details]
stock ovirt-engine.xml.in

Description of problem:
server.log is at debug priority after setup and its logs are not were not rotated. This was clean installation if is19 build.

Version-Release number of selected component (if applicable):
is19:
rhevm-3.3.0-0.26.master.el6ev.noarch
rhevm-setup-3.3.0-0.26.master.el6ev.noarch
rhevm-backend-3.3.0-0.26.master.el6ev.noarc

How reproducible:
not sure

Steps to Reproduce:
1. install a clean is19, look into /var/log/ovirt-engine/server.log
2.
3.

Actual results:
the log is at DEBUG priority

Expected results:
the log should be at info priority at most

Additional info:

Comment 1 David Jaša 2013-10-21 06:51:43 UTC
Created attachment 814434 [details]
/etc/ovirt-engine/notifier/log4j.xml

Comment 2 David Jaša 2013-10-21 06:52:53 UTC
Created attachment 814435 [details]
/etc/ovirt-engine/engine-manage-domains/log4j.xml

Comment 3 David Jaša 2013-10-21 06:54:17 UTC
Created attachment 814436 [details]
/etc/ovirt-engine/engine-config/log4j.xml

Comment 4 David Jaša 2013-10-21 06:55:04 UTC
all attached files are stock, there were no modifications to them since setup time.

Comment 5 David Jaša 2013-10-21 07:16:43 UTC
There are few things worthy to highlight:

1) the modification time of all of above files was RHEV-M installation time

2) the DEBUG messages started appearing in server.log 2 days after installation time

3) a snippet from /etc/ovirt-engine/notifier/log4j.xml:
      <!-- All the application server messages go here: -->
      <file-handler name="SERVER">
        <formatter>
          <pattern-formatter pattern="%d %-5p [%c] (%t) %s%E%n"/>
        </formatter>
        <file path="$getstring('ENGINE_LOG')/server.log"/>
        <append value="true"/>
      </file-handler>

      <!-- Only the engine messages go here: -->
      <file-handler name="ENGINE" autoflush="true">
        <level name="INFO"/>
        <formatter>
          <pattern-formatter pattern="%d %-5p [%c] (%t) %s%E%n"/>
        </formatter>
        <file path="$getstring('ENGINE_LOG')/engine.log"/>
        <append value="true"/>
      </file-handler>
--> engine.log has to be separately set up to log more verbosely than INFO, server.log does not. Why?

Comment 6 Alon Bar-Lev 2013-10-21 07:17:20 UTC
This is strange, I do not see any DEBUG message at my installations both rhel and fedora.

But I can try to force it to INFO, for logrotate, you are correct this server.log log should not have been appended, I will add logrotate.

Comment 7 Alon Bar-Lev 2013-10-21 07:20:02 UTC
the notifier, engine-config, engine-manage-domains configuration does relate to server.log behavior.

I do not see engine.log at /etc/ovirt-engine/notifier/log4j.xml, do you sure this is the case?

Comment 8 Alon Bar-Lev 2013-10-21 07:23:19 UTC
I was wrong, we do rotate the server.log

/etc/logrotate.d/ovirt-engine
---
"/var/log/ovirt-engine/engine.log" "/var/log/ovirt-engine/server.log" {
<snip>
---

Comment 9 David Jaša 2013-10-21 07:26:18 UTC
> I was wrong, we do rotate the server.log

the log was rotated, I edited the subject but not the body. :/ BTW the rotation could use xz instead of gz and compress the most recent archived log as well.

> I do not see engine.log at /etc/ovirt-engine/notifier/log4j.xml, do you sure this is the case?

It was in /usr/share/ovirt-engine/services/ovirt-engine/ovirt-engine.xml.in , I managed to c&p wrong file name.

Comment 10 Alon Bar-Lev 2013-10-21 07:29:54 UTC
Using gz or xz for text is not that important. And we do not enforce compression, but let admin to specify whatever he likes at /etc/logrotate.conf

If debug started two days after installation it is probably not the configuration file setting that caused jboss to switch into debug.

Please try to restart and see if DEBUG appears, please try to reproduce.

Comment 11 David Jaša 2013-10-21 08:22:08 UTC
(In reply to Alon Bar-Lev from comment #10)
> Using gz or xz for text is not that important. 

when the log gets big, it helps when one compression method saves two thirds of the other.

> And we do not enforce
> compression, but let admin to specify whatever he likes at
> /etc/logrotate.conf
> 
> If debug started two days after installation it is probably not the
> configuration file setting that caused jboss to switch into debug.
> 

I think so, as DEBUG was not specified in any relevant config file.

> Please try to restart and see if DEBUG appears, please try to reproduce.

It does unless I add <level name="INFO"/> statement to server.log file-handler entry.

Comment 12 Alon Bar-Lev 2013-10-21 08:33:23 UTC
(In reply to David Jaša from comment #11)
> (In reply to Alon Bar-Lev from comment #10)
> > Using gz or xz for text is not that important. 
> 
> when the log gets big, it helps when one compression method saves two thirds
> of the other.

Once again, this is not our call. logrotate is system component that is configured by system admin.

> 
> > And we do not enforce
> > compression, but let admin to specify whatever he likes at
> > /etc/logrotate.conf
> > 
> > If debug started two days after installation it is probably not the
> > configuration file setting that caused jboss to switch into debug.
> > 
> 
> I think so, as DEBUG was not specified in any relevant config file.
> 
> > Please try to restart and see if DEBUG appears, please try to reproduce.
> 
> It does unless I add <level name="INFO"/> statement to server.log
> file-handler entry.

So I guess something had changed in jboss, any upgrade related that?

Comment 13 David Jaša 2013-10-21 08:45:56 UTC
(In reply to Alon Bar-Lev from comment #12)
> (In reply to David Jaša from comment #11)
> > (In reply to Alon Bar-Lev from comment #10)
> > > Using gz or xz for text is not that important. 
> > 
> > when the log gets big, it helps when one compression method saves two thirds
> > of the other.
> 
> Once again, this is not our call. logrotate is system component that is
> configured by system admin.
> 

logrotate is configured by packages as well and having good default configuration is their responsibility as well

> So I guess something had changed in jboss, any upgrade related that?

going through the logs, there was jboss update first, then engine clean up, then engine fresh installation. The debug priority in logs appeared two minutes after jboss update finished.

Comment 14 Alon Bar-Lev 2013-10-21 08:49:09 UTC
(In reply to David Jaša from comment #13)
> (In reply to Alon Bar-Lev from comment #12)
> > (In reply to David Jaša from comment #11)
> > > (In reply to Alon Bar-Lev from comment #10)
> > > > Using gz or xz for text is not that important. 
> > > 
> > > when the log gets big, it helps when one compression method saves two thirds
> > > of the other.
> > 
> > Once again, this is not our call. logrotate is system component that is
> > configured by system admin.
> > 
> 
> logrotate is configured by packages as well and having good default
> configuration is their responsibility as well

If admin want to overwrite our configuration he may do so, as he can do for global configuration. We should introduce as minimum customization (and dependencies) as possible.

> > So I guess something had changed in jboss, any upgrade related that?
> 
> going through the logs, there was jboss update first, then engine clean up,
> then engine fresh installation. The debug priority in logs appeared two
> minutes after jboss update finished.

So jboss broke their own log level inheritance model... second time they break log related, previous was the removal of the option to specify setting via java properties in log4j.

Comment 15 Martin Perina 2013-10-23 13:45:23 UTC
*** Bug 1021561 has been marked as a duplicate of this bug. ***

Comment 16 Jiri Belka 2013-10-31 08:56:43 UTC
ok, is20.2

Comment 17 Itamar Heim 2014-01-21 22:25:20 UTC
Closing - RHEV 3.3 Released

Comment 18 Itamar Heim 2014-01-21 22:25:55 UTC
Closing - RHEV 3.3 Released

Comment 19 Itamar Heim 2014-01-21 22:29:29 UTC
Closing - RHEV 3.3 Released