hopefully fixed crash when snapshotting failed
This commit is contained in:
parent
a22c2d35f7
commit
53ccab0f0a
@ -348,12 +348,14 @@ def main():
|
|||||||
["{}@{}".format(x, remote) for x in remote_fs[remote]],
|
["{}@{}".format(x, remote) for x in remote_fs[remote]],
|
||||||
remote_snapshots[remote],
|
remote_snapshots[remote],
|
||||||
config)
|
config)
|
||||||
except zsnaplib.ZFSSnapshotError:
|
except zsnaplib.ZFSSnapshotError as e:
|
||||||
if remote in remote_fs:
|
if remote in remote_fs:
|
||||||
del remote_fs[remote]
|
del remote_fs[remote]
|
||||||
if remote in remote_snapshots:
|
if remote in remote_snapshots:
|
||||||
del remote_snapshots[remote]
|
del remote_snapshots[remote]
|
||||||
log.warning("Failed to snapshot on {}".format(remote))
|
if remote in remotes:
|
||||||
|
del remotes[remote]
|
||||||
|
log.warning("Failed to snapshot on {}: {}".format(remote, e))
|
||||||
ret = RET_CODES['ERROR']
|
ret = RET_CODES['ERROR']
|
||||||
|
|
||||||
for remote, filesystems in failed_remote_snapshots.items():
|
for remote, filesystems in failed_remote_snapshots.items():
|
||||||
|
Loading…
Reference in New Issue
Block a user