]> git.proxmox.com Git - pve-guest-common.git/commit
fix #1694: make failure of snapshot removal non-fatal
authorWolfgang Link <w.link@proxmox.com>
Fri, 13 Apr 2018 10:24:39 +0000 (12:24 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Mon, 16 Apr 2018 08:40:48 +0000 (10:40 +0200)
commitce22af089584b8e1add8c27dcac496b8cbbaa8e5
treee4d62fa51abcdefef0a7db321ddf0f8d19af1f8c
parentc8a71da5ce9c4ca1962b14879008ba53ca87796e
fix #1694: make failure of snapshot removal non-fatal

In certain high-load scenarios ANY ZFS operation can block,
including registering an (async) destroy.
Since ZFS operations are implemented via ioctl's,
killing the user space process
does not affect the waiting kernel thread processing the ioctl.

Once "zfs destroy" has been called, killing it does not say anything
about whether the destroy operation will be aborted or not.
Since running into a timeout effectively means killing it,
we don't know whether the snapshot exists afterwards or not.
We also don't know how long it takes for ZFS to catch up on pending ioctls.

Given the above problem, we must to not die on errors when deleting a no
longer needed snapshot fails (under a timeout) after an otherwise
successful replication. Since we retry on the next run anyway, this is
not problematic.

The snapshot deletion error will be logged in the replication log
and the syslog/journal.
PVE/Replication.pm