From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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) server-digest SHA256) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 6E115BBF2C for ; Thu, 28 Mar 2024 10:42:22 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 4BBD17627 for ; Thu, 28 Mar 2024 10:41:52 +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) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Thu, 28 Mar 2024 10:41:51 +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 F2F1B428C0 for ; Thu, 28 Mar 2024 10:41:50 +0100 (CET) From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= To: pve-devel@lists.proxmox.com Date: Thu, 28 Mar 2024 10:41:45 +0100 Message-Id: <20240328094145.193563-1-f.gruenbichler@proxmox.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.059 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_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. [multipathd.target, etc.com, b.com, cryptsetup.target, zfs-import.target, makefile.am] Subject: [pve-devel] [PATCH] 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Mar 2024 09:42:22 -0000 this should fix failures of the template instances because either of the two other import services picked up the pool in question first. Signed-off-by: Fabian Grünbichler --- ...dd-systemd-unit-for-importing-specific-pools.patch | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/debian/patches/0007-Add-systemd-unit-for-importing-specific-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 existence 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. +Its instances are ordered before the other two "big" import services to avoid +races and spurious (cosmetic!) service failures. + Signed-off-by: Stoiko Ivanov Signed-off-by: Thomas Lamprecht --- 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 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=Import ZFS pool %i +Documentation=man:zpool(8) @@ -57,6 +60,8 @@ index 000000000..9b4ee9371 +After=cryptsetup.target +After=multipathd.target +Before=zfs-import.target ++Before=zfs-import-scan.service ++Before=zfs-import-cache.service + +[Service] +Type=oneshot -- 2.39.2