]> git.proxmox.com Git - pve-guest-common.git/commit - src/PVE/Replication.pm
replication: prepare: safeguard against removal if expected snapshot is missing
authorFiona Ebner <f.ebner@proxmox.com>
Mon, 13 Jun 2022 10:29:59 +0000 (12:29 +0200)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Tue, 2 Aug 2022 09:05:52 +0000 (11:05 +0200)
commitc0b29481e40c0595ef343ee7a0b7581ecb597a07
treec76c6473b4580b048a1ba462792c83429fe06286
parent1e6416f1725c691cd2a37dd5f86d901fbcf4a0b0
replication: prepare: safeguard against removal if expected snapshot is missing

Such a check would also have prevented the issue in 1aa4d84
("ReplicationState: purge state from non local vms") and other
scenarios where state and disk state are inconsistent with regard to
the last_sync snapshot.

AFAICT, all existing callers intending to remove all snapshots use
last_sync=1 so chaning the behavior for other (non-zero) values should
be fine.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
src/PVE/Replication.pm