]> git.proxmox.com Git - qemu-server.git/commit
add unix socket support for NBD storage migration
authorMira Limbeck <m.limbeck@proxmox.com>
Tue, 17 Mar 2020 19:56:12 +0000 (20:56 +0100)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Wed, 18 Mar 2020 07:03:44 +0000 (08:03 +0100)
commit7827de41a262071dbad2ad7dc57efa238bce4fc2
treee4788e38d711d29a72df244d11aecb04bc23b79b
parentc4ac8f713caa54ae94b3ca3d22d98ca2ef62e669
add unix socket support for NBD storage migration

The reuse of the tunnel, which we're opening to communicate with the target
node and to forward the unix socket for the state migration, for the NBD unix
socket requires adding support for an array of sockets to forward, not just a
single one. We also have to change the $sock_addr variable to an array
for the cleanup of the socket file as SSH does not remove the file.

To communicate to the target node the support of unix sockets for NBD
storage migration, we're specifying an nbd_protocol_version which is set
to 1. This version is then passed to the target node via STDIN. Because
we don't want to be dependent on the order of arguments being passed
via STDIN, we also prefix the spice ticket with 'spice_ticket: '. The
target side handles both the spice ticket and the nbd protocol version
with a fallback for old source nodes passing the spice ticket without a
prefix.
All arguments are line based and require a newline in between.

When the NBD server on the target node is started with a unix socket, we
get a different line containing all the information required to start
the drive-mirror. This contains the unix socket path used on the target node
which we require for forwarding and cleanup.

Signed-off-by: Mira Limbeck <m.limbeck@proxmox.com>
PVE/QemuMigrate.pm