]> git.proxmox.com Git - qemu-server.git/commit
fix #4501: TCP migration: start vm: move port reservation and usage closer together
authorFiona Ebner <f.ebner@proxmox.com>
Tue, 19 Dec 2023 13:44:59 +0000 (14:44 +0100)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Wed, 3 Jan 2024 10:31:53 +0000 (11:31 +0100)
commit498d7da470671dd05f569b2a9a8fd01ef544c055
tree1b0579cfd68253799dc8cb06f0e5e457526a0a60
parent2f2da052170604ae573c68ac767ee4ce88ba704b
fix #4501: TCP migration: start vm: move port reservation and usage closer together

Currently, volume activation, PCI reservation and resetting systemd
scope happen in between, so the 5 second expiretime used for port
reservation is not always enough.

It's possible to defer telling QEMU where it should listen for
migration and do so after it has been started via QMP. Therefore, the
port reservation can be moved very close to the actual usage.

Mentioned here for completeness and can still be done as an additional
change later if desired: next_migrate_port could be modified to
optionally return the open socket and it should be possible to pass
the file descriptor directly to QEMU, but that would require accepting
the connection before on the Perl side (otherwise leads to ENOTCONN
107). While it would avoid any races, it's not the most elegant
and the change at hand should be enough in all practical situations.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
Acked-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Tested-by: Hannes Duerr <h.duerr@proxmox.com>
PVE/QemuServer.pm