[pve-devel] [PATCH] migrate: unlink unix socket before starting migration
Thomas Lamprecht
t.lamprecht at proxmox.com
Fri Jun 3 15:59:15 CEST 2016
Just to be sure nobody else has (wrongfully) left that file here.
Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
PVE/QemuMigrate.pm | 1 +
PVE/QemuServer.pm | 5 ++++-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm
index 89c765b..baf7364 100644
--- a/PVE/QemuMigrate.pm
+++ b/PVE/QemuMigrate.pm
@@ -422,6 +422,7 @@ sub phase2 {
$self->log('info', "start remote tunnel");
if ($ruri =~ /^unix:/) {
+ unlink $raddr;
$self->{tunnel} = $self->fork_tunnel("$raddr:$raddr");
$self->{tunnel}->{sock_addr} = $raddr;
diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 8e76303..9b8110e 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -4306,7 +4306,10 @@ sub vm_start {
# should be default for secure migrations as a ssh TCP forward
# tunnel is not deterministic reliable ready and fails regurarly
# to set up in time, so use UNIX socket forwards
- $migrate_uri = "unix:/run/qemu-server/$vmid.migrate";
+ my $socket_addr = "/run/qemu-server/$vmid.migrate";
+ unlink $socket_addr;
+
+ $migrate_uri = "unix:$socket_addr";
push @$cmd, '-incoming', $migrate_uri;
push @$cmd, '-S';
--
2.1.4
More information about the pve-devel
mailing list