Bug 1019676 - server log should be added to logrotate
Summary: server log should be added to logrotate
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-setup
Version: 3.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: 3.3.0
Assignee: Sandro Bonazzola
QA Contact: Pavel Stehlik
URL:
Whiteboard: integration
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-16 08:52 UTC by Ohad Basan
Modified: 2013-10-21 16:54 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-10-18 11:30:25 UTC
oVirt Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Ohad Basan 2013-10-16 08:52:19 UTC
Description of problem:
/var/log/ovirt-engine/server.log can get to really large files (mine got to several GBs)
when installing ovirt engine, an entry for server.log should be added to logrotate

Comment 1 Sandro Bonazzola 2013-10-17 06:21:11 UTC
(In reply to Ohad Basan from comment #0)
> Description of problem:
> /var/log/ovirt-engine/server.log can get to really large files (mine got to
> several GBs)
> when installing ovirt engine, an entry for server.log should be added to
> logrotate

Looking at the code a logrotate entry for server.log is already in place.
Can you run as root:

 # logrotate -f /etc/logrotate.conf

and see if it fails?

Comment 2 Ohad Basan 2013-10-17 07:42:20 UTC
it does not fail.
which file should be in place?
in the logrotate.conf I have this
/var/log/wtmp {
    monthly
    create 0664 root utmp
        minsize 1M
    rotate 1
}

/var/log/btmp {
    missingok
    monthly
    create 0600 root utmp
    rotate 1
}

Comment 3 Sandro Bonazzola 2013-10-17 07:47:59 UTC
(In reply to Ohad Basan from comment #2)
> it does not fail.
> which file should be in place?

look at /etc/logrotate.d/ovirt-engine

> in the logrotate.conf I have this
> /var/log/wtmp {
>     monthly
>     create 0664 root utmp
>         minsize 1M
>     rotate 1
> }
> 
> /var/log/btmp {
>     missingok
>     monthly
>     create 0600 root utmp
>     rotate 1
> }

Comment 4 Sandro Bonazzola 2013-10-17 07:49:34 UTC
(In reply to Sandro Bonazzola from comment #3)
> (In reply to Ohad Basan from comment #2)
> > it does not fail.
> > which file should be in place?
> 
> look at /etc/logrotate.d/ovirt-engine
> 
> > in the logrotate.conf I have this
> > /var/log/wtmp {
> >     monthly
> >     create 0664 root utmp
> >         minsize 1M
> >     rotate 1
> > }
> > 
> > /var/log/btmp {
> >     missingok
> >     monthly
> >     create 0600 root utmp
> >     rotate 1
> > }

don't you have the following line?

include /etc/logrotate.d

Comment 5 Ohad Basan 2013-10-18 10:12:37 UTC
I have a guess about why it happens.
I just don't know what it started right now
the problem is that the automation env is repeatedly installs and reinstalls rhevm
when it installs rhev the logrotate entry is being written
when it removes rhev > the logrotate entry is being deleted
I think that when anacron runs the daily logrotate, rhev is not currently installed and therfore the logrotate entry is absent from the machine.
can you tell me if it's a new change ? meaning, in the past did yum remove rhev did NOT remove the logrotate entry from logrotate.d?

Comment 6 Sandro Bonazzola 2013-10-18 11:30:25 UTC
Log rotate files were introduced on Tue May 21, previoulsy the enigne used its own implementation for rotating logs. See http://gerrit.ovirt.org/#/c/14961/

I think you should call logrotate -f /etc/logrotate.conf before cleaning up or just after rpm install. Or just add a new file in your logrotate.d taking care of this.

Closing as this is not a bug.


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