This patch replaces Q_L3_ENABLED with is_service_enabled q-l3.
Both of them idicates wherever Neutron L3 agent is enabled or not.
Change-Id: I33f0f5a6174d1d170bc2ac1c2e3a096d88d17cc1
| ... | ... |
@@ -88,7 +88,6 @@ serving as a hypervisor for guest instances. |
| 88 | 88 |
FIXED_RANGE="10.0.0.0/24" |
| 89 | 89 |
Q_FLOATING_ALLOCATION_POOL=start=172.18.161.250,end=172.18.161.254 |
| 90 | 90 |
PUBLIC_NETWORK_GATEWAY="172.18.161.1" |
| 91 |
- Q_L3_ENABLED=True |
|
| 92 | 91 |
PUBLIC_INTERFACE=eth0 |
| 93 | 92 |
|
| 94 | 93 |
# Open vSwitch provider networking configuration |
| ... | ... |
@@ -387,7 +386,6 @@ controller node. |
| 387 | 387 |
OVS_PHYSICAL_BRIDGE=br-ex |
| 388 | 388 |
|
| 389 | 389 |
Q_USE_PROVIDER_NETWORKING=True |
| 390 |
- Q_L3_ENABLED=False |
|
| 391 | 390 |
|
| 392 | 391 |
# Do not use Nova-Network |
| 393 | 392 |
disable_service n-net |
| ... | ... |
@@ -434,13 +432,12 @@ compute node 1. |
| 434 | 434 |
OVS_PHYSICAL_BRIDGE=br-ex |
| 435 | 435 |
PUBLIC_INTERFACE=eth1 |
| 436 | 436 |
Q_USE_PROVIDER_NETWORKING=True |
| 437 |
- Q_L3_ENABLED=False |
|
| 438 | 437 |
|
| 439 | 438 |
Compute node 2's configuration will be exactly the same, except |
| 440 | 439 |
``HOST_IP`` will be ``10.0.0.4`` |
| 441 | 440 |
|
| 442 | 441 |
When DevStack is configured to use provider networking (via |
| 443 |
-``Q_USE_PROVIDER_NETWORKING`` is True and ``Q_L3_ENABLED`` is False) - |
|
| 442 |
+``Q_USE_PROVIDER_NETWORKING`` is True) - |
|
| 444 | 443 |
DevStack will automatically add the network interface defined in |
| 445 | 444 |
``PUBLIC_INTERFACE`` to the ``OVS_PHYSICAL_BRIDGE`` |
| 446 | 445 |
|
| ... | ... |
@@ -543,7 +540,6 @@ setup, with small modifications for the interface mappings. |
| 543 | 543 |
FIXED_RANGE="10.0.0.0/24" |
| 544 | 544 |
Q_FLOATING_ALLOCATION_POOL=start=172.18.161.250,end=172.18.161.254 |
| 545 | 545 |
PUBLIC_NETWORK_GATEWAY="172.18.161.1" |
| 546 |
- Q_L3_ENABLED=True |
|
| 547 | 546 |
PUBLIC_INTERFACE=eth0 |
| 548 | 547 |
|
| 549 | 548 |
Q_USE_PROVIDERNET_FOR_PUBLIC=True |
| ... | ... |
@@ -23,11 +23,9 @@ Q_USE_PUBLIC_VETH=${Q_USE_PUBLIC_VETH:-False}
|
| 23 | 23 |
Q_PUBLIC_VETH_EX=${Q_PUBLIC_VETH_EX:-veth-pub-ex}
|
| 24 | 24 |
Q_PUBLIC_VETH_INT=${Q_PUBLIC_VETH_INT:-veth-pub-int}
|
| 25 | 25 |
|
| 26 |
-# The next two variables are configured by plugin |
|
| 26 |
+# The next variable is configured by plugin |
|
| 27 | 27 |
# e.g. _configure_neutron_l3_agent or lib/neutron_plugins/* |
| 28 | 28 |
# |
| 29 |
-# The plugin supports L3. |
|
| 30 |
-Q_L3_ENABLED=${Q_L3_ENABLED:-True}
|
|
| 31 | 29 |
# L3 routers exist per tenant |
| 32 | 30 |
Q_L3_ROUTER_PER_TENANT=${Q_L3_ROUTER_PER_TENANT:-True}
|
| 33 | 31 |
|
| ... | ... |
@@ -90,7 +88,6 @@ function _determine_config_l3 {
|
| 90 | 90 |
} |
| 91 | 91 |
|
| 92 | 92 |
function _configure_neutron_l3_agent {
|
| 93 |
- Q_L3_ENABLED=True |
|
| 94 | 93 |
|
| 95 | 94 |
cp $NEUTRON_DIR/etc/l3_agent.ini.sample $Q_L3_CONF_FILE |
| 96 | 95 |
|
| ... | ... |
@@ -180,7 +177,7 @@ function create_neutron_initial_network {
|
| 180 | 180 |
|
| 181 | 181 |
AUTO_ALLOCATE_EXT=$(neutron --os-cloud devstack-admin --os-region "$REGION_NAME" ext-list | grep 'auto-allocated-topology' | get_field 1) |
| 182 | 182 |
SUBNETPOOL_EXT=$(neutron --os-cloud devstack-admin --os-region "$REGION_NAME" ext-list | grep 'subnet_allocation' | get_field 1) |
| 183 |
- if [[ "$Q_L3_ENABLED" == "True" ]]; then |
|
| 183 |
+ if is_service_enabled q-l3; then |
|
| 184 | 184 |
# Create a router, and add the private subnet as one of its interfaces |
| 185 | 185 |
if [[ "$Q_L3_ROUTER_PER_TENANT" == "True" ]]; then |
| 186 | 186 |
# create a tenant-owned router. |
| ... | ... |
@@ -362,7 +359,7 @@ function _neutron_configure_router_v6 {
|
| 362 | 362 |
} |
| 363 | 363 |
|
| 364 | 364 |
function is_provider_network {
|
| 365 |
- if [ "$Q_USE_PROVIDER_NETWORKING" == "True" ] && [ "$Q_L3_ENABLED" == "False" ]; then |
|
| 365 |
+ if [ "$Q_USE_PROVIDER_NETWORKING" == "True" ]; then |
|
| 366 | 366 |
return 0 |
| 367 | 367 |
fi |
| 368 | 368 |
return 1 |
| ... | ... |
@@ -16,7 +16,6 @@ |
| 16 | 16 |
# - ``BASE_SQL_CONN`` ``lib/database`` declares |
| 17 | 17 |
# - ``PUBLIC_NETWORK_NAME`` |
| 18 | 18 |
# - ``Q_ROUTER_NAME`` |
| 19 |
-# - ``Q_L3_ENABLED`` |
|
| 20 | 19 |
# - ``VIRT_DRIVER`` |
| 21 | 20 |
# - ``LIBVIRT_TYPE`` |
| 22 | 21 |
# - ``KEYSTONE_SERVICE_PROTOCOL``, ``KEYSTONE_SERVICE_HOST`` from lib/keystone |
| ... | ... |
@@ -239,7 +238,7 @@ function configure_tempest {
|
| 239 | 239 |
|
| 240 | 240 |
ssh_connect_method=${TEMPEST_SSH_CONNECT_METHOD:-$ssh_connect_method}
|
| 241 | 241 |
|
| 242 |
- if [ "$Q_L3_ENABLED" = "True" ]; then |
|
| 242 |
+ if is_service_enabled q-l3; then |
|
| 243 | 243 |
public_network_id=$(neutron net-list | grep $PUBLIC_NETWORK_NAME | \ |
| 244 | 244 |
awk '{print $2}')
|
| 245 | 245 |
fi |