logrotate is broken on non-controller nodes

Bug #1278549 reported by Dmitry Borodaenko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Released
High
Fuel QA Team

Bug Description

In openstack/templates/20-fuel.conf.erb, corosync.log and other controller-specific log files are unconditionally specificed for all node types since this commit:

https://github.com/stackforge/fuel-library/commit/e20d6cf086fd99f37d7808ecaaf9f308bedb3413

When such files do not exist (e.g. on a compute node), logrotate cronjob fails and leaves log files in an unusable state. For example, /var/log/nova-all.log.2 exists, but /var/log/nova-all.log isn't created and nova ends up unable to log locally.

Revision history for this message
Dmitry Borodaenko (angdraug) wrote :

From logrotate changelog:

3.7.8 -> 3.7.9
        - fix building on Solaris (patch by András Szilárd)
        - don't copy config files on the stack -- mmap them instead
          (fixes segfaults with too large/invalid config files)
        - symlinked conf file man page as requested by Fedora guidelines
          (thanks to Ivana Hutarova Varekova)
        - cron script logrotate.cron redirects output to /dev/null
        - added rotating (copying) non-writable, readable files
          (patch by Henrique Martins)
        - fixed missingok problem with globs
          (taken from the Debian patches by Ted Percival
           <email address hidden>)
        - fixed bug when log files could be removed even there was
          some error in rotation process.
        - allow setting size greater than 4.2GB in configuration file
        - pass currently rotated file to postrotate/prerotate script
          in nosharedscripts mode
        - added new TabooExts: ".disabled", ".dpkg-old", ".dpkg-dist",
          ".dpkg-new", ".cfsaved", ".ucf-old", ".ucf-dist", ".ucf-new"
          (taken from the Debian patches by Paul Martin <email address hidden>)
        - Don't change utime atime/mtime when compressing files
          (taken from the Debian patches by Paul Martin <email address hidden>)
        - Better *rotate scripts parser. (taken from the Debian patches)
        - Allow 'include' directive in log file definitions

We're using logrotate 3.7.8 on CentOS and Ubuntu, we should upgrade to the latest version 3.8.7.

description: updated
Revision history for this message
Bogdan Dobrelya (bogdando) wrote :

By design, the option missingok is intended to prevent such situations.
From man logrotate:
       missingok
              If the log file is missing, go on to the next one without issu-
              ing an error message. See also nomissingok.

Changed in fuel:
assignee: Fuel Library Team (fuel-library) → Bogdan Dobrelya (bogdando)
Revision history for this message
Bogdan Dobrelya (bogdando) wrote :

Rsyslog upgrade is required, indeed

Revision history for this message
Bogdan Dobrelya (bogdando) wrote :
Revision history for this message
Bogdan Dobrelya (bogdando) wrote :

Upgrade for logrotate is required, not for rsyslog - sorry for typo

Revision history for this message
Bogdan Dobrelya (bogdando) wrote :

Please check the upgraded packages:
Sergey Otpuschennikov added a comment - Today 2:18 PM
Packages has been built from changesets https://gerrit.mirantis.com/10123/ https://gerrit.mirantis.com/10125/
Binaries are available here:
http://osci-obs.vm.mirantis.net:82/centos-fuel-4.1-stable-10123/centos/
http://osci-obs.vm.mirantis.net:82/ubuntu-fuel-4.1-stable-10125/ubuntu/

I cannot reproduce the issue with logrotate 3.8.7

Changed in fuel:
assignee: Bogdan Dobrelya (bogdando) → Fuel QA Team (fuel-qa)
Revision history for this message
Nastya Urlapova (aurlapova) wrote :

After package upgrade logrotate works without errors.

Changed in fuel:
status: Triaged → Fix Committed
Revision history for this message
Nastya Urlapova (aurlapova) wrote :

{
build_id: "2014-03-03_01-17-30",
mirantis: "yes",
build_number: "228",
nailgun_sha: "ab432103b02529b6e0f8bf1c746e7228d4e9b10e",
ostf_sha: "16198b380883a722e0ee43f6dfdda187a9a1b2a7",
fuelmain_sha: "ba019bf15a9597a154e7c1d6ecc840614d21414c",
astute_sha: "f15f5615249c59c826ea05d26707f062c88db32a",
release: "4.1",
fuellib_sha: "61d3a150402da3ce1160836c8d659f6d9d1f9640"
}

Changed in fuel:
status: Fix Committed → Fix Released
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.