Fiona Ebner <[email protected]> writes:

> Fixes bug #7092 as well as a regression [0] in combination with HA
> shutdown policy 'migrate' caused by commit 1f2c5146 ("migrate: remove
> left-over dbus-vmstate instance when migrating without conntrack
> state"). Currently, the HA migrations do not migrate the conntrack
> state and before this patch, the dbus.service is stopped too early
> during shutdown, before the LRM migrations. This led to failure when
> trying to check for a left-over dbus-vmstate instance, because
> the Net::DBus->system() call would fail.
>
> It is not enough to record the After=dbus.service dependency, because
> systemd would already stop the vmid.scope even while processes in it
> are still running. Add a Before=pve-ha-lrm.service and for consistency
> Before=pve-guests.service to record the ordering on shutdown. This
> ensures that the scope units are still around until the LRM or guests
> service had the chance to stop, and usually, handle the remaining
> running guests itself.
>
> Also guard more errors in qemu_del_dbus_vmstate().
>
> Many thanks to Maximiliano and Fabian for discussing the issue and
> solutions!
>
> [0]: https://forum.proxmox.com/threads/169739/post-825256
>
>
> Dependency bump qemu-server -> libpve-common-perl needed!

Thanks for working on this!

This series fixes the issue described at 7092 and the forum thread.

My testing setup is:
 - Create a 2 node cluster
 - Set shutdown policy to migrate
 - Create VM on node 1
 - Start the VM
 - Add the VM to the HA resources
 - Run `$ shutdown now` from node 1

and with this patch the migration succeeds without warnings and the node
is able to properly shut down.

Tested-by: Maximiliano Sandoval <[email protected]>

-- 
Maximiliano


_______________________________________________
pve-devel mailing list
[email protected]
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to