[pve-devel] VM locked after failed Snapshot
Stefan Priebe - Profihost AG
s.priebe at profihost.ag
Mon Sep 8 12:06:48 CEST 2014
Hi,
today i had the following problem.
1.) i wanted to create a snapshot of a vm
2.) it failed for unknown reason and i had the following output (PVE
Webgui):
image has watchers - not removing
Removing image: 0% complete...failed.
rbd: error: image still has watchers
TASK ERROR: received interrupt
3.) The VM was than in a locked state (VM is locked (snapshot))
I see multiple problems here.
1.) lock state should be removed by PVE in case of a failure.
Currently snapshot_create calls snapshot_prepare to set the lock. And at
the end snapshot_commit deletes the log.
But currently in case of $err
if ($err) {
warn "snapshot create failed: starting cleanup\n";
eval { snapshot_delete($vmid, $snapname, 0, $drivehash); };
warn $@ if $@;
die $err;
}
The lock isn't removed.
What is the correct way to remove a lock in this case?
2.) in case of an unexpected failure or signal ceph/rbd does not remove
it's watcher from the image. So the snapshot_delete failed in this case.
Output:
image has watchers - not removing
Removing image: 0% complete...failed.
rbd: error: image still has watchers
rbd has an automatic timeout after 30s should PVE handle this by waiting
30s and try it again?
Greets,
Stefan
More information about the pve-devel
mailing list