From 85f3b5f3f8c5b9d340c4b00682ab25d24271fc7a Mon Sep 17 00:00:00 2001 From: Janki Chhatbar Date: Tue, 28 Aug 2018 11:21:09 +0530 Subject: [PATCH] Make ODL healthcheck IPv6 compatible Add missing brackets around IPv6 address in healthcheck curl URL for ODL. Change-Id: I165a3a44fad12c36160d201541971cf0a395b38c Closes-Bug: #1789350 (cherry picked from commit 2ed70a654b6cd91256da49806cdbb2b4918fb1a3) --- healthcheck/opendaylight-api | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/healthcheck/opendaylight-api b/healthcheck/opendaylight-api index 0e23eedd8..68394f2ca 100755 --- a/healthcheck/opendaylight-api +++ b/healthcheck/opendaylight-api @@ -11,4 +11,9 @@ else bind_port=$(awk -F "= *" '/^org.osgi.service.http.port.secure/ {print $2}' $file) fi +# Make Healthcheck URL IPv6 compatible +if [[ $bind_host =~ .*:.* ]]; then + bind_host="[${bind_host}]" +fi + healthcheck_curl http://$bind_host:$bind_port/diagstatus