From nobody Mon Nov 07 19:34:57 2022 X-Original-To: dev-commits-src-all@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 4N5hJk16k2z4hhth; Mon, 7 Nov 2022 19:35:02 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4N5hJk0hYdz4c2y; Mon, 7 Nov 2022 19:35:02 +0000 (UTC) (envelope-from rpokala@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1667849702; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tQaf6mLysp1rc0k6rsXFUw4GJRt6B9ey02QeuRJQlYU=; b=E7XX26xmrWFKbVH+UBDZIZ1BmzIWRM+FWttYFe5sVlaQVZMeBvUKMly/ZU22nt7VErswhh rSB6Ro9RoJXbxlhcpv/XfNPANfwidCBTc9fRQx52dRq4nFzunnnUk04GpdUpFTjl3a7JlS HnPGTlKE0eIO+QtnGO01BELEmeSYV8zZxLwa/0K+NrWoh/z6klWveXsDR864+IrfYM0SXw hPJk4vaOnIje4x6tI72o+rj2ZRbLzeM1i6GkUAVs5lcEWJh1xlvrN1ulEqhLywW25h+xZ/ SAkd8p0G3+izjq7h8Vfg88dt/WR4qRwbkoVUeyAAnebj9idcvuWD7mY4N3dZHA== Received: from [192.168.1.10] (unknown [98.42.164.217]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: rpokala) by smtp.freebsd.org (Postfix) with ESMTPSA id 4N5hJj2Kqczb1Y; Mon, 7 Nov 2022 19:35:01 +0000 (UTC) (envelope-from rpokala@freebsd.org) User-Agent: Microsoft-MacOutlook/16.66.22102801 Date: Mon, 07 Nov 2022 11:34:57 -0800 Subject: Re: 3bf53c4c8f53 - main - release(7): Enable zpoolupgrade rc script in ZFS based VM images From: Ravi Pokala To: Li-Wen Hsu , Mark Millard CC: , , Message-ID: <6699F3B1-3CCB-4A03-A4EB-86D34ECD28BB@panasas.com> Thread-Topic: 3bf53c4c8f53 - main - release(7): Enable zpoolupgrade rc script in ZFS based VM images References: <202211070350.2A73oo64051412@gitrepo.freebsd.org> <9A7B38D3-9BC4-4B45-A71D-0604F7F4887A@panasas.com> In-Reply-To: List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org Mime-version: 1.0 Content-type: text/plain; charset="UTF-8" Content-transfer-encoding: quoted-printable ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1667849702; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tQaf6mLysp1rc0k6rsXFUw4GJRt6B9ey02QeuRJQlYU=; b=gOFc9xQtDE2ZRylwEB7mkoy3TaX2aClaViuV74ivIlBsae+xcRrgsXwk59kzeovpfI1iIm QyCTfbR39lO3QSWvZgeySz4D2zzf6RLeFFWkl9AkI7L7oUaW/cXzQd6xAbxETfX0auFIke CFMHuTbBG/GJZIeiGXphQuKR3Gky5W8Vp/1L3829x5/dEgcWKtg50E4jLNJpt6a8JISa/j 5DdT29V7AOHLXHKOWkGpGo6cuhJ7PYqaf5wa2x9MHFxDBcjB2M9eQlnEffhDkGGdRaZhpN 7UCFnp5zcSWhgi0HzTQEbP2UmVD0h9gysDZVQzenp/qC6ksA4sRPX+0X0bDZ9Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1667849702; a=rsa-sha256; cv=none; b=lzcAvS64Frv9QKz+7yLzB3n4PyjpFXOp6oOiOs/3uxB22BMFs5LlWSrnjrkfihKWMEUv5K TVkhLen1W0P7GJMtntJN3/uYn3s/VuS3LxxHqObxODPzXz6ralVIFiaqH66hTee2aDkRUf UrUXx9QlQv91SdmiK0XN+JOTFb45P+mpyMdr5RGpdYTXfjOdthPw8cDZKAKSMWIhdTVvDy hZ0M2SyJqA5FWwMyrVcy0A5HLDNJDpWjiSDgiJdPMEhBUen9QjFevSvKfqsPxp50Ig8rSD T4sZgdGqD+xbv7Shkx1vW7i/XYB8gS2CqVhqt9fIw8mS5s75V3+WXp5Okz0xxw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N -----Original Message----- From: Li-Wen Hsu Date: 2022-11-06, Sunday at 22:48 To: Ravi Pokala Cc: , , Subject: Re: 3bf53c4c8f53 - main - release(7): Enable zpoolupgrade rc scrip= t in ZFS based VM images On Mon, Nov 7, 2022 at 1:33 PM Ravi Pokala wrote: > > Hi Li-Wen, > > If I'm reading this (and 72a1cb05cd23) correctly, this will run `zpoo= l upgrade' on the "zroot" pool on every boot. That's fine for the first time= a VM image is used, since presumably the root pool and the bootloader were = generated from the same sources. But if the root pool is subsequently upgrad= ed by the running VM, don't we need to make sure the bootloader is also upgr= aded? Otherwise, don't we run into the possibility of this new `zpoolupgrade= ' script enabling features which are not supported by the bootloader? > > There should be some mechanism for upgrading the bootloader, or else = something else that runs on the first boot from the VM image should disable = `zpoolupgrade' so it is only run the first time. > > Thanks, > > Ravi (rpokala@) The zpoolupgrade rc script has "KEYWORD: firstboot" so it is only executed when the ${firstboot_sentinel} file exists, it works in the same way as growfs and zpoolreguid rc scripts. I've been thinking renaming these to firstboot_* as others provided by sysutils/firstboot-* from ports, but I think it's also fine to keep the consistency for now. Ah! I completely missed the 'firstboot' keyword. That sounds much better! That said, Mark Millard brought up a good point about only enabling feature= s supported by RELEASE bootloaders. Thanks, Ravi (rpokala@) Best, Li-Wen > > =EF=BB=BF-----Original Message----- > From: on behalf of Li-Wen Hsu > Date: 2022-11-06, Sunday at 19:50 > To: , , = > Subject: git: 3bf53c4c8f53 - main - release(7): Enable zpoolupgrade r= c script in ZFS based VM images > > The branch main has been updated by lwhsu: > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D3bf53c4c8f53b1f19313= e9c31415c7eee830cdc0 > > commit 3bf53c4c8f53b1f19313e9c31415c7eee830cdc0 > Author: Li-Wen Hsu > AuthorDate: 2022-11-07 03:47:33 +0000 > Commit: Li-Wen Hsu > CommitDate: 2022-11-07 03:47:33 +0000 > > release(7): Enable zpoolupgrade rc script in ZFS based VM ima= ges > > This will enable VM access to all ZFS feature automatically, = only on a > newly installed or provisioned VM or cloud instance. > > Reviewed by: markj > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews.freebsd.org/D37283 > --- > release/tools/vmimage.subr | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/release/tools/vmimage.subr b/release/tools/vmimage.s= ubr > index 8982e768527a..a65ec4f1a1f9 100644 > --- a/release/tools/vmimage.subr > +++ b/release/tools/vmimage.subr > @@ -83,6 +83,7 @@ vm_install_base() { > if [ "${VMFS}" =3D zfs ]; then > echo "zfs_enable=3D\"YES\"" >> ${DESTDIR}/etc/rc.conf > echo "zpool_reguid=3D\"zroot\"" >> ${DESTDIR}/etc/rc.co= nf > + echo "zpool_upgrade=3D\"zroot\"" >> ${DESTDIR}/etc/rc.c= onf > fi > > if ! [ -z "${QEMUSTATIC}" ]; then > >