Bug 1019676 - server log should be added to logrotate
server log should be added to logrotate
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-setup (Show other bugs)
3.3.0
Unspecified Unspecified
unspecified Severity low
: ---
: 3.3.0
Assigned To: Sandro Bonazzola
Pavel Stehlik
integration
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-16 04:52 EDT by Ohad Basan
Modified: 2013-10-21 12:54 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-10-18 07:30:25 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)

  None (edit)
Description Ohad Basan 2013-10-16 04:52:19 EDT
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 02:21:11 EDT
(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 03:42:20 EDT
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 03:47:59 EDT
(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 03:49:34 EDT
(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 06:12:37 EDT
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 07:30:25 EDT
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.