Bug 1299331 - playbook should configure logrotate on containerized env
playbook should configure logrotate on containerized env
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer (Show other bugs)
Unspecified Unspecified
unspecified Severity medium
: ---
: ---
Assigned To: Andrew Butcher
Ma xiaoqiang
Depends On:
  Show dependency treegraph
Reported: 2016-01-18 02:03 EST by Ma xiaoqiang
Modified: 2016-07-03 20:46 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-05-12 12:37:32 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1065 normal SHIPPED_LIVE Red Hat OpenShift Enterprise atomic-openshift-utils bug fix update 2016-05-12 16:32:56 EDT

  None (edit)
Description Ma xiaoqiang 2016-01-18 02:03:11 EST
Description of problem:
playbook should configure logrotate on containerized env

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

How reproducible:

Steps to Reproduce:
1. Install containerized environment on rhel7 or atomic with logrotate
this plugin is enable by default. 

2.check the logrotate package
rpm -q logrotate

Actual results:
The package is not installed on rhel

Expected results:
The package is installed on rhel. 

Additional info:
The package is installed on Atomic, so playbook should not skip configuring logrotate on containerized env
Comment 1 Andrew Butcher 2016-01-28 16:52:21 EST
Proposed fix: https://github.com/openshift/openshift-ansible/pull/1288

The "logrotate_scripts" inventory variable is not set by default so no logrotate scripts will be configured by default. An example "logrotate_scripts" has been added to the byo example inventories.

The logrotate role will be applied to RHEL and Atomic containerized environments.
Comment 2 Ma xiaoqiang 2016-01-29 00:06:02 EST
Check on openshift-ansible -b master

1. install environment on rhel7 and atomic
#vim hosts
logrotate_scripts=[{"name": "syslog", "path": "/var/log/cron\n/var/log/maillog\n/var/log/messages\n/var/log/secure\n/var/log/spooler\n", "options": ["daily", "rotate 7", "compress", "sharedscripts", "missingok"], "scripts": {"postrotate": "/bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true"}}]

ansible will configure logrotate by default.

# cat /etc/logrotate.d/syslog 
# Ansible managed: /home/slave10/workspace/Launch_Environment/workdir/BJ-113-f22-10-0/openshift-ansible/playbooks/common/openshift-node/roles/nickhammond.logrotate/templates/logrotate.d.j2 modified on 2016-01-29 03:08:24 by slave10 on host-192-168-0-188

  rotate 7
    /bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true

Move this issue to VERIFIED
Comment 4 errata-xmlrpc 2016-05-12 12:37:32 EDT
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.


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