[Bug 223951] sysutils/zfsnap tries to delete pool when removing snapshots on pool that running scrub with -s/-S enabled
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Tue Nov 28 22:40:40 UTC 2017
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=223951
Bug ID: 223951
Summary: sysutils/zfsnap tries to delete pool when removing
snapshots on pool that running scrub with -s/-S
enabled
Product: Ports & Packages
Version: Latest
Hardware: Any
OS: Any
Status: New
Keywords: patch
Severity: Affects Some People
Priority: ---
Component: Individual Port(s)
Assignee: freebsd-ports-bugs at FreeBSD.org
Reporter: vsasjason at gmail.com
CC: yamagi at yamagi.org
Flags: maintainer-feedback?(yamagi at yamagi.org)
CC: yamagi at yamagi.org
Created attachment 188378
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=188378&action=edit
fix pool deletion "try and fallback" bug
Error example:
/sbin/zfs snapshot -r zroot/root at daily-2017-09-03_03.42.52--1w ... DONE
/sbin/zfs snapshot -r zroot/var at daily-2017-09-03_03.42.52--1w ... DONE
/sbin/zfs snapshot -r zroot/usr at daily-2017-09-03_03.42.52--1w ... DONE
/sbin/zfs snapshot -r zroot/home at daily-2017-09-03_03.42.52--1w ... DONE
/sbin/zfs snapshot -r zroot/ps at daily-2017-09-03_03.42.52--1w ... DONE
/sbin/zfs snapshot -r zroot/poudriere at daily-2017-09-03_03.42.52--1w ... DONE
/sbin/zfs snapshot -r zdata/media at daily-2017-09-03_03.42.52--1w ... DONE
FATAL: trying to delete zfs pool or filesystem? WTF?
This is bug, we definitely don't want that.
Please report it to https://github.com/graudeejs/zfSnap/issues
Don't panic, nothing was deleted :)
Exact problem is that rm_zfs_snapshot() uses variable "i" as storage for
snapshot name. But if one uses -s/-S options, that function calls skip_pool(),
and last function uses variable "i" as pool name storage.
But the variable is global so its contents become overwritten with pool name
instead of snapshot name.
Fix is truly trivial - just make "i" local in skip_pool().
// I don't plan to report this problem upstream because zfsnap[1] development
fully stopped a few years ago.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-ports-bugs
mailing list