From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <s.ivanov@proxmox.com>
Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by lists.proxmox.com (Postfix) with ESMTPS id 093A2BBF9C
 for <pve-devel@lists.proxmox.com>; Thu, 28 Mar 2024 11:59:53 +0100 (CET)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
 by firstgate.proxmox.com (Proxmox) with ESMTP id CD31286C7
 for <pve-devel@lists.proxmox.com>; Thu, 28 Mar 2024 11:59:22 +0100 (CET)
Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com
 [94.136.29.106])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by firstgate.proxmox.com (Proxmox) with ESMTPS
 for <pve-devel@lists.proxmox.com>; Thu, 28 Mar 2024 11:59:21 +0100 (CET)
Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1])
 by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 16CFB428E6
 for <pve-devel@lists.proxmox.com>; Thu, 28 Mar 2024 11:59:21 +0100 (CET)
Date: Thu, 28 Mar 2024 11:59:19 +0100
From: Stoiko Ivanov <s.ivanov@proxmox.com>
To: Fabian =?UTF-8?B?R3LDvG5iaWNobGVy?= <f.gruenbichler@proxmox.com>
Cc: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Message-ID: <20240328115919.4a655ccd@rosa.proxmox.com>
In-Reply-To: <1711620342.p2j0dv4h5z.astroid@yuna.none>
References: <20240328094145.193563-1-f.gruenbichler@proxmox.com>
 <1711620342.p2j0dv4h5z.astroid@yuna.none>
X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-SPAM-LEVEL: Spam detection results:  0
 AWL -0.325 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DMARC_MISSING             0.1 Missing DMARC policy
 KAM_ASCII_DIVIDERS 0.8 Email that uses ascii formatting dividers and possible
 spam tricks
 KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment
 SPF_HELO_NONE           0.001 SPF: HELO does not publish an SPF Record
 SPF_PASS               -0.001 SPF: sender matches SPF record
 URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See
 http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more
 information. [zfs-import.target, makefile.am, proxmox.com, cryptsetup.target,
 b.com, etc.com, multipathd.target]
Subject: Re: [pve-devel] [PATCH zfsonlinux] fix #4835: order zfs-import@
 before -cache/-scan
X-BeenThere: pve-devel@lists.proxmox.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Proxmox VE development discussion <pve-devel.lists.proxmox.com>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/>
List-Post: <mailto:pve-devel@lists.proxmox.com>
List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help>
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=subscribe>
X-List-Received-Date: Thu, 28 Mar 2024 10:59:53 -0000

LGTM - Thanks for the idea and patch!

gave it a spin by creating a pool through the GUI, rebooting,
seeing the spurious warning, installing a patched version,
rebooting multiple times (no warning), adding yet another pool and
enabling zfs-import-scan.service (did not manage to boot without
zpool.cache not being empty :)

Reviewed-by: Stoiko Ivanov <s.ivanov@proxmox.com>
Tested-by: Stoiko Ivanov <s.ivanov@proxmox.com>

On Thu, 28 Mar 2024 11:06:07 +0100
Fabian Gr=C3=BCnbichler <f.gruenbichler@proxmox.com> wrote:

> missed the subjectprefix, this is for ZFS ;) thanks @Stoiko for pointing
> it out off-list
>=20
> On March 28, 2024 10:41 am, Fabian Gr=C3=BCnbichler wrote:
> > this should fix failures of the template instances because either of th=
e two
> > other import services picked up the pool in question first.
> >=20
> > Signed-off-by: Fabian Gr=C3=BCnbichler <f.gruenbichler@proxmox.com>
> > ---
> >  ...dd-systemd-unit-for-importing-specific-pools.patch | 11 ++++++++---
> >  1 file changed, 8 insertions(+), 3 deletions(-)
> >=20
> > diff --git a/debian/patches/0007-Add-systemd-unit-for-importing-specifi=
c-pools.patch b/debian/patches/0007-Add-systemd-unit-for-importing-specific=
-pools.patch
> > index ed7adbe..8232978 100644
> > --- a/debian/patches/0007-Add-systemd-unit-for-importing-specific-pools=
.patch
> > +++ b/debian/patches/0007-Add-systemd-unit-for-importing-specific-pools=
.patch
> > @@ -10,13 +10,16 @@ by scanning /dev/disk/by-id, irrespective of the ex=
istence and content of
> >  the instance name is used unescaped (see systemd.unit(5)), since zpool=
 names
> >  can contain characters which will be escaped by systemd.
> > =20
> > +Its instances are ordered before the other two "big" import services t=
o avoid
> > +races and spurious (cosmetic!) service failures.
> > +
> >  Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
> >  Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
> >  ---
> >   etc/Makefile.am                           |  1 +
> >   etc/systemd/system/50-zfs.preset          |  1 +
> > - etc/systemd/system/zfs-import@.service.in | 16 ++++++++++++++++
> > - 3 files changed, 18 insertions(+)
> > + etc/systemd/system/zfs-import@.service.in | 18 ++++++++++++++++
> > + 3 files changed, 20 insertions(+)
> >   create mode 100644 etc/systemd/system/zfs-import@.service.in
> > =20
> >  diff --git a/etc/Makefile.am b/etc/Makefile.am
> > @@ -48,7 +51,7 @@ new file mode 100644
> >  index 000000000..9b4ee9371
> >  --- /dev/null
> >  +++ b/etc/systemd/system/zfs-import@.service.in
> > -@@ -0,0 +1,16 @@
> > +@@ -0,0 +1,18 @@
> >  +[Unit]
> >  +Description=3DImport ZFS pool %i
> >  +Documentation=3Dman:zpool(8)
> > @@ -57,6 +60,8 @@ index 000000000..9b4ee9371
> >  +After=3Dcryptsetup.target
> >  +After=3Dmultipathd.target
> >  +Before=3Dzfs-import.target
> > ++Before=3Dzfs-import-scan.service
> > ++Before=3Dzfs-import-cache.service
> >  +
> >  +[Service]
> >  +Type=3Doneshot
> > --=20
> > 2.39.2
> >=20
> >=20
> >=20
> > _______________________________________________
> > pve-devel mailing list
> > pve-devel@lists.proxmox.com
> > https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
> >  =20
>=20
>=20
> _______________________________________________
> pve-devel mailing list
> pve-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel