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:
parent
a183ab0d5f
commit
c068c1c3a9
@ -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({
|
||||
|
Loading…
x
Reference in New Issue
Block a user