Prevent ignition from running twice in a provision-to-disk configuration
Ignition runs during provision-to-disk, and then also tries to run again during sytsemd. This commit adds a sentinel file during the initial provision-to-disk that is detected by systemd to prevent re-running ignition partitioning / formatting. - Fixes: #1981 Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
@@ -46,3 +46,11 @@ info "warewulf: mounting ${wwinit_root_device} at ${NEWROOT}"
|
||||
for stage in "image" "system" "runtime"; do
|
||||
get_stage "${stage}"
|
||||
done
|
||||
|
||||
# Copy /warewulf/run from initramfs to NEWROOT
|
||||
# This preserves state files created by wwinit.d scripts (e.g., ignition marker)
|
||||
if [ -d /tmp/wwinit/warewulf/run ]; then
|
||||
info "warewulf: preserving /warewulf/run to mounted root"
|
||||
mkdir -p "${NEWROOT}/warewulf"
|
||||
cp -a /tmp/wwinit/warewulf/run "${NEWROOT}/warewulf/"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user