From owner-freebsd-ports-bugs@freebsd.org Tue Nov 28 22:40:40 2017 Return-Path: Delivered-To: freebsd-ports-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6DD6BDF0F50 for ; Tue, 28 Nov 2017 22:40:40 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5B0717BADA for ; Tue, 28 Nov 2017 22:40:40 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id vASMedAG018652 for ; Tue, 28 Nov 2017 22:40:40 GMT (envelope-from bugzilla-noreply@freebsd.org) 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 Date: Tue, 28 Nov 2017 22:40:39 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: patch X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: vsasjason@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-ports-bugs@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status keywords bug_severity priority component assigned_to reporter cc flagtypes.name attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Nov 2017 22:40:40 -0000 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.=