oetiker / znapzend

zfs backup with remote capabilities and mbuffer integration.
www.znapzend.org
GNU General Public License v3.0
607 stars 137 forks source link

Can not abort cleanup of snapshots by policy with SIGINT (interactively with Ctrl+C)... can with SIGTERM though... #504

Closed jimklimov closed 3 years ago

jimklimov commented 4 years ago

While experimenting, I wanted to send snapshots to destination and see what happens with different code in-vivo, but not to clean up the source. And I forgot the nodestroy mode. So then I saw my znapzend removing stuff, and Ctrl+C'ed it... and nothing:

# zfs destroy -r nvpool/ROOT/hipster_2019.10-20200127T101549Z@znapzend-auto-2020-04-23T16:00:00Z
# zfs destroy -r nvpool/ROOT/hipster_2019.10-20200127T101549Z@znapzend-auto-2020-04-23T16:30:00Z
^C[2020-07-31 13:22:09.96431] [1387] [debug] SIGINT received.
[2020-07-31 13:22:09.96448] [1387] [info] terminating znapzend (PID=1387) ...
^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C# zfs destroy -r nvpool/ROOT/hipster_2019.10-20200127T101549Z@znapzend-auto-2020-04-23T17:00:00Z

^C^C^C^C^C

# zfs destroy -r nvpool/ROOT/hipster_2019.10-20200127T101549Z@znapzend-auto-2020-04-23T17:30:00Z
^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C# zfs destroy -r nvpool/ROOT/hipster_2019.10-20200127T101549Z@znapzend-auto-2020-04-23T18:00:00Z
^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^Ccc# zfs destroy -r nvpool/ROOT/hipster_2019.10-20200127T101549Z@znapzend-auto-2020-04-23T18:30:00Z
^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C# zfs destroy -r nvpool/ROOT/hipster_2019.10-20200127T101549Z@znapzend-auto-2020-04-23T19:00:00Z
# zfs destroy -r nvpool/ROOT/hipster_2019.10-20200127T101549Z@znapzend-auto-2020-04-23T19:30:00Z
# zfs destroy -r nvpool/ROOT/hipster_2019.10-20200127T101549Z@znapzend-auto-2020-04-23T20:00:00Z
# zfs destroy -r nvpool/ROOT/hipster_2019.10-20200127T101549Z@znapzend-auto-2020-04-23T20:30:00Z
# zfs destroy -r nvpool/ROOT/hipster_2019.10-20200127T101549Z@znapzend-auto-2020-04-23T21:00:00Z
# zfs destroy -r nvpool/ROOT/hipster_2019.10-20200127T101549Z@znapzend-auto-2020-04-23T21:30:00Z
# zfs destroy -r nvpool/ROOT/hipster_2019.10-20200127T101549Z@znapzend-auto-2020-04-23T22:00:00Z
# zfs destroy -r nvpool/ROOT/hipster_2019.10-20200127T101549Z@znapzend-auto-2020-04-23T22:30:00Z

^C^C^C^C^C

# zfs destroy -r nvpool/ROOT/hipster_2019.10-20200127T101549Z@znapzend-auto-2020-04-23T23:00:00Z
# zfs destroy -r nvpool/ROOT/hipster_2019.10-20200127T101549Z@znapzend-auto-2020-04-23T23:30:00Z
# zfs destroy -r nvpool/ROOT/hipster_2019.10-20200127T101549Z@znapzend-auto-2020-04-24T00:00:00Z
# zfs destroy -r nvpool/ROOT/hipster_2019.10-20200127T101549Z@znapzend-auto-2020-04-24T00:30:00Z
# zfs destroy -r nvpool/ROOT/hipster_2019.10-20200127T101549Z@znapzend-auto-2020-04-24T01:00:00Z

Eventually I did a kill -15 from another terminal and that worked:

# zfs destroy -r nvpool/ROOT/hipster_2019.10-20200127T101549Z@znapzend-auto-2020-04-24T01:30:00Z
[2020-07-31 13:23:10.35711] [1387] [debug] SIGTERM received.
[2020-07-31 13:23:10.35725] [1387] [info] terminating znapzend (PID=1387) ...
[2020-07-31 13:23:10.35767] [1403] [debug] SIGTERM received.
[2020-07-31 13:23:10.35798] [1403] [info] terminating znapzend (PID=1403) ...
[2020-07-31 13:23:11.35770] [1387] [info] znapzend (PID=1387) terminated.
[2020-07-31 13:23:11.35858] [1387] [debug] SIGINT received.
[2020-07-31 13:23:11.35866] [1387] [info] terminating znapzend (PID=1387) ...
[2020-07-31 13:23:12.35891] [1387] [info] znapzend (PID=1387) terminated.
stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.