public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH] fix #4835: order zfs-import@ before -cache/-scan
Date: Thu, 28 Mar 2024 10:41:45 +0100	[thread overview]
Message-ID: <20240328094145.193563-1-f.gruenbichler@proxmox.com> (raw)

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 <f.gruenbichler@proxmox.com>
---
 ...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 <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
 
 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





             reply	other threads:[~2024-03-28  9:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-28  9:41 Fabian Grünbichler [this message]
2024-03-28 10:06 ` [pve-devel] [PATCH zfsonlinux] " Fabian Grünbichler
2024-03-28 10:59   ` Stoiko Ivanov
2024-04-08 15:39 ` [pve-devel] applied: [PATCH] " Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240328094145.193563-1-f.gruenbichler@proxmox.com \
    --to=f.gruenbichler@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal