tripleo-common/healthcheck/opendaylight-api
Tim Rozet 39c6c98a3c Updates OpenDaylight healthcheck URI
The new URI is more accurate and only supported as of ODL version
Fluorine.

Closes-Bug: 1779215

Change-Id: I3e51820ec26afb1629e58500c469140a094ce2f7
Signed-off-by: Tim Rozet <trozet@redhat.com>
2018-06-28 17:17:44 -04:00

15 lines
612 B
Bash
Executable File

#!/bin/bash
. ${HEALTHCHECK_SCRIPTS:-/usr/share/openstack-tripleo-common/healthcheck}/common.sh
file=/opt/opendaylight/etc/org.ops4j.pax.web.cfg
bind_host=$(awk -F "= *" '/^org.ops4j.pax.web.listening.addresses/ {print $2}' $file)
tls_enabled=$(awk -F "= *" '/^org.osgi.service.http.secure.enabled/ {print $2}' $file)
if [[ -z "$tls_enabled" || "$tls_enabled" != "true" ]]; then
bind_port=$(awk -F "= *" '/^org.osgi.service.http.port\s*=/ {print $2}' $file)
else
bind_port=$(awk -F "= *" '/^org.osgi.service.http.port.secure/ {print $2}' $file)
fi
healthcheck_curl http://$bind_host:$bind_port/diagstatus