From nobody Mon Nov 07 06:48:41 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 4N5MJk4wHnz4h8cJ; Mon, 7 Nov 2022 06:48:54 +0000 (UTC) (envelope-from lwhsu@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 4N5MJk4NGzz3Mfn; Mon, 7 Nov 2022 06:48:54 +0000 (UTC) (envelope-from lwhsu@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1667803734; 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=q0i6HlB1hUl0C2bYsQNUoYOjN9snuNwzNeDH6AmNdQ0=; b=ds0lUJHRUvS+xVSmz1TX3OeFnMwwrtdWCPE1ePGLjPiDFknllcms0EdSWhOm2co1lEtT3c +hvpCoTL06zA2AywkcqI+xmyQ/8dk8exsToJ1cFSvOReuCLgDf4O50GQ48M+fEQxmOVpOq UenzT6yG5HRPIS+6DBduEyWdFL4FsxRJZDixchyHBtXXWDNktI3cAh4YGZ30KYCrvqZAft x1bDCWbu/Q3/laDeSELnYwW/quD3/FpcaG1YJinlhAJdbhdiaUAgGYEb1QiqKlmGT9bnB+ v06U3igLK2vrHzD5lS5tJJWX54eh2M+qk1HQ/I/0JP/J1NpXvwV3+P6Pb/973w== Received: from mail-pj1-f54.google.com (mail-pj1-f54.google.com [209.85.216.54]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) (Authenticated sender: lwhsu/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4N5MJk3Jhwz1MNd; Mon, 7 Nov 2022 06:48:54 +0000 (UTC) (envelope-from lwhsu@freebsd.org) Received: by mail-pj1-f54.google.com with SMTP id d13-20020a17090a3b0d00b00213519dfe4aso9446685pjc.2; Sun, 06 Nov 2022 22:48:54 -0800 (PST) X-Gm-Message-State: ACrzQf0bZiIdWkeP9dHFbIDXQ/iVwA9Y550iA+H4PoHgjlA/hcJY1h+l nfSFkmzIdxO7uqAgLByzkONPNqpiPqdDX/pKAMQ= X-Google-Smtp-Source: AMsMyM5dQDRMiI1DNSHTHFqxf0GAWciIn0HrF3b4RDWO5XeX9o4FPDHpXwxSg3CqnQd/NwBXYqcwyLWUBN625XrCfKU= X-Received: by 2002:a17:902:db11:b0:188:515e:81a2 with SMTP id m17-20020a170902db1100b00188515e81a2mr23324389plx.85.1667803733341; Sun, 06 Nov 2022 22:48:53 -0800 (PST) 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 References: <202211070350.2A73oo64051412@gitrepo.freebsd.org> <9A7B38D3-9BC4-4B45-A71D-0604F7F4887A@panasas.com> In-Reply-To: <9A7B38D3-9BC4-4B45-A71D-0604F7F4887A@panasas.com> From: Li-Wen Hsu Date: Mon, 7 Nov 2022 14:48:41 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: 3bf53c4c8f53 - main - release(7): Enable zpoolupgrade rc script in ZFS based VM images To: Ravi Pokala Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org 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=1667803734; 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=q0i6HlB1hUl0C2bYsQNUoYOjN9snuNwzNeDH6AmNdQ0=; b=EiE4h4sZYHRLolDhnmDWTIldbuCpHx0PwEv8JAHLYjcqnaZ4tOHtMyvLZSDHGVtGUWHCA2 QFuHzynqjXOmFP5UMgqX7EUi4Q0FtzBtYEgk1P3c8bp6iGh5aAqa0nqjaio9pMRKXkWiyr OsUNyXn7GJX9/s/7taMxpZ9k9PvZVr2HrM3pldicGi/dTPVmNqhRq0eKpdSxQpIdxneZsv UvklAA0fGt/GYya5i6kWOABFllmgIMOabcNRK7NaL+3uWbWe7uMhhXPWM2kBgumtXrzfEF EYGmZ07ktZNeHjZlcvgG2M0XvOMFEPMQC/4a+itsRO87OKaMmJJtyJXrfPPElA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1667803734; a=rsa-sha256; cv=none; b=ZWQTItUf70Ds+HvSEDV3reVeqlzXV+nIP2ED9oaOo/2hUfKIdfM12Kclhg7A6zceQ5DGtn /4SpUd+QvsuMTdF21pd6IcIypuVfm6uncIDnh2UlGAaawvZtFWkN3W9ig7ykeK+bW6ZGFN xuFJL0vgZE5D1OtVsmBebrljb8Gdbi1pNGfjmTjt1dmoRPuQi8VxtxXMKiVKUhij/ILFhR wO/IfHlKoH+hFtnBYhxKuYWoVr+K0xZ42EKtfK5LASWtu3Vp++a0fC4ga1qzJBVZCJTenT 7IA1niycJy5m8/IjFUBwRXUVHj/otRNrK0mjI5m4j9fHG2Ee4+u1x1IklYclVA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N 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 `zpool up= grade' 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 ge= nerated from the same sources. But if the root pool is subsequently upgrade= d 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 `zpoolupgrad= e' script enabling features which are not supported by the bootloader? > > There should be some mechanism for upgrading the bootloader, or else some= thing else that runs on the first boot from the VM image should disable `zp= oolupgrade' 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. 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 rc sc= ript in ZFS based VM images > > The branch main has been updated by lwhsu: > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D3bf53c4c8f53b1f19313e9= c31415c7eee830cdc0 > > 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 images > > 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.subr > 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.conf > + echo "zpool_upgrade=3D\"zroot\"" >> ${DESTDIR}/etc/rc.con= f > fi > > if ! [ -z "${QEMUSTATIC}" ]; then > >