f25a2f35b7
This patch add health checks for ironic_inspector container
and ironic_inspector_dnsmasq container. Inspector health is checked
using curl of the API interface and dnsmasq is checked using opened
port verification.
Partial-Bug: #1801068
Change-Id: I0bcc713d342f6388750dd9dcecf439db3c59d651
(cherry picked from commit d03c53c3e4
)
17 lines
579 B
Bash
Executable File
17 lines
579 B
Bash
Executable File
#!/bin/sh
|
|
|
|
. ${HEALTHCHECK_SCRIPTS:-/usr/share/openstack-tripleo-common/healthcheck}/common.sh
|
|
|
|
process='dnsmasq'
|
|
if pgrep $process; then
|
|
ports="${@:-67}"
|
|
if ! healthcheck_listen $process $ports; then
|
|
echo "There is no $process process listening on port(s) $ports in the container."
|
|
exit 1
|
|
fi
|
|
else
|
|
bind_host=$(get_config_val /etc/ironic-inspector/inspector.conf DEFAULT listen_address 127.0.0.1)
|
|
bind_port=$(get_config_val /etc/ironic-inspector/inspector.conf DEFAULT listen_port 5050)
|
|
healthcheck_curl http://${bind_host}:${bind_port}
|
|
fi
|