Bug 1382600

Summary: [RHVH] vdsm logs not rotating
Product: Red Hat Enterprise Virtualization Manager Reporter: Marcus West <mwest>
Component: vdsmAssignee: Dan Kenigsberg <danken>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.0.3CC: bazulay, gklein, gveitmic, gwatson, jbelka, lsurette, srevivo, ycui, ykaul
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard: Node
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-10-11 09:38:09 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Node RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Marcus West 2016-10-07 07:02:18 UTC
## Description of problem:

vdsm.log is not being rotated.  This host is a day old and currently at 1.8Gb

## Version-Release number of selected component (if applicable):

vdsm-4.18.13-1.el7ev.x86_64
rhvh-4.0-0.20160919.0

## How reproducible:

seems to be always

## Steps to Reproduce:
1. update to latest rhvh (4.0
2. check if vdsm.log is rotation

## Actual results:

vdsm.log never rotates

## Expected results:

vdsm.log should rotate same as before (every 4 hours?)

## Additional info:

The logrotate config is there, but doesn't seem to be doing anything.  I noticed that crond.service is disabled by default.  Is this required, or are logs rotated differently now?

Comment 2 Jiri Belka 2016-10-07 12:03:03 UTC
It seems crond is not active on RHVH.

~~~
# systemctl status crond
● crond.service - Command Scheduler
   Loaded: loaded (/usr/lib/systemd/system/crond.service; disabled; vendor preset: disabled)
   Active: inactive (dead)
# cat /etc/os-release 
NAME="Red Hat Enterprise Linux"
VERSION="7.2"
VERSION_ID="7.2"
ID="rhel"
ID_LIKE="fedora"
VARIANT="Red Hat Virtualization Host"
VARIANT_ID="ovirt-node"
PRETTY_NAME="Red Hat Virtualization Host 4.0 (el7.2)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:7.2:GA:hypervisor"
HOME_URL="https://www.redhat.com/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"

# FIXME
REDHAT_BUGZILLA_PRODUCT="Red Hat Virtualization"
REDHAT_BUGZILLA_PRODUCT_VERSION=7.2
REDHAT_SUPPORT_PRODUCT="Red Hat Virtualization"
REDHAT_SUPPORT_PRODUCT_VERSION=7.2
# ls -l /etc/cron.hourly/vdsm-logrotate ; cat /etc/cron.d/0hourly
-rwxr-xr-x. 1 root root 477 Aug 10 19:48 /etc/cron.hourly/vdsm-logrotate
# Run the hourly jobs
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
01 * * * * root run-parts /etc/cron.hourly
# ls -lthr /var/log/vdsm/vdsm.log*
-rw-r--r--. 1 vdsm kvm 190M Oct  7 14:00 /var/log/vdsm/vdsm.log
[root@dell-r210ii-04 ~]# rpm -qf `which crond`
cronie-1.4.11-14.el7_2.1.x86_64
~~~

Comment 4 Dan Kenigsberg 2016-10-11 09:38:09 UTC

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