Use healthcheck_port for ironic_inspector_dnsmasq healthcheck

ironic_inspector_dnsmasq healthchecks currently use healthcheck_listen()
to check if dnsmasq is listening for udp packets on the DHCP port. In
Train we are seeing occasional failures with this healthcheck. It may be
the same issue as in https://bugs.launchpad.net/tripleo/+bug/1860556,
which was resolved for healthcheck_port but not for healthcheck_listen.

It appears that this has been redone in master to get away from 'ss' -
https://review.opendev.org/#/c/708339/. However, in master healthcheck_listen
only works with tcp ports, so the ironic_inspector_dnsmasq healthcheck
fails in master too.

A better way is to use healthcheck_port for ironic_inspector_dnsmasq
healthchecks. Since this is a udp port, this will work with Train and master

Change-Id: I16e6d462b0eca60e75eb5b91259575e62f17fe31
Closes-Bug: 1873049
(cherry picked from commit e284c5f75b)
This commit is contained in:
Bob Fournier 2020-04-15 13:56:01 -04:00
parent d5bb4f173f
commit 4edf36c2db
1 changed files with 1 additions and 1 deletions

View File

@ -12,7 +12,7 @@ if pgrep $process; then
port="67"
fi
echo "Checking $process port(s) $port."
if ! healthcheck_listen $process $port; then
if ! healthcheck_port $process $port; then
echo "There is no $process process listening on port(s) $port in the container."
exit 1
fi