Browse code

Merge "Prepare neutron "use_namespaces" option removal"

Jenkins authored on 2015/10/29 13:57:27
Showing 3 changed files
... ...
@@ -516,13 +516,8 @@ function create_ovs_taps {
516 516
     # intentional sleep to make sure the tag has been set to port
517 517
     sleep 10
518 518
 
519
-    if  [[ "$Q_USE_NAMESPACE" = "True" ]]; then
520
-        local tapdev
521
-        tapdev=$(sudo ip netns exec qdhcp-${ironic_net_id} ip link list | grep " tap" | cut -d':' -f2 | cut -d'@' -f1 | cut -b2-)
522
-    else
523
-        local tapdev
524
-        tapdev=$(sudo ip link list | grep " tap" | cut -d':' -f2 | cut -d'@' -f1 | cut -b2-)
525
-    fi
519
+    local tapdev
520
+    tapdev=$(sudo ip netns exec qdhcp-${ironic_net_id} ip link list | grep " tap" | cut -d':' -f2 | cut -d'@' -f1 | cut -b2-)
526 521
     local tag_id
527 522
     tag_id=$(sudo ovs-vsctl show |grep ${tapdev} -A1 -m1 | grep tag | cut -d':' -f2 | cut -b2-)
528 523
 
... ...
@@ -144,8 +144,6 @@ Q_LISTEN_ADDRESS=${Q_LISTEN_ADDRESS:-$SERVICE_LISTEN_ADDRESS}
144 144
 Q_ADMIN_USERNAME=${Q_ADMIN_USERNAME:-neutron}
145 145
 # Default auth strategy
146 146
 Q_AUTH_STRATEGY=${Q_AUTH_STRATEGY:-keystone}
147
-# Use namespace or not
148
-Q_USE_NAMESPACE=${Q_USE_NAMESPACE:-True}
149 147
 # RHEL's support for namespaces requires using veths with ovs
150 148
 Q_OVS_USE_VETH=${Q_OVS_USE_VETH:-False}
151 149
 Q_USE_ROOTWRAP=${Q_USE_ROOTWRAP:-True}
... ...
@@ -208,7 +206,7 @@ Q_PUBLIC_VETH_INT=${Q_PUBLIC_VETH_INT:-veth-pub-int}
208 208
 # The plugin supports L3.
209 209
 Q_L3_ENABLED=${Q_L3_ENABLED:-False}
210 210
 # L3 routers exist per tenant
211
-Q_L3_ROUTER_PER_TENANT=${Q_L3_ROUTER_PER_TENANT:-False}
211
+Q_L3_ROUTER_PER_TENANT=${Q_L3_ROUTER_PER_TENANT:-True}
212 212
 
213 213
 # List of config file names in addition to the main plugin config file
214 214
 # See _configure_neutron_common() for details about setting it up
... ...
@@ -968,7 +966,6 @@ function _configure_neutron_debug_command {
968 968
 
969 969
     iniset $NEUTRON_TEST_CONFIG_FILE DEFAULT verbose False
970 970
     iniset $NEUTRON_TEST_CONFIG_FILE DEFAULT debug False
971
-    iniset $NEUTRON_TEST_CONFIG_FILE DEFAULT use_namespaces $Q_USE_NAMESPACE
972 971
     iniset $NEUTRON_TEST_CONFIG_FILE AGENT root_helper "$Q_RR_COMMAND"
973 972
     if [[ "$Q_USE_ROOTWRAP_DAEMON" == "True" ]]; then
974 973
         iniset $NEUTRON_TEST_CONFIG_FILE AGENT root_helper_daemon "$Q_RR_DAEMON_COMMAND"
... ...
@@ -985,7 +982,6 @@ function _configure_neutron_dhcp_agent {
985 985
 
986 986
     iniset $Q_DHCP_CONF_FILE DEFAULT verbose True
987 987
     iniset $Q_DHCP_CONF_FILE DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL
988
-    iniset $Q_DHCP_CONF_FILE DEFAULT use_namespaces $Q_USE_NAMESPACE
989 988
     iniset $Q_DHCP_CONF_FILE AGENT root_helper "$Q_RR_COMMAND"
990 989
     if [[ "$Q_USE_ROOTWRAP_DAEMON" == "True" ]]; then
991 990
         iniset $Q_DHCP_CONF_FILE AGENT root_helper_daemon "$Q_RR_DAEMON_COMMAND"
... ...
@@ -1009,8 +1005,6 @@ function _configure_neutron_dhcp_agent {
1009 1009
 
1010 1010
 function _configure_neutron_l3_agent {
1011 1011
     Q_L3_ENABLED=True
1012
-    # for l3-agent, only use per tenant router if we have namespaces
1013
-    Q_L3_ROUTER_PER_TENANT=$Q_USE_NAMESPACE
1014 1012
 
1015 1013
     if is_service_enabled q-vpn; then
1016 1014
         neutron_vpn_configure_agent
... ...
@@ -1020,7 +1014,6 @@ function _configure_neutron_l3_agent {
1020 1020
 
1021 1021
     iniset $Q_L3_CONF_FILE DEFAULT verbose True
1022 1022
     iniset $Q_L3_CONF_FILE DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL
1023
-    iniset $Q_L3_CONF_FILE DEFAULT use_namespaces $Q_USE_NAMESPACE
1024 1023
     iniset $Q_L3_CONF_FILE AGENT root_helper "$Q_RR_COMMAND"
1025 1024
     if [[ "$Q_USE_ROOTWRAP_DAEMON" == "True" ]]; then
1026 1025
         iniset $Q_L3_CONF_FILE AGENT root_helper_daemon "$Q_RR_DAEMON_COMMAND"
... ...
@@ -1309,7 +1302,7 @@ function _neutron_configure_router_v4 {
1309 1309
     if is_service_enabled q-l3; then
1310 1310
         # Configure and enable public bridge
1311 1311
         local ext_gw_interface="none"
1312
-        if is_neutron_ovs_base_plugin && [[ "$Q_USE_NAMESPACE" = "True" ]]; then
1312
+        if is_neutron_ovs_base_plugin; then
1313 1313
             ext_gw_interface=$(_neutron_get_ext_gw_interface)
1314 1314
         elif [[ "$Q_AGENT" = "linuxbridge" ]]; then
1315 1315
             # Search for the brq device the neutron router and network for $FIXED_RANGE
... ...
@@ -1359,7 +1352,7 @@ function _neutron_configure_router_v6 {
1359 1359
         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; }'`
1360 1360
         die_if_not_set $LINENO IPV6_ROUTER_GW_IP "Failure retrieving IPV6_ROUTER_GW_IP"
1361 1361
 
1362
-        if is_neutron_ovs_base_plugin && [[ "$Q_USE_NAMESPACE" = "True" ]]; then
1362
+        if is_neutron_ovs_base_plugin; then
1363 1363
             local ext_gw_interface
1364 1364
             ext_gw_interface=$(_neutron_get_ext_gw_interface)
1365 1365
             local ipv6_cidr_len=${IPV6_PUBLIC_RANGE#*/}
... ...
@@ -1374,7 +1367,7 @@ function _neutron_configure_router_v6 {
1374 1374
 
1375 1375
 # Explicitly set router id in l3 agent configuration
1376 1376
 function _neutron_set_router_id {
1377
-    if [[ "$Q_USE_NAMESPACE" == "False" ]]; then
1377
+    if [[ "$Q_L3_ROUTER_PER_TENANT" == "False" ]]; then
1378 1378
         iniset $Q_L3_CONF_FILE DEFAULT router_id $ROUTER_ID
1379 1379
     fi
1380 1380
 }
... ...
@@ -15,7 +15,6 @@
15 15
 #   - ``SERVICE_HOST``
16 16
 #   - ``BASE_SQL_CONN`` ``lib/database`` declares
17 17
 #   - ``PUBLIC_NETWORK_NAME``
18
-#   - ``Q_USE_NAMESPACE``
19 18
 #   - ``Q_ROUTER_NAME``
20 19
 #   - ``Q_L3_ENABLED``
21 20
 #   - ``VIRT_DRIVER``
... ...
@@ -132,7 +131,6 @@ function configure_tempest {
132 132
     local flavor_lines
133 133
     local public_network_id
134 134
     local public_router_id
135
-    local tenant_networks_reachable
136 135
     local boto_instance_type="m1.tiny"
137 136
     local ssh_connect_method="fixed"
138 137
 
... ...
@@ -246,13 +244,8 @@ function configure_tempest {
246 246
         fi
247 247
     fi
248 248
 
249
-    if [ "$Q_USE_NAMESPACE" != "False" ]; then
250
-        tenant_networks_reachable=false
251
-        if ! is_service_enabled n-net; then
252
-            ssh_connect_method="floating"
253
-        fi
254
-    else
255
-        tenant_networks_reachable=true
249
+    if ! is_service_enabled n-net; then
250
+        ssh_connect_method="floating"
256 251
     fi
257 252
 
258 253
     ssh_connect_method=${TEMPEST_SSH_CONNECT_METHOD:-$ssh_connect_method}
... ...
@@ -260,12 +253,6 @@ function configure_tempest {
260 260
     if [ "$Q_L3_ENABLED" = "True" ]; then
261 261
         public_network_id=$(neutron net-list | grep $PUBLIC_NETWORK_NAME | \
262 262
             awk '{print $2}')
263
-        if [ "$Q_USE_NAMESPACE" == "False" ]; then
264
-            # If namespaces are disabled, DevStack will create a single
265
-            # public router that tempest should be configured to use.
266
-            public_router_id=$(neutron router-list | awk "/ $Q_ROUTER_NAME / \
267
-                { print \$2 }")
268
-        fi
269 263
     fi
270 264
 
271 265
     EC2_URL=$(get_endpoint_url ec2 public || true)
... ...
@@ -394,7 +381,7 @@ function configure_tempest {
394 394
 
395 395
     # Network
396 396
     iniset $TEMPEST_CONFIG network api_version 2.0
397
-    iniset $TEMPEST_CONFIG network tenant_networks_reachable "$tenant_networks_reachable"
397
+    iniset $TEMPEST_CONFIG network tenant_networks_reachable false
398 398
     iniset $TEMPEST_CONFIG network public_network_id "$public_network_id"
399 399
     iniset $TEMPEST_CONFIG network public_router_id "$public_router_id"
400 400
     iniset $TEMPEST_CONFIG network default_network "$FIXED_RANGE"