This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1311053 - core dumps in /var/log/core cannot be rotated.
core dumps in /var/log/core cannot be rotated.
Status: CLOSED DUPLICATE of bug 1265547
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: rhev-hypervisor (Show other bugs)
3.6.0
Unspecified Unspecified
high Severity medium
: ovirt-3.6.6
: ---
Assigned To: Douglas Schilling Landgraf
Huijuan Zhao
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-02-23 04:33 EST by Olimp Bockowski
Modified: 2016-04-11 15:37 EDT (History)
14 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-04-11 15:37:01 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Node
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Olimp Bockowski 2016-02-23 04:33:09 EST
Description of problem:
There is problem to rotate core dumps in /var/lo/core 

Version-Release number of selected component (if applicable):
RHEV-H 7.2

How reproducible:

every time

Steps to Reproduce:
1. create dumps
2. change rules in  /etc/vdsm/logrotate/vdsm (for example size)
3. /usr/sbin/logrotate --debug --force /etc/vdsm/logrotate/vdsm

Actual results:

error: error opening /var/log/core/core.13731.1455545439.dump: Permission denied


Expected results:

rotates

Additional info:
/etc/vdsm/logrotate/vdsm has additional line:     
su vdsm kvm

core dumps belongs to root
apart from that /var/log/core/ directory has sticky bit
even removing 'su vdsm kvm' gives error:
error: skipping "/var/log/core/core.26068.1455800265.dump" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.

the other question what is the purpose to rotate core dumps, different names
Comment 2 Huijuan Zhao 2016-03-09 05:19:31 EST
Reproduced this bug in RHEV-H 7.2-20160219.0.el7ev.

Test version:
RHEV-H 7.2-20160219.0.el7ev
ovirt-node-3.2.3-31.el7.noarch

Test steps:
1. Install RHEV-H 7.2-20160219.0.el7ev
2. Drop to Rescue:
   #echo c > /proc/sysrq-trigger
3. Create dumps in step2, rename dumps:
   #cp /var/log/core/127.0.0.1-2016-03-09-09:27:40/vmcore /var/log/core/core.13731.1455545439.dump
4. change rules in  /etc/vdsm/logrotate/vdsm (changed size)
5. #/usr/sbin/logrotate --debug --force /etc/vdsm/logrotate/vdsm


Actual results:
error: error opening /var/log/core/core.13731.1455545439.dump: Permission denied


Additional info:
/etc/vdsm/logrotate/vdsm has additional line:     
su vdsm kvm

core dumps belongs to root
removing 'su vdsm kvm' from /etc/vdsm/logrotate/vdsm, 
#/usr/sbin/logrotate --debug --force /etc/vdsm/logrotate/vdsm
gives error:
error: skipping "/var/log/core/core.13731.1455545439.dump" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.


Olimp, are my test steps right?
Comment 4 Douglas Schilling Landgraf 2016-04-11 15:37:01 EDT
Hi,

This report is a dup of bz#1265547. If you would like to test the fix in this specific version of rhev-h change qemu kvm user/group in /etc/vdsm/logrotate to root root:

/var/log/core/*.dump
    <snip>
    su root root 
    </snip>

Additionally, recent rhev-h builds should contain such fix.

*** This bug has been marked as a duplicate of bug 1265547 ***

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