From 7ee105a0c6375d8a56aba0f957cc7127f2ee39aa Mon Sep 17 00:00:00 2001 From: Martin Schuppert Date: Mon, 17 Dec 2018 08:19:43 +0100 Subject: [PATCH] IPv6 healthcheck fixes for nova-vnc-proxy In case of IPv6 URLs brackets are required. This adds a check for IPv6 and adds brackets if needed. Change-Id: If0931c605c92adc74c9a743faacff56cbe5db7f5 --- healthcheck/nova-vnc-proxy | 5 +++++ .../notes/nova-vnc-proxy-ipv6-handling-5d0625f1ab10d13f.yaml | 5 +++++ 2 files changed, 10 insertions(+) create mode 100644 healthcheck/releasenotes/notes/nova-vnc-proxy-ipv6-handling-5d0625f1ab10d13f.yaml diff --git a/healthcheck/nova-vnc-proxy b/healthcheck/nova-vnc-proxy index d56257817..e8e24c589 100755 --- a/healthcheck/nova-vnc-proxy +++ b/healthcheck/nova-vnc-proxy @@ -12,4 +12,9 @@ if [ "${proto_is_ssl,,}" = true ] ; then bind_proto=https fi +# Add brackets if IPv6 +if [[ $bind_host =~ ":" ]]; then + bind_host="[${bind_host}]" +fi + healthcheck_curl ${bind_proto}://${bind_host}:${bind_port}/ diff --git a/healthcheck/releasenotes/notes/nova-vnc-proxy-ipv6-handling-5d0625f1ab10d13f.yaml b/healthcheck/releasenotes/notes/nova-vnc-proxy-ipv6-handling-5d0625f1ab10d13f.yaml new file mode 100644 index 000000000..714193ece --- /dev/null +++ b/healthcheck/releasenotes/notes/nova-vnc-proxy-ipv6-handling-5d0625f1ab10d13f.yaml @@ -0,0 +1,5 @@ +--- +fixes: + - | + In case of IPv6 URLs brackets are required. This adds a check for IPv6 and + adds brackets if needed.