Thank you very much for the response! I was able to do some more test, and 
something strange happened.
I made the changes to  /etc/init/libvirt-bin.conf and added some sort of 
"timeout":

ls -lh /dev/vg_default | logger -t libvirt-bin-start-script
for a_device in $LVM_DEVS_TO_CHECK ; do
    echo "Device $a_device" | logger -t libvirt-bin-start-script
    iter=0
    while [ ! -e $a_device -a $iter -lt 5 ]; do
        echo " + Not found: $a_device" | logger -t libvirt-bin-start-script
        ls -lh /dev/vg_default | logger -t libvirt-bin-start-script
        sleep 1s
        iter=$(( $iter + 1))
    done
done

One of the KVM guest didn't started. Searching in syslog, I found:

Nov 23 01:18:36 web4 kernel: [   33.760027] br1: port 1(eth1) entering 
forwarding state
Nov 23 01:18:38 web4 kernel: [   36.120089] br0: port 1(eth0) entering 
forwarding state
Nov 23 01:18:49 web4 ntpdate[1847]: no server suitable for synchronization found
Nov 23 01:21:20 web4 init: udevtrigger post-stop process (404) terminated with 
status 1
Nov 23 01:21:20 web4 libvirt-bin-start-script: .................. \
Nov 23 01:21:20 web4 libvirt-bin-start-script: .................. | output of 
"logger", with the contents of /dev/vg_default
Nov 23 01:21:20 web4 libvirt-bin-start-script: .................. /
Nov 23 01:21:21 web4 init: udev-fallback-graphics main process (2531) 
terminated with status 1
Nov 23 01:21:21 web4 init: plymouth-splash main process (2563) terminated with 
status 1
Nov 23 01:21:21 web4 udevd[366]: worker [393] unexpectedly returned with status 
0x0100
Nov 23 01:21:21 web4 udevd[366]: worker [393] failed while handling 
'/devices/virtual/block/dm-2'
Nov 23 01:21:21 web4 udevd[366]: worker [388] unexpectedly returned with status 
0x0100
Nov 23 01:21:21 web4 udevd[366]: worker [388] failed while handling 
'/devices/virtual/block/md1'
Nov 23 01:21:21 web4 libvirt-bin-start-script: ......................
Nov 23 01:21:24 web4 libvirt-bin-start-script: last message repeated 2 times
Nov 23 01:21:24 web4 udevd[366]: worker [376] unexpectedly returned with status 
0x0100
Nov 23 01:21:24 web4 udevd[366]: worker [376] failed while handling 
'/devices/virtual/block/dm-8'
Nov 23 01:21:25 web4 libvirt-bin-start-script: ......................
Nov 23 01:21:26 web4 libvirt-bin-start-script: ......................
Nov 23 01:21:26 web4 libvirt-bin-start-script: ......................

The output of "logger" show me that 4 logical volumes were missing, and after 
waiting for 20 seconds, the scripts continued, started libvirt and one of the 
guest didn't started up.
Those devices were missing on /dev/mapper/ an /dev/vg_default. But doing a 
"lvs" worked OK and the missing devices where shown. So, the devices where 
found and recognized by LVM, but the links are missing.

So, I've changed the script to wait for 120 seconds for each device and
rebooted. This time I got more time to see what's going on. Checking the
syslog I got the same errors of "udevtrigger" and "udevd". 4 devices
were missing again, so it took 8 minutes and then stop checking.

While this 8 minutes, the devices links didn't "appear". "lvs" list the
devices OK, but no link were on /dev. I know this happened because of
all the 'ls -lh /dev/vg_default' logged on syslog.

After the 8 minutes of waiting, the script continued running, the
libvirt started up and this time, all the guest started ok!!! I think
that the "libvirt-bin" was bloking some other process. When the
"libvirt-bin" finished (I think 'forked' and the upstart job finished),
the other processes could create the links just before the guest started
up!

I'm sorry to say that the workaround didn't work... Any further
information will be appreciated. If no better workaround exists, I'm
thinking in disabling the automatic start of libvirt, and maybe
configure some @reboot cron job to start manually, but I reaaaly dislike
this solution... But I need some way to ensure that ALL the guest start
up automatically!

Thanks again!

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/893450

Title:
  KVM guest fails to autostart sometimes with
  virSecurityDACRestoreSecurityFileLabel error

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/893450/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to