@@ -23,32 +23,43 @@ function verify_devstack_ipv6_setting {
2323 _service_listen_address=$( echo $SERVICE_LISTEN_ADDRESS | tr -d [])
2424 local _service_local_host=' '
2525 _service_local_host=$( echo $SERVICE_LOCAL_HOST | tr -d [])
26+ local _tunnel_endpoint_ip=' '
27+ _tunnel_endpoint_ip=$( echo $TUNNEL_ENDPOINT_IP | tr -d [])
2628 if [[ " $SERVICE_IP_VERSION " != 6 ]]; then
2729 echo $SERVICE_IP_VERSION " SERVICE_IP_VERSION is not set to 6 which is must for devstack to deploy services with IPv6 address."
2830 exit 1
2931 fi
32+ if [[ " $TUNNEL_IP_VERSION " != 6 ]]; then
33+ echo $TUNNEL_IP_VERSION " TUNNEL_IP_VERSION is not set to 6 so TUNNEL_ENDPOINT_IP cannot be an IPv6 address."
34+ exit 1
35+ fi
3036 is_service_host_ipv6=$( python3 -c ' import oslo_utils.netutils as nutils; print(nutils.is_valid_ipv6("' $_service_host ' "))' )
3137 if [[ " $is_service_host_ipv6 " != " True" ]]; then
32- echo $SERVICE_HOST " SERVICE_HOST is not ipv6 which means devstack cannot deploy services on IPv6 address ."
38+ echo $SERVICE_HOST " SERVICE_HOST is not IPv6 which means devstack cannot deploy services on IPv6 addresses ."
3339 exit 1
3440 fi
3541 is_host_ipv6=$( python3 -c ' import oslo_utils.netutils as nutils; print(nutils.is_valid_ipv6("' $_host_ipv6 ' "))' )
3642 if [[ " $is_host_ipv6 " != " True" ]]; then
37- echo $HOST_IPV6 " HOST_IPV6 is not ipv6 which means devstack cannot deploy services on IPv6 address ."
43+ echo $HOST_IPV6 " HOST_IPV6 is not IPv6 which means devstack cannot deploy services on IPv6 addresses ."
3844 exit 1
3945 fi
4046 is_service_listen_address=$( python3 -c ' import oslo_utils.netutils as nutils; print(nutils.is_valid_ipv6("' $_service_listen_address ' "))' )
4147 if [[ " $is_service_listen_address " != " True" ]]; then
42- echo $SERVICE_LISTEN_ADDRESS " SERVICE_LISTEN_ADDRESS is not ipv6 which means devstack cannot deploy services on IPv6 address ."
48+ echo $SERVICE_LISTEN_ADDRESS " SERVICE_LISTEN_ADDRESS is not IPv6 which means devstack cannot deploy services on IPv6 addresses ."
4349 exit 1
4450 fi
4551 is_service_local_host=$( python3 -c ' import oslo_utils.netutils as nutils; print(nutils.is_valid_ipv6("' $_service_local_host ' "))' )
4652 if [[ " $is_service_local_host " != " True" ]]; then
47- echo $SERVICE_LOCAL_HOST " SERVICE_LOCAL_HOST is not ipv6 which means devstack cannot deploy services on IPv6 address."
53+ echo $SERVICE_LOCAL_HOST " SERVICE_LOCAL_HOST is not IPv6 which means devstack cannot deploy services on IPv6 addresses."
54+ exit 1
55+ fi
56+ is_tunnel_endpoint_ip=$( python3 -c ' import oslo_utils.netutils as nutils; print(nutils.is_valid_ipv6("' $_tunnel_endpoint_ip ' "))' )
57+ if [[ " $is_tunnel_endpoint_ip " != " True" ]]; then
58+ echo $TUNNEL_ENDPOINT_IP " TUNNEL_ENDPOINT_IP is not IPv6 which means devstack will not deploy with an IPv6 endpoint address."
4859 exit 1
4960 fi
5061 echo " Devstack is properly configured with IPv6"
51- echo " SERVICE_IP_VERSION: " $SERVICE_IP_VERSION " HOST_IPV6: " $HOST_IPV6 " SERVICE_HOST: " $SERVICE_HOST " SERVICE_LISTEN_ADDRESS: " $SERVICE_LISTEN_ADDRESS " SERVICE_LOCAL_HOST: " $SERVICE_LOCAL_HOST
62+ echo " SERVICE_IP_VERSION:" $SERVICE_IP_VERSION " HOST_IPV6:" $HOST_IPV6 " SERVICE_HOST:" $SERVICE_HOST " SERVICE_LISTEN_ADDRESS:" $SERVICE_LISTEN_ADDRESS " SERVICE_LOCAL_HOST:" $SERVICE_LOCAL_HOST " TUNNEL_IP_VERSION: " $TUNNEL_IP_VERSION " TUNNEL_ENDPOINT_IP: " $TUNNEL_ENDPOINT_IP
5263}
5364
5465function sanity_check_system_ipv6_enabled {
@@ -72,15 +83,15 @@ function verify_service_listen_address_is_ipv6 {
7283 is_endpoint_ipv6=$( python3 -c ' import oslo_utils.netutils as nutils; print(nutils.is_valid_ipv6("' $endpoint_address ' "))' )
7384 if [[ " $is_endpoint_ipv6 " != " True" ]]; then
7485 all_ipv6=False
75- echo $endpoint " : This is not ipv6 endpoint which means corresponding service is not listening on IPv6 address."
86+ echo $endpoint " : This is not an IPv6 endpoint which means corresponding service is not listening on an IPv6 address."
7687 continue
7788 fi
7889 endpoints_verified=True
7990 done
8091 if [[ " $all_ipv6 " == " False" ]] || [[ " $endpoints_verified " == " False" ]]; then
8192 exit 1
8293 fi
83- echo " All services deployed by devstack is on IPv6 endpoints"
94+ echo " All services deployed by devstack are on IPv6 endpoints"
8495 echo $endpoints
8596}
8697
0 commit comments