![Steve Baker](/assets/img/avatar_default.png)
This check is broken because healthcheck_port uses the user of the process, but the /proc files accessed are owned by root. This is probably because dnsmasq starts as root to bind to priviliged port 67, then drops to the dnsmasq user. This healthcheck likely doesn't add much value since it is a self-contained tool which will be bound to the port if it is running. See https://bugzilla.redhat.com/show_bug.cgi?id=1961237 Change-Id: Ic23e80465356f0a336621008e0a9d5b0c295d816
13 lines
420 B
Bash
Executable File
13 lines
420 B
Bash
Executable File
#!/bin/sh
|
|
|
|
. ${HEALTHCHECK_SCRIPTS:-/usr/share/openstack-tripleo-common/healthcheck}/common.sh
|
|
|
|
process='dnsmasq'
|
|
if pgrep $process; then
|
|
exit 0
|
|
else
|
|
bind_host=$(wrap_ipv6 $(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
|