Add IPv6 support to devstack infrastructure
By default, most Openstack services are bound to 0.0.0.0 and service endpoints are registered as IPv4 addresses. With this change we introduce two new variables to control this behavior: SERVICE_IP_VERSION - can either be "4" or "6". When set to "4" (default if not set) devstack will operate as today - most services will open listen sockets on 0.0.0.0 and service endpoints will be registered using HOST_IP as the address. When set to "6" devstack services will open listen sockets on :: and service endpoints will be registered using HOST_IPV6 as the address. There is no support for "4+6", more work is required for that. HOST_IPV6 - if SERVICE_IP_VERSION=6 this must be an IPv6 address configured on the system. Some existing services, like the Openvswitch agent, will continue to use IPv4 addresses for things like tunnel endpoints. This is a current restriction in the code and can be updated at a later time. This change is just a first step to supporting IPv6-only control and data planes in devstack. This change is also partly based on two previous patches, https://review.openstack.org/#/c/140519/ and https://review.openstack.org/#/c/176898/ Change-Id: I5c0b775490ce54ab104fd5e89b20fb700212ae74 Co-Authored-By: Sean Collins <sean@coreitpro.com> Co-Authored-By: Baodong Li <baoli@cisco.com> Co-Authored-By: Sridhar Gaddam <sridhar.gaddam@enovance.com> Co-Authored-By: Adam Kacmarsky <adam.kacmarsky@hp.com> Co-Authored-By: Jeremy Alvis <jeremy.alvis@hp.com>
This commit is contained in:
committed by
Jeremy Alvis
parent
52844a11dd
commit
180f5eb652
25
lib/nova
25
lib/nova
@@ -85,6 +85,8 @@ NOVA_SERVICE_HOST=${NOVA_SERVICE_HOST:-$SERVICE_HOST}
|
||||
NOVA_SERVICE_PORT=${NOVA_SERVICE_PORT:-8774}
|
||||
NOVA_SERVICE_PORT_INT=${NOVA_SERVICE_PORT_INT:-18774}
|
||||
NOVA_SERVICE_PROTOCOL=${NOVA_SERVICE_PROTOCOL:-$SERVICE_PROTOCOL}
|
||||
NOVA_SERVICE_LOCAL_HOST=${NOVA_SERVICE_LOCAL_HOST:-$SERVICE_LOCAL_HOST}
|
||||
NOVA_SERVICE_LISTEN_ADDRESS=${NOVA_SERVICE_LISTEN_ADDRESS:-$SERVICE_LISTEN_ADDRESS}
|
||||
EC2_SERVICE_PORT=${EC2_SERVICE_PORT:-8773}
|
||||
EC2_SERVICE_PORT_INT=${EC2_SERVICE_PORT_INT:-18773}
|
||||
|
||||
@@ -476,11 +478,20 @@ function create_nova_conf {
|
||||
iniset $NOVA_CONF DEFAULT default_floating_pool "$PUBLIC_NETWORK_NAME"
|
||||
iniset $NOVA_CONF DEFAULT s3_host "$SERVICE_HOST"
|
||||
iniset $NOVA_CONF DEFAULT s3_port "$S3_SERVICE_PORT"
|
||||
iniset $NOVA_CONF DEFAULT my_ip "$HOST_IP"
|
||||
if [[ $SERVICE_IP_VERSION == 6 ]]; then
|
||||
iniset $NOVA_CONF DEFAULT my_ip "$HOST_IPV6"
|
||||
iniset $NOVA_CONF DEFAULT use_ipv6 "True"
|
||||
else
|
||||
iniset $NOVA_CONF DEFAULT my_ip "$HOST_IP"
|
||||
fi
|
||||
iniset $NOVA_CONF database connection `database_connection_url nova`
|
||||
iniset $NOVA_CONF api_database connection `database_connection_url nova_api`
|
||||
iniset $NOVA_CONF DEFAULT instance_name_template "${INSTANCE_NAME_PREFIX}%08x"
|
||||
iniset $NOVA_CONF osapi_v3 enabled "True"
|
||||
iniset $NOVA_CONF DEFAULT osapi_compute_listen "$NOVA_SERVICE_LISTEN_ADDRESS"
|
||||
iniset $NOVA_CONF DEFAULT ec2_listen "$NOVA_SERVICE_LISTEN_ADDRESS"
|
||||
iniset $NOVA_CONF DEFAULT metadata_listen "$NOVA_SERVICE_LISTEN_ADDRESS"
|
||||
iniset $NOVA_CONF DEFAULT s3_listen "$NOVA_SERVICE_LISTEN_ADDRESS"
|
||||
|
||||
if is_fedora || is_suse; then
|
||||
# nova defaults to /usr/local/bin, but fedora and suse pip like to
|
||||
@@ -560,11 +571,13 @@ function create_nova_conf {
|
||||
if is_service_enabled n-novnc || is_service_enabled n-xvnc || [ "$NOVA_VNC_ENABLED" != False ]; then
|
||||
# Address on which instance vncservers will listen on compute hosts.
|
||||
# For multi-host, this should be the management ip of the compute host.
|
||||
VNCSERVER_LISTEN=${VNCSERVER_LISTEN=127.0.0.1}
|
||||
VNCSERVER_PROXYCLIENT_ADDRESS=${VNCSERVER_PROXYCLIENT_ADDRESS=127.0.0.1}
|
||||
VNCSERVER_LISTEN=${VNCSERVER_LISTEN=$NOVA_SERVICE_LOCAL_HOST}
|
||||
VNCSERVER_PROXYCLIENT_ADDRESS=${VNCSERVER_PROXYCLIENT_ADDRESS=$NOVA_SERVICE_LOCAL_HOST}
|
||||
iniset $NOVA_CONF DEFAULT vnc_enabled true
|
||||
iniset $NOVA_CONF DEFAULT vncserver_listen "$VNCSERVER_LISTEN"
|
||||
iniset $NOVA_CONF DEFAULT vncserver_proxyclient_address "$VNCSERVER_PROXYCLIENT_ADDRESS"
|
||||
iniset $NOVA_CONF DEFAULT novncproxy_host "$NOVA_SERVICE_LISTEN_ADDRESS"
|
||||
iniset $NOVA_CONF DEFAULT xvpvncproxy_host "$NOVA_SERVICE_LISTEN_ADDRESS"
|
||||
else
|
||||
iniset $NOVA_CONF DEFAULT vnc_enabled false
|
||||
fi
|
||||
@@ -572,11 +585,12 @@ function create_nova_conf {
|
||||
if is_service_enabled n-spice; then
|
||||
# Address on which instance spiceservers will listen on compute hosts.
|
||||
# For multi-host, this should be the management ip of the compute host.
|
||||
SPICESERVER_PROXYCLIENT_ADDRESS=${SPICESERVER_PROXYCLIENT_ADDRESS=127.0.0.1}
|
||||
SPICESERVER_LISTEN=${SPICESERVER_LISTEN=127.0.0.1}
|
||||
SPICESERVER_PROXYCLIENT_ADDRESS=${SPICESERVER_PROXYCLIENT_ADDRESS=$NOVA_SERVICE_LOCAL_HOST}
|
||||
SPICESERVER_LISTEN=${SPICESERVER_LISTEN=$NOVA_SERVICE_LOCAL_HOST}
|
||||
iniset $NOVA_CONF spice enabled true
|
||||
iniset $NOVA_CONF spice server_listen "$SPICESERVER_LISTEN"
|
||||
iniset $NOVA_CONF spice server_proxyclient_address "$SPICESERVER_PROXYCLIENT_ADDRESS"
|
||||
iniset $NOVA_CONF spice html5proxy_host "$NOVA_SERVICE_LISTEN_ADDRESS"
|
||||
else
|
||||
iniset $NOVA_CONF spice enabled false
|
||||
fi
|
||||
@@ -616,6 +630,7 @@ function create_nova_conf {
|
||||
fi
|
||||
|
||||
if is_service_enabled n-sproxy; then
|
||||
iniset $NOVA_CONF serial_console serialproxy_host "$NOVA_SERVICE_LISTEN_ADDRESS"
|
||||
iniset $NOVA_CONF serial_console enabled True
|
||||
fi
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user