From nobody Tue Feb 7 20:49:36 2023 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PBFcP5R6Gz3nhZZ for ; Tue, 7 Feb 2023 20:49:41 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PBFcP2j7Nz3JHt for ; Tue, 7 Feb 2023 20:49:41 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675802981; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/sNoT0FfMpcjOzjgJ5jhCy0mgjusqBy08RjrmzvJYhs=; b=pZEEL8KX1oaj+G9gqayeZ0IlhQXbTlXM4/V7LrAQiZ6/F76txxJLvEtnyf4sLGY0MflAHq dF2xWrfEv2u1udXwUqa9++MQiG5on6iq+NAM2WtzOXh6XByvM+SXDm4w9LVeekOj6/dzhU CB7zj4Gt2C5U7wfePdpMARWlzcNexAb7sF6Sdv8bzAN6ms8inQ0WEAZ1XwsyeWwDtBjdbp PQm0VzR+pTLnNmywhmZMSUOwJtR7fMQjL3tC3uP+nazZXpOMA/2TAWkQAXDgco8XnwgQ87 DL9wlmS7FtBdcWBBRzUu7mxfxO/W/4oAo7vlIQp2fwsglVyMRaeag9eSEOf04A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1675802981; a=rsa-sha256; cv=none; b=VDjTRhzlzMuiWxBoPkray/+da0uwGFz22a/rBlf2h6aWcMnJYeqloV1MdSXUu1mRUGuY0E CgaWc35RWoAVY7v2wEYAvw+Wh6xFIEOBgKqc9/vrWddCND7onAbrXyzwb7OAIuEcyf5sDN 4lQfIVf0/3YdqHlQar1yiVyJPyJAI6qg5akw8TK5OJnWS/8Z5O71Y64MiqiPgZ4+O4/me6 +QCiDlah8mbB/xp1YBg7IQWhvWqayciC+iD+YlfJ3r6PKBt5+Qdhhv3cvCnNQniI216tY0 y+fDgJHayOZRLLCADaT/kiYSGZD7sxRuCj/jJj6xo8R3/AJpM8K6M3O11H8SoA== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PBFcP1mBczVtk for ; Tue, 7 Feb 2023 20:49:41 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 317KnfS8056772 for ; Tue, 7 Feb 2023 20:49:41 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 317Knfu0056771 for bugs@FreeBSD.org; Tue, 7 Feb 2023 20:49:41 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 260160] zfs jailed: snapshots not accessible Date: Tue, 07 Feb 2023 20:49:36 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 13.0-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: freebsd-bugzilla@umpquanet.com X-Bugzilla-Status: In Progress X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D260160 --- Comment #24 from Jim Long --- Thanks to everyone who has contributed to the significant progress on this issue. It definitely feels like progress, but IMO it would be infinitely better if= the "zfs.mount_snapshot" attribute was honored at startup. I'll spend some time thinking about how to write a service script that can either piggy-back on /etc/rc.d/jail or a patch to /etc/rc.d/jail that will incorporate the "jail= -m" in the start-up process. But "The Right Thing" would certainly seem to be = to have /etc/rc.d/jail honor the settings placed in /etc/jail.conf. Interestingly, my testing suggests that once a "jail -m" operation has been done, the mount_snapshot setting somehow survives any subsequent destruction and re-creation of the jail. Here's a dialogue commenced shortly after a fresh boot: # w 12:26PM up 54 secs, 3 users, load averages: 0.89, 0.24, 0.09 USER TTY FROM LOGIN@ IDLE WHAT jim v0 - 12:26PM - /bin/sh /usr/local/bin/startx jim pts/0 :0 12:26PM - - jim pts/1 :0 12:26PM - w # jls JID IP Address Hostname Path 1 192.168.1.50 test.example.edu /jail/test 2 192.168.1.50 test2.example.edu /jail/test2 # jexec test ls -ld /.zfs/snapshot/xfer ls: /.zfs/snapshot/xfer: Operation not permitted # jexec test2 ls -ld /.zfs/snapshot/xfer ls: /.zfs/snapshot/xfer: Operation not permitted # jail -m test test: updated # jail -m test2 test2: updated # jexec test ls -ld /.zfs/snapshot/xfer drwxr-xr-x 33 root wheel 38 Feb 6 10:22 /.zfs/snapshot/xfer # jexec test2 ls -ld /.zfs/snapshot/xfer drwxr-xr-x 33 root wheel 38 Feb 6 10:22 /.zfs/snapshot/xfer The odd thing to me is that once "jail -m" has been performed, the change persists even beyond the destruction and re-creation of either jail. Here I stop jail 1 and jail 2, then start jail 3 and jail 4. Without any "jail -m" command, jails 3 and 4 are able to see snapshots: # jls JID IP Address Hostname Path 1 192.168.1.50 test.example.edu /jail/test 2 192.168.1.50 test2.example.edu /jail/test2 # service jail stop Stopping jails: test test2. # service jail start Starting jails: test test2. # jls JID IP Address Hostname Path 3 192.168.1.50 test.example.edu /jail/test 4 192.168.1.50 test2.example.edu /jail/test2 # jexec test ls -ld /.zfs/snapshot/xfer drwxr-xr-x 33 root wheel 38 Feb 6 10:22 /.zfs/snapshot/xfer # jexec test2 ls -ld /.zfs/snapshot/xfer drwxr-xr-x 33 root wheel 38 Feb 6 10:22 /.zfs/snapshot/xfer Thanks again to Allan, Martin, Ryan, and everyone else for their time and expertise. --=20 You are receiving this mail because: You are the assignee for the bug.=