Merge "Prepare neutron "use_namespaces" option removal"
This commit is contained in:
commit
f1d34ec8c0
@ -516,13 +516,8 @@ function create_ovs_taps {
|
||||
# intentional sleep to make sure the tag has been set to port
|
||||
sleep 10
|
||||
|
||||
if [[ "$Q_USE_NAMESPACE" = "True" ]]; then
|
||||
local tapdev
|
||||
tapdev=$(sudo ip netns exec qdhcp-${ironic_net_id} ip link list | grep " tap" | cut -d':' -f2 | cut -d'@' -f1 | cut -b2-)
|
||||
else
|
||||
local tapdev
|
||||
tapdev=$(sudo ip link list | grep " tap" | cut -d':' -f2 | cut -d'@' -f1 | cut -b2-)
|
||||
fi
|
||||
local tapdev
|
||||
tapdev=$(sudo ip netns exec qdhcp-${ironic_net_id} ip link list | grep " tap" | cut -d':' -f2 | cut -d'@' -f1 | cut -b2-)
|
||||
local tag_id
|
||||
tag_id=$(sudo ovs-vsctl show |grep ${tapdev} -A1 -m1 | grep tag | cut -d':' -f2 | cut -b2-)
|
||||
|
||||
|
@ -144,8 +144,6 @@ Q_LISTEN_ADDRESS=${Q_LISTEN_ADDRESS:-$SERVICE_LISTEN_ADDRESS}
|
||||
Q_ADMIN_USERNAME=${Q_ADMIN_USERNAME:-neutron}
|
||||
# Default auth strategy
|
||||
Q_AUTH_STRATEGY=${Q_AUTH_STRATEGY:-keystone}
|
||||
# Use namespace or not
|
||||
Q_USE_NAMESPACE=${Q_USE_NAMESPACE:-True}
|
||||
# RHEL's support for namespaces requires using veths with ovs
|
||||
Q_OVS_USE_VETH=${Q_OVS_USE_VETH:-False}
|
||||
Q_USE_ROOTWRAP=${Q_USE_ROOTWRAP:-True}
|
||||
@ -208,7 +206,7 @@ Q_PUBLIC_VETH_INT=${Q_PUBLIC_VETH_INT:-veth-pub-int}
|
||||
# The plugin supports L3.
|
||||
Q_L3_ENABLED=${Q_L3_ENABLED:-False}
|
||||
# L3 routers exist per tenant
|
||||
Q_L3_ROUTER_PER_TENANT=${Q_L3_ROUTER_PER_TENANT:-False}
|
||||
Q_L3_ROUTER_PER_TENANT=${Q_L3_ROUTER_PER_TENANT:-True}
|
||||
|
||||
# List of config file names in addition to the main plugin config file
|
||||
# See _configure_neutron_common() for details about setting it up
|
||||
@ -968,7 +966,6 @@ function _configure_neutron_debug_command {
|
||||
|
||||
iniset $NEUTRON_TEST_CONFIG_FILE DEFAULT verbose False
|
||||
iniset $NEUTRON_TEST_CONFIG_FILE DEFAULT debug False
|
||||
iniset $NEUTRON_TEST_CONFIG_FILE DEFAULT use_namespaces $Q_USE_NAMESPACE
|
||||
iniset $NEUTRON_TEST_CONFIG_FILE AGENT root_helper "$Q_RR_COMMAND"
|
||||
if [[ "$Q_USE_ROOTWRAP_DAEMON" == "True" ]]; then
|
||||
iniset $NEUTRON_TEST_CONFIG_FILE AGENT root_helper_daemon "$Q_RR_DAEMON_COMMAND"
|
||||
@ -985,7 +982,6 @@ function _configure_neutron_dhcp_agent {
|
||||
|
||||
iniset $Q_DHCP_CONF_FILE DEFAULT verbose True
|
||||
iniset $Q_DHCP_CONF_FILE DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL
|
||||
iniset $Q_DHCP_CONF_FILE DEFAULT use_namespaces $Q_USE_NAMESPACE
|
||||
iniset $Q_DHCP_CONF_FILE AGENT root_helper "$Q_RR_COMMAND"
|
||||
if [[ "$Q_USE_ROOTWRAP_DAEMON" == "True" ]]; then
|
||||
iniset $Q_DHCP_CONF_FILE AGENT root_helper_daemon "$Q_RR_DAEMON_COMMAND"
|
||||
@ -1009,8 +1005,6 @@ function _configure_neutron_dhcp_agent {
|
||||
|
||||
function _configure_neutron_l3_agent {
|
||||
Q_L3_ENABLED=True
|
||||
# for l3-agent, only use per tenant router if we have namespaces
|
||||
Q_L3_ROUTER_PER_TENANT=$Q_USE_NAMESPACE
|
||||
|
||||
if is_service_enabled q-vpn; then
|
||||
neutron_vpn_configure_agent
|
||||
@ -1020,7 +1014,6 @@ function _configure_neutron_l3_agent {
|
||||
|
||||
iniset $Q_L3_CONF_FILE DEFAULT verbose True
|
||||
iniset $Q_L3_CONF_FILE DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL
|
||||
iniset $Q_L3_CONF_FILE DEFAULT use_namespaces $Q_USE_NAMESPACE
|
||||
iniset $Q_L3_CONF_FILE AGENT root_helper "$Q_RR_COMMAND"
|
||||
if [[ "$Q_USE_ROOTWRAP_DAEMON" == "True" ]]; then
|
||||
iniset $Q_L3_CONF_FILE AGENT root_helper_daemon "$Q_RR_DAEMON_COMMAND"
|
||||
@ -1309,7 +1302,7 @@ function _neutron_configure_router_v4 {
|
||||
if is_service_enabled q-l3; then
|
||||
# Configure and enable public bridge
|
||||
local ext_gw_interface="none"
|
||||
if is_neutron_ovs_base_plugin && [[ "$Q_USE_NAMESPACE" = "True" ]]; then
|
||||
if is_neutron_ovs_base_plugin; then
|
||||
ext_gw_interface=$(_neutron_get_ext_gw_interface)
|
||||
elif [[ "$Q_AGENT" = "linuxbridge" ]]; then
|
||||
# Search for the brq device the neutron router and network for $FIXED_RANGE
|
||||
@ -1359,7 +1352,7 @@ function _neutron_configure_router_v6 {
|
||||
IPV6_ROUTER_GW_IP=`neutron port-list -c fixed_ips | grep $ipv6_pub_subnet_id | awk -F '"' -v subnet_id=$ipv6_pub_subnet_id '$4 == subnet_id { print $8; }'`
|
||||
die_if_not_set $LINENO IPV6_ROUTER_GW_IP "Failure retrieving IPV6_ROUTER_GW_IP"
|
||||
|
||||
if is_neutron_ovs_base_plugin && [[ "$Q_USE_NAMESPACE" = "True" ]]; then
|
||||
if is_neutron_ovs_base_plugin; then
|
||||
local ext_gw_interface
|
||||
ext_gw_interface=$(_neutron_get_ext_gw_interface)
|
||||
local ipv6_cidr_len=${IPV6_PUBLIC_RANGE#*/}
|
||||
@ -1374,7 +1367,7 @@ function _neutron_configure_router_v6 {
|
||||
|
||||
# Explicitly set router id in l3 agent configuration
|
||||
function _neutron_set_router_id {
|
||||
if [[ "$Q_USE_NAMESPACE" == "False" ]]; then
|
||||
if [[ "$Q_L3_ROUTER_PER_TENANT" == "False" ]]; then
|
||||
iniset $Q_L3_CONF_FILE DEFAULT router_id $ROUTER_ID
|
||||
fi
|
||||
}
|
||||
|
19
lib/tempest
19
lib/tempest
@ -15,7 +15,6 @@
|
||||
# - ``SERVICE_HOST``
|
||||
# - ``BASE_SQL_CONN`` ``lib/database`` declares
|
||||
# - ``PUBLIC_NETWORK_NAME``
|
||||
# - ``Q_USE_NAMESPACE``
|
||||
# - ``Q_ROUTER_NAME``
|
||||
# - ``Q_L3_ENABLED``
|
||||
# - ``VIRT_DRIVER``
|
||||
@ -132,7 +131,6 @@ function configure_tempest {
|
||||
local flavor_lines
|
||||
local public_network_id
|
||||
local public_router_id
|
||||
local tenant_networks_reachable
|
||||
local boto_instance_type="m1.tiny"
|
||||
local ssh_connect_method="fixed"
|
||||
|
||||
@ -246,13 +244,8 @@ function configure_tempest {
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$Q_USE_NAMESPACE" != "False" ]; then
|
||||
tenant_networks_reachable=false
|
||||
if ! is_service_enabled n-net; then
|
||||
ssh_connect_method="floating"
|
||||
fi
|
||||
else
|
||||
tenant_networks_reachable=true
|
||||
if ! is_service_enabled n-net; then
|
||||
ssh_connect_method="floating"
|
||||
fi
|
||||
|
||||
ssh_connect_method=${TEMPEST_SSH_CONNECT_METHOD:-$ssh_connect_method}
|
||||
@ -260,12 +253,6 @@ function configure_tempest {
|
||||
if [ "$Q_L3_ENABLED" = "True" ]; then
|
||||
public_network_id=$(neutron net-list | grep $PUBLIC_NETWORK_NAME | \
|
||||
awk '{print $2}')
|
||||
if [ "$Q_USE_NAMESPACE" == "False" ]; then
|
||||
# If namespaces are disabled, DevStack will create a single
|
||||
# public router that tempest should be configured to use.
|
||||
public_router_id=$(neutron router-list | awk "/ $Q_ROUTER_NAME / \
|
||||
{ print \$2 }")
|
||||
fi
|
||||
fi
|
||||
|
||||
EC2_URL=$(get_endpoint_url ec2 public || true)
|
||||
@ -394,7 +381,7 @@ function configure_tempest {
|
||||
|
||||
# Network
|
||||
iniset $TEMPEST_CONFIG network api_version 2.0
|
||||
iniset $TEMPEST_CONFIG network tenant_networks_reachable "$tenant_networks_reachable"
|
||||
iniset $TEMPEST_CONFIG network tenant_networks_reachable false
|
||||
iniset $TEMPEST_CONFIG network public_network_id "$public_network_id"
|
||||
iniset $TEMPEST_CONFIG network public_router_id "$public_router_id"
|
||||
iniset $TEMPEST_CONFIG network default_network "$FIXED_RANGE"
|
||||
|
Loading…
Reference in New Issue
Block a user