5
0
mirror of git://git.proxmox.com/git/qemu-server.git synced 2025-01-22 22:03:55 +03:00

Add a migration lock to avoid a replication on rollback-time.

This commit is contained in:
Wolfgang Link 2017-06-12 10:38:22 +02:00 committed by Dietmar Maurer
parent a183ab0d5f
commit c068c1c3a9

View File

@ -3394,7 +3394,12 @@ __PACKAGE__->register_method({
PVE::QemuConfig->snapshot_rollback($vmid, $snapname);
};
return $rpcenv->fork_worker('qmrollback', $vmid, $authuser, $realcmd);
my $worker = sub {
# hold migration lock, this makes sure that nobody create replication snapshots
return PVE::GuestHelpers::guest_migration_lock($vmid, 10, $realcmd);
};
return $rpcenv->fork_worker('qmrollback', $vmid, $authuser, $worker);
}});
__PACKAGE__->register_method({