Bug 1660091

Summary: [OSP14] nova_vnc_proxy container reports unhealthy state on IPv6 environments
Product: Red Hat OpenStack Reporter: Martin Schuppert <mschuppe>
Component: openstack-tripleo-commonAssignee: Martin Schuppert <mschuppe>
Status: CLOSED ERRATA QA Contact: Joe H. Rahme <jhakimra>
Severity: high Docs Contact:
Priority: high    
Version: 14.0 (Rocky)CC: awaugama, emacchi, mburns, slinaber
Target Milestone: z1Keywords: Triaged, ZStream
Target Release: 14.0 (Rocky)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-tripleo-common-9.4.1-0.20181012010889.el7ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1656947 Environment:
Last Closed: 2019-03-18 13:03:25 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Martin Schuppert 2018-12-17 13:36:32 UTC
+++ This bug was initially created as a clone of Bug #1656947 +++

Description of problem:
nova_vnc_proxy container is in unhealthy state on IPv6 environments:

[root@controller-0 ~]# docker ps | grep unhealthy
20eab4075181        192.168.24.1:8787/rhosp14/openstack-nova-novncproxy:2018-12-05.2           "kolla_start"            10 minutes ago      Up 10 minutes (unhealthy)                       nova_vnc_proxy
[root@controller-0 ~]# docker exec -it nova_vnc_proxy bash
()[nova@controller-0 /]$ bash -x /openstack/healthcheck
+ . /usr/share/openstack-tripleo-common/healthcheck/common.sh
++ : 10
++ : curl-healthcheck
++ : '\n%{http_code}' '%{remote_ip}:%{remote_port}' '%{time_total}' 'seconds\n'
++ get_config_val /etc/nova/nova.conf vnc novncproxy_host 127.0.0.1
++ crudini --get /etc/nova/nova.conf vnc novncproxy_host
+ bind_host=fd00:fd00:fd00:2000::14
++ get_config_val /etc/nova/nova.conf vnc novncproxy_port 6080
++ crudini --get /etc/nova/nova.conf vnc novncproxy_port
+ bind_port=6080
++ get_config_val /etc/nova/nova.conf DEFAULT ssl_only false
++ crudini --get /etc/nova/nova.conf DEFAULT ssl_only
+ proto_is_ssl=False
+ bind_proto=http
+ '[' false = true ']'
+ healthcheck_curl http://fd00:fd00:fd00:2000::14:6080/
+ curl -g -k -q --fail --max-time 10 --user-agent curl-healthcheck --write-out '\n%{http_code} %{remote_ip}:%{remote_port} %{time_total} seconds\n' http://fd00:fd00:fd00:2000::14:6080/

000 :0 0.000 seconds
curl: (3) IPv6 numerical address used in URL without brackets
+ return 1

Version-Release number of selected component (if applicable):
2018-12-05.2 puddle

How reproducible:
100%

Steps to Reproduce:
1. Deploy overcloud with IPv6 isolate networks
2. Check nova_vnc_proxy health status

Actual results:
unhealthy

Expected results:
healthy

Additional info:

--- Additional comment from Martin Schuppert on 2018-12-14 14:48:51 UTC ---

brackets missing for IPv6 in [1]

# Add brackets if IPv6
if [[ $bind_host =~ ":" ]]; then
    bind_host="[${bind_host}]"
fi

[1] https://github.com/openstack/tripleo-common/blob/master/healthcheck/nova-vnc-proxy

--- Additional comment from Kashyap Chamarthy on 2018-12-14 15:21:05 UTC ---

(In reply to Marius Cornea from comment #0)
> Description of problem:
> nova_vnc_proxy container is in unhealthy state on IPv6 environments:
> 
> [root@controller-0 ~]# docker ps | grep unhealthy
> 20eab4075181       
> 192.168.24.1:8787/rhosp14/openstack-nova-novncproxy:2018-12-05.2          
> "kolla_start"            10 minutes ago      Up 10 minutes (unhealthy)      
> nova_vnc_proxy
> [root@controller-0 ~]# docker exec -it nova_vnc_proxy bash
> ()[nova@controller-0 /]$ bash -x /openstack/healthcheck
> + . /usr/share/openstack-tripleo-common/healthcheck/common.sh
> ++ : 10
> ++ : curl-healthcheck
> ++ : '\n%{http_code}' '%{remote_ip}:%{remote_port}' '%{time_total}'
> 'seconds\n'
> ++ get_config_val /etc/nova/nova.conf vnc novncproxy_host 127.0.0.1
> ++ crudini --get /etc/nova/nova.conf vnc novncproxy_host
> + bind_host=fd00:fd00:fd00:2000::14
> ++ get_config_val /etc/nova/nova.conf vnc novncproxy_port 6080
> ++ crudini --get /etc/nova/nova.conf vnc novncproxy_port
> + bind_port=6080
> ++ get_config_val /etc/nova/nova.conf DEFAULT ssl_only false
> ++ crudini --get /etc/nova/nova.conf DEFAULT ssl_only
> + proto_is_ssl=False
> + bind_proto=http
> + '[' false = true ']'
> + healthcheck_curl http://fd00:fd00:fd00:2000::14:6080/
> + curl -g -k -q --fail --max-time 10 --user-agent curl-healthcheck
> --write-out '\n%{http_code} %{remote_ip}:%{remote_port} %{time_total}
> seconds\n' http://fd00:fd00:fd00:2000::14:6080/

As Martin noted in his comment, the above IP v6 address in the `curl` command should be put in brackets (some subtle `curl` bug).  (Also it's good that the `curl` command is using '-g', which turns off the "URL globbing parser", and is required if you're using {}[] characters.)

[...]

Comment 5 Mikey Ariel 2019-02-20 12:44:28 UTC
If this bug requires doc text for errata release, please set the 'Doc Type' and provide draft text according to the template in the 'Doc Text' field. The documentation team will review, edit, and approve the text.

If this bug does not require doc text, please set the 'requires_doc_text' flag to -.

Comment 7 errata-xmlrpc 2019-03-18 13:03:25 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:0446