]> git.proxmox.com Git - pve-container.git/commit
partially fix #3424: vzdump: cleanup: wait for active replication
authorFabian Ebner <f.ebner@proxmox.com>
Wed, 23 Feb 2022 12:03:57 +0000 (13:03 +0100)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Tue, 15 Mar 2022 11:06:48 +0000 (12:06 +0100)
commit62850de8e16ba51619b1b8899ec7a559bc99deb7
treeaad4a28b0622f690ca8eb5a9f04be7baa99f7d5f
parenta66c8869c1d1808c91b4f275c1acf1cd3bdae49b
partially fix #3424: vzdump: cleanup: wait for active replication

As replication and backup can happen at the same time, the vzdump
snapshot might be actively used by replication when backup tries
to cleanup, resulting in a not (or only partially) removed snapshot
and locked (snapshot-delete) container.

Wait up to 10 minutes for any ongoing replication. If replication
doesn't finish in time, the fact that there is no attempt to remove
the snapshot means that there's no risk for the container to end up in
a locked state. And the beginning of the next backup will force remove
the left-over snapshot, which will very likely succeed even at the
storage layer, because the replication really should be done by then
(subsequent replications shouldn't matter as they don't need to
re-transfer the vzdump snapshot).

Suggested-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Co-developed-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
src/PVE/VZDump/LXC.pm