Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1656947

Summary: [OSP13] nova_vnc_proxy container reports unhealthy state on IPv6 environments
Product: Red Hat OpenStack Reporter: Marius Cornea <mcornea>
Component: openstack-tripleo-commonAssignee: Martin Schuppert <mschuppe>
Status: CLOSED ERRATA QA Contact: Alexander Chuzhoy <sasha>
Severity: high Docs Contact:
Priority: high    
Version: 14.0 (Rocky)CC: awaugama, dbecker, jschluet, kchamart, mbooth, mburns, morazi, mschuppe, slinaber
Target Milestone: z5Keywords: Triaged, ZStream
Target Release: 13.0 (Queens)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-tripleo-common-8.6.6-9.el7ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1660091 (view as bug list) Environment:
Last Closed: 2019-03-14 13:55:05 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Marius Cornea 2018-12-06 17:35:09 UTC
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:

Comment 1 Martin Schuppert 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

Comment 2 Kashyap Chamarthy 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 21 errata-xmlrpc 2019-03-14 13:55:05 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:0448