empty logfiles in /var/log/nova/ after logrotating with logrotated

Bug #721141 reported by Christian Berendt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Soren Hansen

Bug Description

We're using the following logrotate script to archive the nova logfiles. Problem is, that nova doesn't write logdata after rotating the logfiles. A restart of the service is required. Please fix the logging of the nova services in the way that it's possible to archive the logfiles and to touch a new logfile.

/etc/logrotate.d/openstack-nova:
/var/log/nova/* {
    daily
    missingok
    postrotate
}

total 3784
-rw-r--r-- 1 root root 0 2011-02-17 20:00 api.log
-rw-r--r-- 1 root root 1004231 2011-02-16 20:00 api.log-20110216.bz2
-rw-r--r-- 1 root root 2644557 2011-02-17 20:01 api.log-20110217.bz2
-rw-r--r-- 1 root root 0 2011-02-17 20:01 compute.log
-rw-r--r-- 1 root root 94085 2011-02-16 20:00 compute.log-20110216.bz2
-rw-r--r-- 1 root root 49830 2011-02-17 20:01 compute.log-20110217.bz2
-rw-r--r-- 1 root root 12011 2011-02-18 07:58 network.log
-rw-r--r-- 1 root root 4806 2011-02-16 20:00 network.log-20110216.bz2
-rw-r--r-- 1 root root 3682 2011-02-17 20:01 network.log-20110217.bz2
-rw-r--r-- 1 root root 0 2011-02-17 20:01 objectstore.log
-rw-r--r-- 1 root root 10198 2011-02-16 20:00 objectstore.log-20110216.bz2
-rw-r--r-- 1 root root 7769 2011-02-17 20:01 objectstore.log-20110217.bz2
-rw-r--r-- 1 root root 0 2011-02-17 20:01 scheduler.log
-rw-r--r-- 1 root root 3262 2011-02-16 20:00 scheduler.log-20110216.bz2
-rw-r--r-- 1 root root 4767 2011-02-17 20:01 scheduler.log-20110217.bz2

Related branches

summary: - empty logfiles in /var/log/nova/ after integrated logrotating
+ empty logfiles in /var/log/nova/ after logrotating with logrotated
Soren Hansen (soren)
Changed in nova:
assignee: nobody → Soren Hansen (soren)
Soren Hansen (soren)
Changed in nova:
status: New → In Progress
Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → 2011.2
status: Fix Committed → Fix Released
Revision history for this message
Bernhard M. Wiedemann (ubuntubmw) wrote :

note that the logrotate entry in top post has a serious flaw.
instead of
/var/log/nova/*
it should read
/var/log/nova/*.log

otherwise, logrotate will create backups of backups, filling up the disk at exponential growth with millions of zero-sized files.

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.