Skip to content

Commit

Permalink
Merge pull request #2249 from hardys/ironic_restart
Browse files Browse the repository at this point in the history
Bug 1745004:  baremetal: Use podman inspect to check ironic service status
  • Loading branch information
openshift-merge-robot committed Aug 28, 2019
2 parents b0abc58 + 7ce0f5c commit 6318c72
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,14 @@ sudo podman run -d --net host --privileged --name ironic-api \
# The alternative would be RemainAfterExit=yes but then we lose the ability to restart if something crashes.
while true; do
for name in ironic-api ironic-conductor ironic-inspector dnsmasq httpd mariadb; do
podman ps | grep -w "$name$" || exit 1
# Note it would be nicer to use the --format option here but it breaks the go templating
# in the installer and escaping the template appears difficult
state=$(podman inspect ${name} --format {{ "{{.State.Status}}" }})
if [[ $state != "running" ]]; then
echo "ERROR: Unexpected service status for $name"
podman inspect ${name}
exit 1
fi
done
sleep 10
done

0 comments on commit 6318c72

Please sign in to comment.