Repro:
$ sudo mkdir /var/test
$ echo "/var/test /var/lib/libvirt/qemu/save none    bind            0 0" | 
sudo tee -a /etc/fstab
$ sudo sed -i -e 's/#ON_SHUTDOWN=shutdown/ON_SHUTDOWN=suspend/' 
/etc/default/libvirt-guests
$ sudo sed -i -e 's/#ON_BOOT=ignore/ON_BOOT=start/' /etc/default/libvirt-guests
$ sudo reboot
$ uvt-simplestreams-libvirt --verbose sync --source 
http://cloud-images.ubuntu.com/daily arch=amd64 label=daily release=eoan
$ uvt-kvm create --password ubuntu eoan arch=amd64 release=eoan label=daily

It seemed rather clear from the report, but I wanted to try myself.
First I tried with a bind mount as shown above as that would make the setup 
even simpler (doesn't need an extra disk).

But I found that this works.
[  226.602702] libvirt-guests.sh[1727]: Running guests on default URI: eoan
[  226.667247] libvirt-guests.sh[1727]: Suspending guests on default URI...
[  226.696513] libvirt-guests.sh[1727]: Suspending eoan: ...
[  242.906340] libvirt-guests.sh[1727]: Suspending eoan: 66.909 MiB
[  243.910964] libvirt-guests.sh[1727]: Suspending eoan: done
...
[  OK  ] Stopped target Local File Systems.

And the shutdown took quite a few seconds, so on shutdown the ordering was not 
an issue.
Note: Even worked after I changed it to use an extra disk.

This is due to:
libvirt-guests.service
  After=libvirtd.service
which again is:
  After=local-fs.target

So this actually works fine on shutdown and restart for me.
Ordering seems correct.

I retried it a few times but it worked every time - the ordering was
strict.

@Erlend - could you show the journal content of e.g. the failing 
shutdown&startup.
It really should always be:
boot: local-fs.target -> libvirtd.service -> libvirt-guests.service
 => the FS should be up when needed.
shutdown: libvirt-guests.service -> libvirtd.service -> local-fs.target
 => the FS should go down after no more being needed

** Changed in: libvirt (Ubuntu)
       Status: New => Incomplete

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

Title:
  during shutdown libvirt-guests gets stopped after file system unmount

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

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to