* [pve-devel] [PATCH] fix #4835: order zfs-import@ before -cache/-scan
@ 2024-03-28 9:41 Fabian Grünbichler
2024-03-28 10:06 ` [pve-devel] [PATCH zfsonlinux] " Fabian Grünbichler
2024-04-08 15:39 ` [pve-devel] applied: [PATCH] " Thomas Lamprecht
0 siblings, 2 replies; 4+ messages in thread
From: Fabian Grünbichler @ 2024-03-28 9:41 UTC (permalink / raw)
To: pve-devel
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [pve-devel] [PATCH zfsonlinux] fix #4835: order zfs-import@ before -cache/-scan
2024-03-28 9:41 [pve-devel] [PATCH] fix #4835: order zfs-import@ before -cache/-scan Fabian Grünbichler
@ 2024-03-28 10:06 ` Fabian Grünbichler
2024-03-28 10:59 ` Stoiko Ivanov
2024-04-08 15:39 ` [pve-devel] applied: [PATCH] " Thomas Lamprecht
1 sibling, 1 reply; 4+ messages in thread
From: Fabian Grünbichler @ 2024-03-28 10:06 UTC (permalink / raw)
To: Proxmox VE development discussion
missed the subjectprefix, this is for ZFS ;) thanks @Stoiko for pointing
it out off-list
On March 28, 2024 10:41 am, Fabian Grünbichler wrote:
> 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
>
>
>
> _______________________________________________
> pve-devel mailing list
> pve-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [pve-devel] [PATCH zfsonlinux] fix #4835: order zfs-import@ before -cache/-scan
2024-03-28 10:06 ` [pve-devel] [PATCH zfsonlinux] " Fabian Grünbichler
@ 2024-03-28 10:59 ` Stoiko Ivanov
0 siblings, 0 replies; 4+ messages in thread
From: Stoiko Ivanov @ 2024-03-28 10:59 UTC (permalink / raw)
To: Fabian Grünbichler; +Cc: Proxmox VE development discussion
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ünbichler <f.gruenbichler@proxmox.com> wrote:
> missed the subjectprefix, this is for ZFS ;) thanks @Stoiko for pointing
> it out off-list
>
> On March 28, 2024 10:41 am, Fabian Grünbichler wrote:
> > 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
> >
> >
> >
> > _______________________________________________
> > pve-devel mailing list
> > pve-devel@lists.proxmox.com
> > https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
> >
>
>
> _______________________________________________
> pve-devel mailing list
> pve-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* [pve-devel] applied: [PATCH] fix #4835: order zfs-import@ before -cache/-scan
2024-03-28 9:41 [pve-devel] [PATCH] fix #4835: order zfs-import@ before -cache/-scan Fabian Grünbichler
2024-03-28 10:06 ` [pve-devel] [PATCH zfsonlinux] " Fabian Grünbichler
@ 2024-04-08 15:39 ` Thomas Lamprecht
1 sibling, 0 replies; 4+ messages in thread
From: Thomas Lamprecht @ 2024-04-08 15:39 UTC (permalink / raw)
To: Proxmox VE development discussion, Fabian Grünbichler
Am 28/03/2024 um 10:41 schrieb Fabian Grünbichler:
> 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(-)
>
>
applied, thanks!
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-04-08 15:39 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-28 9:41 [pve-devel] [PATCH] fix #4835: order zfs-import@ before -cache/-scan Fabian Grünbichler
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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox