From bd485817c17bc16414a74eeb9eba2ee74063f3b4 Mon Sep 17 00:00:00 2001 From: Christian Goll Date: Wed, 19 Feb 2025 12:13:50 +0100 Subject: [PATCH] Require ignition for mount and not only after Signed-off-by: Christian Goll --- CHANGELOG.md | 1 + overlays/ignition/internal/ignition_test.go | 2 ++ overlays/ignition/rootfs/etc/systemd/system/ww4-mounts.ww | 2 ++ 3 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b120708..624c3ef7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -49,6 +49,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Don't add "default" profile to new nodes if it does not exist. #1721 - Make DHCP range optional. - Don't use DHCP for interfaces attached to a bond. #1743 +- Wait until ignition has completed before trying to mount ### Removed diff --git a/overlays/ignition/internal/ignition_test.go b/overlays/ignition/internal/ignition_test.go index 3bfa27eb..c64b6e1c 100644 --- a/overlays/ignition/internal/ignition_test.go +++ b/overlays/ignition/internal/ignition_test.go @@ -91,6 +91,7 @@ Filename: scratch.mount [Unit] ConditionPathExists=/warewulf/ignition.json Before=local-fs.target +Requires=ignition-ww4-disks.service After=ignition-ww4-disks.service [Mount] Where=/scratch @@ -105,6 +106,7 @@ Filename: dev-disk-by\x2dpartlabel-swap.swap # This file is autogenerated by warewulf [Unit] ConditionPathExists=/warewulf/ignition.json +Requires=ignition-ww4-disks.service After=ignition-ww4-disks.service Before=swap.target [Swap] diff --git a/overlays/ignition/rootfs/etc/systemd/system/ww4-mounts.ww b/overlays/ignition/rootfs/etc/systemd/system/ww4-mounts.ww index dd4050a6..71b00de9 100644 --- a/overlays/ignition/rootfs/etc/systemd/system/ww4-mounts.ww +++ b/overlays/ignition/rootfs/etc/systemd/system/ww4-mounts.ww @@ -10,6 +10,7 @@ {{- if eq $fs.Format "swap"}} [Unit] ConditionPathExists=/warewulf/ignition.json +Requires=ignition-ww4-disks.service After=ignition-ww4-disks.service Before=swap.target [Swap] @@ -20,6 +21,7 @@ RequiredBy=swap.target [Unit] ConditionPathExists=/warewulf/ignition.json Before=local-fs.target +Requires=ignition-ww4-disks.service After=ignition-ww4-disks.service [Mount] Where={{ $fs.Path }}