From owner-svn-src-stable@freebsd.org Wed Dec 2 20:53:05 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 134B74A5D61 for ; Wed, 2 Dec 2020 20:53:05 +0000 (UTC) (envelope-from cglogic@protonmail.com) Received: from mail-40130.protonmail.ch (mail-40130.protonmail.ch [185.70.40.130]) (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 "protonmail.com", Issuer "SwissSign Server Gold CA 2014 - G22" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CmWQ81kyQz3mvq for ; Wed, 2 Dec 2020 20:53:03 +0000 (UTC) (envelope-from cglogic@protonmail.com) Date: Wed, 02 Dec 2020 20:52:45 +0000 To: Mateusz Piotrowski <0mp@FreeBSD.org> From: cglogic Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-stable@freebsd.org" , "svn-src-stable-12@freebsd.org" Reply-To: cglogic Subject: Re: svn commit: r367546 - stable/12/libexec/rc/rc.d Message-ID: In-Reply-To: <202011100747.0AA7lOEh032507@repo.freebsd.org> References: <202011100747.0AA7lOEh032507@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch X-Rspamd-Queue-Id: 4CmWQ81kyQz3mvq X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.88 / 15.00]; HAS_REPLYTO(0.00)[cglogic@protonmail.com]; TO_DN_EQ_ADDR_SOME(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:185.70.40.0/24:c]; FREEMAIL_FROM(0.00)[protonmail.com]; RCPT_COUNT_FIVE(0.00)[5]; DKIM_TRACE(0.00)[protonmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[protonmail.com,quarantine]; NEURAL_HAM_SHORT(-0.88)[-0.883]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_DBL_DONT_QUERY_IPS(0.00)[185.70.40.130:from]; FREEMAIL_ENVFROM(0.00)[protonmail.com]; ASN(0.00)[asn:62371, ipnet:185.70.40.0/24, country:CH]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[protonmail.com:s=protonmail]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; FREEMAIL_REPLYTO(0.00)[protonmail.com]; SPAMHAUS_ZRD(0.00)[185.70.40.130:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[185.70.40.130:from]; MAILMAN_DEST(0.00)[svn-src-stable] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Dec 2020 20:53:05 -0000 On Tuesday, November 10, 2020 9:47 AM, Mateusz Piotrowski <0mp@FreeBSD.org>= wrote: > Author: 0mp (doc,ports committer) > Date: Tue Nov 10 07:47:24 2020 > New Revision: 367546 > URL: https://svnweb.freebsd.org/changeset/base/367546 > > Log: > MFC r367291: > > rc.d/zfs: Add shutdown to KEYWORDS > > The problem is that without walling /etc/rc.d/zfs on shutdown, resources > associated with ZFS mounts are not freed and the jails will remain in dyi= ng > state. In addition, the dataset is now in a dangling state, as the jail i= t > is attached to is dying. > > A known workaround for jails was to add the following lines > to /etc/jail.conf, to make sure that "service zfs stop" is run > when the jail is stopped: > > exec.stop =3D "/bin/sh /etc/rc.shutdown"; > exec.stop +=3D "/usr/sbin/service zfs stop || /usr/bin/true"; > > While the workaround seems to be okay-ish for the jail situation, it is > still unclean. However, for physical hosts this may wreak havoc with the > pool if shared spares are used, as "zfs unshare" is never invoked on > shutdown. > > PR: 147444 > Submitted by: Markus Stoff > Reported by: Mykah > > Reviewed by: cy > Approved by: cy (src) > Relnotes: yes > > Modified: > stable/12/libexec/rc/rc.d/zfs > Directory Properties: > stable/12/ (props changed) > > Modified: stable/12/libexec/rc/rc.d/zfs > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D > > --- stable/12/libexec/rc/rc.d/zfs Tue Nov 10 02:26:44 2020 (r367545) > +++ stable/12/libexec/rc/rc.d/zfs Tue Nov 10 07:47:24 2020 (r367546) > @@ -6,6 +6,7 @@ > > PROVIDE: zfs > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > REQUIRE: zfsbe > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > BEFORE: FILESYSTEMS var > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > +# KEYWORD: shutdown > > . /etc/rc.subr This caused Dec 2 22:47:16 hostname kernel: cannot unmount '/var/run': Device busy Dec 2 22:47:16 hostname kernel: cannot unmount '/var/log': Device busy Dec 2 22:47:16 hostname kernel: cannot unmount '/var/db': Device busy Dec 2 22:47:16 hostname kernel: cannot unmount '/var': Device busy Dec 2 22:47:16 hostname kernel: cannot unmount '/usr': Device busy Dec 2 22:47:16 hostname kernel: cannot unmount '/home/user': Device busy Dec 2 22:47:16 hostname kernel: cannot unmount '/home': Device busy Dec 2 22:47:16 hostname kernel: cannot unmount '/': Invalid argument on every shutdown.