Merge "Use port 547 for dhcpv6 healthchecks when using IPv6" into stable/train

This commit is contained in:
Zuul 2019-10-24 22:05:29 +00:00 committed by Gerrit Code Review
commit b65825fbb0
1 changed files with 10 additions and 3 deletions

View File

@ -4,9 +4,16 @@
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."
listen_address=$(get_config_val /etc/ironic-inspector/inspector.conf DEFAULT listen_address 127.0.0.1)
# Check DHCPv6 port if using IPv6
if [[ $listen_address =~ ":" ]]; then
port="547"
else
port="67"
fi
echo "Checking $process port(s) $port."
if ! healthcheck_listen $process $port; then
echo "There is no $process process listening on port(s) $port in the container."
exit 1
fi
else