Use port 547 for dhcpv6 healthchecks when using IPv6
Check the listen-address to determine if using IPv6 on the ctlplane and set the DHCP port accordingly. Change-Id: I5602aa1298dda998b9a58f7234593683281414c3 Closes-Bug: 1847380
This commit is contained in:
parent
879518c5cb
commit
6b3b39f695
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user