From 508baa6d931f7fd5b969127e5786dec986998fd0 Mon Sep 17 00:00:00 2001 From: mumesan Date: Thu, 27 Mar 2025 10:54:44 +0000 Subject: [PATCH] Fix init container crashloop --- templates/common/bin/pxe-init.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/templates/common/bin/pxe-init.sh b/templates/common/bin/pxe-init.sh index e67dd180..887d61f2 100755 --- a/templates/common/bin/pxe-init.sh +++ b/templates/common/bin/pxe-init.sh @@ -64,7 +64,9 @@ fi # Build an ESP image pushd /var/lib/ironic/httpboot -if [ ! -a "esp.img" ]; then +if ! command -v dd || ! command -v mkfs.msdos || ! command -v mmd; then + echo "WARNING: esp.img will not be created because dd/mkfs.msdos/mmd are missing. Please patch the OpenstackVersion to update container images." +elif [ ! -a "esp.img" ]; then dd if=/dev/zero of=esp.img bs=4096 count=1024 mkfs.msdos -F 12 -n 'ESP_IMAGE' esp.img