healthcheck: List udp ports with ss
Looks like octavia healthmanager uses UDP 5555 port. Also changes octavia-health-manager healath check to use healthcheck_port rather than healthcheck_listen, as udp is a connectionless protocol. Change-Id: Id48d5efe17eeb1a524e280d8885e98cfe1a5577a Related-Bug: #1843555
This commit is contained in:
parent
a27e7f04be
commit
0ca91f0d14
@ -47,7 +47,7 @@ healthcheck_port () {
|
||||
# port by using "sudo -u" to get the right output.
|
||||
# Note: the privileged containers have the correct ss output with root
|
||||
# user; which is why we need to run with both users, as a best effort.
|
||||
(ss -ntp; sudo -u $puser ss -ntp) | sort -u | grep -qE ":($ports).*,pid=($pids),"
|
||||
(ss -ntuap; sudo -u $puser ss -ntuap) | sort -u | grep -qE ":($ports).*,pid=($pids),"
|
||||
}
|
||||
|
||||
healthcheck_listen () {
|
||||
|
@ -5,7 +5,7 @@
|
||||
process='octavia-health-manager'
|
||||
args="${@:-5555}"
|
||||
|
||||
if healthcheck_listen $process $args; then
|
||||
if healthcheck_port $process $args; then
|
||||
exit 0
|
||||
else
|
||||
ports=${args// /,}
|
||||
|
Loading…
Reference in New Issue
Block a user