| Summary: | playbook should configure logrotate on containerized env | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Ma xiaoqiang <xiama> |
| Component: | Installer | Assignee: | Andrew Butcher <abutcher> |
| Status: | CLOSED ERRATA | QA Contact: | Ma xiaoqiang <xiama> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 3.1.0 | CC: | abutcher, aos-bugs, bleanhar, jokerman, mmccomas, xtian |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-05-12 16:37:32 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
|
Description
Ma xiaoqiang
2016-01-18 07:03:11 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. 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
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 |