Date: Tue, 28 Nov 2017 22:40:39 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-ports-bugs@FreeBSD.org Subject: [Bug 223951] sysutils/zfsnap tries to delete pool when removing snapshots on pool that running scrub with -s/-S enabled Message-ID: <bug-223951-13@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D223951 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@FreeBSD.org Reporter: vsasjason@gmail.com CC: yamagi@yamagi.org Flags: maintainer-feedback?(yamagi@yamagi.org) CC: yamagi@yamagi.org Created attachment 188378 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D188378&action= =3Dedit fix pool deletion "try and fallback" bug Error example: /sbin/zfs snapshot -r zroot/root@daily-2017-09-03_03.42.52--1w ... DONE /sbin/zfs snapshot -r zroot/var@daily-2017-09-03_03.42.52--1w ... DONE /sbin/zfs snapshot -r zroot/usr@daily-2017-09-03_03.42.52--1w ... DONE /sbin/zfs snapshot -r zroot/home@daily-2017-09-03_03.42.52--1w ... DONE /sbin/zfs snapshot -r zroot/ps@daily-2017-09-03_03.42.52--1w ... DONE /sbin/zfs snapshot -r zroot/poudriere@daily-2017-09-03_03.42.52--1w ... DONE /sbin/zfs snapshot -r zdata/media@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] developme= nt fully stopped a few years ago. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-223951-13>