Logs aren't rotated on bootstraped nodes

Bug #1364083 reported by Artem Panchenko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Committed
High
Matthew Mosesohn

Bug Description

[root@nailgun ~]# fuel --f
api: '1.0'
astute_sha: bc60b7d027ab244039f48c505ac52ab8eb0a990c
auth_required: true
build_id: 2014-09-01_00-01-17
build_number: '491'
feature_groups:
- mirantis
fuellib_sha: 2cfa83119ae90b13a5bac6a844bdadfaf5aeb13f
fuelmain_sha: 109812be3425408dd7be192b5debf109cb1edd4c
nailgun_sha: d25ed02948a8be773e2bd87cfe583ef7be866bb2
ostf_sha: 4dcd99cc4bfa19f52d4b87ed321eb84ff03844da
production: docker
release: '5.1'

I discovered that sys logs on bootsraped nodes aren't rotated by logrotate due to wrong permissions of configuration files:

[root@bootstrap ~]# /usr/sbin/logrotate -d /etc/logrotate.conf
reading config file /etc/logrotate.conf
including /etc/logrotate.d
Ignoring syslog because the file owner is wrong (should be root).

[root@bootstrap ~]# ls -la /etc/logrotate.d/syslog
-rw-r--r-- 1 1000 1000 673 2014-05-27 01:52 /etc/logrotate.d/syslog

So when node is in discovered state for a long time logs could occupy all RAM memory (on my env after 4 days mesagess log was >1GB) or greatly increase the size of diagnostic snapshot. After executing 'chown 0:0 /etc/logrotate.d/syslog' logs rotation works correctly.

Tags: library
Mike Scherbakov (mihgen)
Changed in fuel:
importance: High → Critical
status: New → Confirmed
Changed in fuel:
assignee: Fuel Library Team (fuel-library) → Stanislaw Bogatkin (sbogatkin)
Changed in fuel:
importance: Critical → High
Changed in fuel:
assignee: Stanislaw Bogatkin (sbogatkin) → Matthew Mosesohn (raytrac3r)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-main (master)

Fix proposed to branch: master
Review: https://review.openstack.org/118376

Changed in fuel:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-main (master)

Reviewed: https://review.openstack.org/118376
Committed: https://git.openstack.org/cgit/stackforge/fuel-main/commit/?id=0574e02fec1ed0fa5fa4e4c157df28abe3612286
Submitter: Jenkins
Branch: master

commit 0574e02fec1ed0fa5fa4e4c157df28abe3612286
Author: Matthew Mosesohn <email address hidden>
Date: Tue Sep 2 19:03:12 2014 +0400

    Create files in bootstrap as owner root

    Logrotate will not work if its config is
    owned by non-root user.

    Change-Id: I12fcf970f3e843e92215b19ab651af4dd8a5e48e
    Closes-Bug: #1364083

Changed in fuel:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.