xenapi: console logrotate fails

Bug #1204440 reported by Mate Lakat
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Mate Lakat

Bug Description

tools/xenserver/rotate_xen_guest_logs.sh

fails if ran for the first time, because the files don't exist at that time.

[root@jaglan ~]# /root/consolelogrotate
+ log_dir=/var/log/xen/guest
+ kb=1024
+ max_size_bytes=1048576
+ truncated_size_bytes=5120
+ list_domains=/opt/xensource/bin/list_domains
+ log_file_base=/var/log/xen/guest/console.
+ tmp_file_base=/var/log/xen/guest/tmp.console.
+ xenstore-write /local/logconsole/@ /var/log/xen/guest/console.%d
++ /opt/xensource/bin/list_domains
++ sed '/^id*/d'
++ sed 's/|.*|.*$//g'
++ xargs
+ domains='0 3 36'
+ for i in '$domains'
+ log=/var/log/xen/guest/console.0
+ tmp=/var/log/xen/guest/tmp.console.0
+ mv /var/log/xen/guest/console.0 /var/log/xen/guest/tmp.console.0
mv: cannot stat `/var/log/xen/guest/console.0': No such file or directory
+ true
+ for i in '$domains'
+ log=/var/log/xen/guest/console.3
+ tmp=/var/log/xen/guest/tmp.console.3
+ mv /var/log/xen/guest/console.3 /var/log/xen/guest/tmp.console.3
mv: cannot stat `/var/log/xen/guest/console.3': No such file or directory
+ true
+ for i in '$domains'
+ log=/var/log/xen/guest/console.36
+ tmp=/var/log/xen/guest/tmp.console.36
+ mv /var/log/xen/guest/console.36 /var/log/xen/guest/tmp.console.36
mv: cannot stat `/var/log/xen/guest/console.36': No such file or directory
+ true
+ rm -f '/var/log/xen/guest/console.*'
++ /opt/xensource/bin/list_domains
++ sed '/^id*/d'
++ sed 's/|.*|.*$//g'
++ xargs
+ domains='0 3 36'
+ for i in '$domains'
+ log=/var/log/xen/guest/console.0
+ tmp=/var/log/xen/guest/tmp.console.0
++ stat -c%s /var/log/xen/guest/tmp.console.0
stat: cannot stat `/var/log/xen/guest/tmp.console.0': No such file or directory
+ size=

Tags: xenserver
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Changed in nova:
status: New → In Progress
Changed in nova:
importance: Undecided → Low
importance: Low → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/38441
Committed: http://github.com/openstack/nova/commit/f3af80fea6df600eb988443a27ad315ebc04f36e
Submitter: Jenkins
Branch: master

commit f3af80fea6df600eb988443a27ad315ebc04f36e
Author: Mate Lakat <email address hidden>
Date: Wed Jul 24 10:43:35 2013 +0100

    xenapi: Fix console rotate script

    First time run of the console rotate script failed, due to the fact that
    the logs did not exist at that time.

    Fixes bug 1204440

    Change-Id: I49b5569c1ba3349d911caace42685fa0f19a1f66

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → havana-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: havana-3 → 2013.2
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.