Bug 1299331 - playbook should configure logrotate on containerized env
Summary: playbook should configure logrotate on containerized env
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 3.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: Andrew Butcher
QA Contact: Ma xiaoqiang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-01-18 07:03 UTC by Ma xiaoqiang
Modified: 2016-07-04 00:46 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-12 16:37:32 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1065 0 normal SHIPPED_LIVE Red Hat OpenShift Enterprise atomic-openshift-utils bug fix update 2016-05-12 20:32:56 UTC

Description Ma xiaoqiang 2016-01-18 07:03:11 UTC
Description of problem:
playbook should configure logrotate on containerized env


Version-Release number of selected component (if applicable):
openshift-ansible-3.0.33-1.git.0.bb1f8aa.el7aos.noarch

How reproducible:
always

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 21:52:21 UTC
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 05:06:02 UTC
Check on openshift-ansible -b master

1. install environment on rhel7 and atomic
#vim hosts
<--snip-->
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"}}]
<--[snip-->

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

/var/log/cron
/var/log/maillog
/var/log/messages
/var/log/secure
/var/log/spooler
 {
  daily
  rotate 7
  compress
  sharedscripts
  missingok
  postrotate
    /bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
  endscript
  }

Move this issue to VERIFIED

Comment 4 errata-xmlrpc 2016-05-12 16:37:32 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://access.redhat.com/errata/RHBA-2016:1065


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