Bug 1182073 - [3.5-6.6] logrotate fails to operate correctly / misses to rotate logfiles
Summary: [3.5-6.6] logrotate fails to operate correctly / misses to rotate logfiles
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-node
Version: 3.5.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 3.5.0
Assignee: Fabian Deutsch
QA Contact: Virtualization Bugs
URL:
Whiteboard: node
Depends On:
Blocks: rhev35gablocker
TreeView+ depends on / blocked
 
Reported: 2015-01-14 11:39 UTC by haiyang,dong
Modified: 2016-02-10 20:03 UTC (History)
11 users (show)

Fixed In Version: ovirt-node-3.2.1-5.el6 ovirt-node-3.2.1-5.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-02-11 21:08:09 UTC
oVirt Team: Node


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2015:0160 normal SHIPPED_LIVE ovirt-node bug fix and enhancement update 2015-02-12 01:34:52 UTC
oVirt gerrit 36888 master MERGED logrotate: Fix syslog config Never
oVirt gerrit 36907 ovirt-3.5 MERGED logrotate: Fix syslog config Never

Description haiyang,dong 2015-01-14 11:39:14 UTC
Description of problem:
Due to execute "logrotate -f /etc/logrotate.d/syslog" for the second time failed:
[root@hp-z600-04 mnt]# logrotate -f /etc/logrotate.d/syslog 
[root@hp-z600-04 mnt]# logrotate -f /etc/logrotate.d/syslog 
error: stat of /var/log/cron failed: No such file or directory
error: stat of /var/log/maillog failed: No such file or directory
error: stat of /var/log/secure failed: No such file or directory
error: stat of /var/log/spooler failed: No such file or directory

so the /var/log/message was logroated failed.


Version-Release number of selected component (if applicable):
rhev-hypervisor6-6.6-20150112.0
ovirt-node-3.1.0-0.42.20150109gitd06b7c5.el6.noarch

How reproducible:
100%

Steps to Reproduce:

Actual results:


Expected results:

Additional info:
[root@dhcp-10-54 admin]# cat /etc/logrotate.d/syslog 
/var/log/cron
/var/log/maillog
/var/log/messages
/var/log/secure
/var/log/spooler
{
    sharedscripts
    rotate 5
    size 15M
    compress
    postrotate
        /bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
    endscript
}

Comment 1 Fabian Deutsch 2015-01-14 12:00:47 UTC
The effect is that with tthose errors in place, also other log files (like messages) are not rotated.

Comment 2 Yaniv Lavi 2015-01-14 13:53:43 UTC
Small fix and low risk. I understand this can be included in RC without delaying it, so setting this a RC target.

Comment 4 haiyang,dong 2015-01-20 05:27:52 UTC
Test version:
rhev-hypervisor6-6.6-20150119.0.1.iso
ovirt-node-3.2.1-5.el6.noarch

Test steps:
1. [root@dhcp-66-73-174 log]# ls -al messages 
-rw-------. 1 root root 76482 2015-01-20 05:07 messages

2. [root@dhcp-66-73-174 log]# cat /etc/logrotate.d/syslog 
/var/log/cron
/var/log/maillog
/var/log/messages
/var/log/secure
/var/log/spooler
{
    sharedscripts
    rotate 5
    size 15M
    compress
    missingok
    postrotate
	/bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
    endscript
}
              
3. [root@dhcp-66-73-174 log]# logrotate -f /etc/logrotate.d/syslog 

4. [root@dhcp-66-73-174 log]# ls -al messages
-rw-------. 1 root root 148 2015-01-20 05:08 messages

5. [root@dhcp-66-73-174 log]# dd if=/dev/zero of=messages bs=1M count=100
100+0 records in
100+0 records out
104857600 bytes (105 MB) copied, 4.44515 s, 23.6 MB/s

6. [root@dhcp-66-73-174 log]# ls -al messages
-rw-------. 1 root root 104857600 2015-01-20 05:09 messages

7. [root@dhcp-66-73-174 log]# logrotate -f /etc/logrotate.d/syslog 

8. [root@dhcp-66-73-174 log]# ls -al messages
-rw-------. 1 root root 148 2015-01-20 05:09 messages

Test result:
Executed "logrotate -f /etc/logrotate.d/syslog" for the second time successfully, also the /var/log/message was logroated.

so this bug has been fixed, after the status changed into "ON_QA", I will verify this bug.

Comment 6 haiyang,dong 2015-01-28 11:25:51 UTC
According to Comment 4, changed the status into "VERIFIED".

Comment 8 errata-xmlrpc 2015-02-11 21:08:09 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHEA-2015-0160.html


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