Polish logrotate configuration

Bug #1450039 reported by Bartłomiej Piotrowski
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Committed
High
Bartłomiej Piotrowski
6.0.x
Won't Fix
High
Alexey Stupnikov

Bug Description

This bug is continuation of https://bugs.launchpad.net/fuel/+bug/1382515 .

1. Logrotate needs to be configured to skip our configuration file when running daily schedule. This can be achieved by 'tabooext + .ignoredaily' + conf file rename.
2. We should use 'su root syslog' on Ubuntu to prevent https://bugs.launchpad.net/ubuntu/+source/logrotate/+bug/1278193
3. On Ubuntu additional directory, /var/log/upstart/, exists. Files put there aren't covered by our logrotate configuration. We can also tell upstart to stop logging there: https://wiki.ubuntu.com/PrecisePangolin/ReleaseNotes/TechnicalOverviewUpstart#console_log
4. Additionally logrotate can take even 45 minutes for rotation and compression. Only few files on controller nodes grow significantly faster, but it seems pointless to create separate config just for them.
5. Our custom script is put in the wrong directory, as seen here:

<75>Apr 29 02:58:01 node-1 cron[7074]: Error: bad minute; while reading /etc/cron.d/fuel-logrotate
<78>Apr 29 02:58:01 node-1 cron[7074]: (*system*fuel-logrotate) ERROR (Syntax error, this crontab file will be ignored

Revision history for this message
Alexander Bozhenko (alexbozhenko) wrote :

Bartlomiej, thank you for creating this bug.

I think Importance should be set to critical, and milestone to 6.1:
We can't afford to ship partially-working logrotate.

Changed in fuel:
status: Triaged → In Progress
Changed in fuel:
milestone: 7.0 → 6.1
importance: Medium → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-library (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-library (master)

Reviewed: https://review.openstack.org/180892
Committed: https://git.openstack.org/cgit/stackforge/fuel-library/commit/?id=86947bb9df42b7f3bd8625be456ffe2dafdc50ee
Submitter: Jenkins
Branch: master

commit 86947bb9df42b7f3bd8625be456ffe2dafdc50ee
Author: Bartłomiej Piotrowski <email address hidden>
Date: Thu May 7 08:03:50 2015 +0200

    Polish logrotate configuration

    * move custom logrotate scripts from anacron to openstack module
    * use tabooext to ensure there is no overlap between Fuel's cronjob and
      the daily one
    * run logrotate twice an hour
    * make sure that logs are saved as root:syslog due to bug in Ubuntu
      package[1]
    * fix path to logrotate configuration file in Fuel's logrotate wrapper

    [1] https://bugs.launchpad.net/ubuntu/+source/logrotate/+bug/1278193

    Change-Id: Id161e8074c7fe80d69eb831db74b844094f327e7
    Closes-Bug: 1450039
    Closes-Bug: 1450425
    Related-Bug: 1382515

Changed in fuel:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to fuel-library (stable/6.0)

Related fix proposed to branch: stable/6.0
Review: https://review.openstack.org/199026

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to fuel-library (stable/6.0)

Reviewed: https://review.openstack.org/199026
Committed: https://git.openstack.org/cgit/stackforge/fuel-library/commit/?id=cf13078c4fe492ea13a6698b8ed765bc1a2cdb82
Submitter: Jenkins
Branch: stable/6.0

commit cf13078c4fe492ea13a6698b8ed765bc1a2cdb82
Author: Bartłomiej Piotrowski <email address hidden>
Date: Tue Jul 7 11:12:53 2015 +0200

    Backport logrotate changes from 6.1

    * use tabooext to ensure no overlap between Fuel's cron job and the
      system one
    * run logrotate twice an hour
    * merge weekly and daily configuration files
    * rotate logs basing on two criteria: age and size
    * use dateformat to make rotated logs' filename more readable
    * enable delayed compression to avoid race condition between
      fuel-logrotate and regular logrotate
    * combine CentOS and Ubuntu logrotate wrappers to a single file

    Related-Bug: 1382515
    Related-Bug: 1450039
    Related-Bug: 1461400
    Closes-Bug: 1472179
    Change-Id: I58caf3c93943af818a03e07d534ff8c42a63d2cb

Revision history for this message
Andrew Woodward (xarses) wrote :

Customer found on 6.0

Roman Rufanov (rrufanov)
tags: added: customer-found
tags: added: support
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to fuel-library (stable/5.1)

Related fix proposed to branch: stable/5.1
Review: https://review.openstack.org/263639

Revision history for this message
Alexey Stupnikov (astupnikov) wrote :

I have set this bug's status to 'Won't Fix' since we do not deploy new MOS 6.0 environments and we haven't got update mechanism and procedures to deliver puppet updates to existing MOS 6.0 installations.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on fuel-library (stable/5.1)

Change abandoned by Tony Breeds (<email address hidden>) on branch: stable/5.1
Review: https://review.openstack.org/263639
Reason: This branch (stable/5.1) is at End Of Life

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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