Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ set -ex

. /usr/local/bin/release-image.sh

# Must match ironic.service
EXIT_CODE_NO_RESTART=42

IRONIC_IMAGE=$(image_for ironic)
IRONIC_AGENT_IMAGE=$(image_for ironic-agent)
CUSTOMIZATION_IMAGE=$(image_for image-customization-controller)
Expand Down Expand Up @@ -242,6 +245,13 @@ podman run -d --name ironic-ramdisk-logs \
--entrypoint /bin/runlogwatch.sh \
-v $IRONIC_SHARED_VOLUME:/shared:z ${IRONIC_IMAGE}

# Failure to start image-customization results in a very confusing error
icc_id=$(podman ps --filter name=image-customization --filter status=running --format '{{`{{.ID}}`}}')
if [ -z "$icc_id" ]; then
echo The image-customization service crashed after start, check its logs
exit $EXIT_CODE_NO_RESTART
fi

set +x
AUTH_DIR=/opt/metal3/auth
ironic_url="$(printf 'http://%s:%s@localhost:6385/v1' "$(cat "${AUTH_DIR}/ironic/username")" "$(cat "${AUTH_DIR}/ironic/password")")"
Expand Down
2 changes: 2 additions & 0 deletions data/data/bootstrap/baremetal/systemd/units/ironic.service
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ RemainAfterExit=yes

Restart=on-failure
RestartSec=10
# Used in startironic.sh to indicate a fatal failure
RestartPreventExitStatus=42
TimeoutStartSec=600

[Install]
Expand Down