cron errors: grep: /etc/libvirt/qemu/*.xml: No such file or directory

Bug #457607 reported by Loïc Minier
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
libvirt (Ubuntu)
Fix Released
Medium
Jamie Strandboge

Bug Description

Hi

I got a mail from cron this night:
/etc/cron.daily/libvirt-bin:
grep: /etc/libvirt/qemu/*.xml: No such file or directory

Looking at /etc/cron.daily/libvirt-bin:

for i in /etc/libvirt/qemu/*.xml ; do
    uuid=`grep '<uuid>' "$i" | sed 's#.*<uuid>\(.*\)</uuid>.*#\1#'`
    uuids="$uuids $uuid"
done

I can reproduce with:
sh -c 'for i in /etc/foo*bar; do echo $i; done'
/etc/foo*bar

Proposed change, add a backtick expansion and call ls; i.e.:
for i in `ls /etc/libvirt/qemu/*.xml 2>/dev/null`; do

Note that this continues execution even in set -e mode:
sh -c 'set -e; for i in `ls /etc/foo*bar 2>/dev/null`; do echo $i; done; echo true'

Thanks,

ProblemType: Bug
Architecture: amd64
Date: Wed Oct 21 22:21:58 2009
DistroRelease: Ubuntu 9.10
Package: libvirt-bin 0.7.0-1ubuntu12
ProcEnviron:
 SHELL=/bin/zsh
 PATH=(custom, user)
 LANG=fr_FR.UTF-8
ProcVersionSignature: Ubuntu 2.6.31-11.38-generic
SourcePackage: libvirt
Uname: Linux 2.6.31-11-generic x86_64

Related branches

Revision history for this message
Loïc Minier (lool) wrote :
Changed in libvirt (Ubuntu):
assignee: nobody → Jamie Strandboge (jdstrand)
importance: Undecided → Medium
milestone: none → karmic-updates
status: New → Triaged
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Assuming a more pending update to libvirt doesn't come up which I can piggback this on, I'll do an SRU for this.

Changed in libvirt (Ubuntu):
status: Triaged → In Progress
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

In retrospect, this could be a nuisance for users and I have included the fix for this along with bug #457716. Subscribing ubuntu-release.

Changed in libvirt (Ubuntu):
milestone: karmic-updates → ubuntu-9.10
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libvirt - 0.7.0-1ubuntu13

---------------
libvirt (0.7.0-1ubuntu13) karmic; urgency=low

  * allow save/restore to work in $HOME. This is a workaround until upstream
    https://bugzilla.redhat.com/show_bug.cgi?id=529363 is fixed. (LP: #457716)
  * debian/libvirt-bin.cron.daily: don't comlain if no domain XML definitions
    or domain AppArmor profiles. Based on work by Loïc Minier. (LP: #457607)

 -- Jamie Strandboge <email address hidden> Fri, 23 Oct 2009 03:52:33 -0500

Changed in libvirt (Ubuntu):
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.