devstack defaults to VXLAN even though ENABLE_TENANT_TUNNELS is False in local.conf

Bug #1403625 reported by Syd Logan
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
devstack
Invalid
Undecided
Margaret Frances

Bug Description

Branch info:

slogan@slogan-virtual-machine:~/devstack$ git branch
* master
slogan@slogan-virtual-machine:~/devstack$ git log | head
commit 062e8f14874ab254aa756aabb4f50db222277431
Merge: 7f80280 7bb9a73
Author: Jenkins <email address hidden>
Date: Tue Dec 16 22:02:41 2014 +0000

    Merge "Adds missing rabbit_userid to trove configs"

commit 7f8028069883b8214bd2aae56f78514a4fddddbe
Merge: affcf87 dc31f76
Author: Jenkins <email address hidden>

local.conf:

[[local|localrc]]
disable_service n-net
enable_service q-l3
enable_service q-svc
enable_service q-agt
enable_service q-dhcp
enable_service q-meta
enable_service neutron
ADMIN_PASSWORD=password
DATABASE_PASSWORD=$ADMIN_PASSWORD
RABBIT_PASSWORD=$ADMIN_PASSWORD
SERVICE_PASSWORD=$ADMIN_PASSWORD
SERVICE_TOKEN=a682f596-76f3-11e3-b3b2-e716f9080d50
FIXED_RANGE=10.4.128.0/20
#FLOATING_RANGE=192.168.1.20/30
#HOST_IP=localhost
HOST_IP=192.168.1.220
PUBLIC_INTERFACE=eth0
FLAT_INTERFACE=br-int
FLAT_NETWORK_BRIDGE=br-eth0
NETWORK_GATEWAY=10.4.128.1
FIXED_NETWORK_SIZE=4096
SCHEDULER=nova.scheduler.filter_scheduler.FilterScheduler
Q_PLUGIN=ml2
OFFLINE=True
ACTIVE_TIMEOUT=120
ASSOCIATE_TIMEOUT=60
BOOT_TIMEOUT=120
SERVICE_TIMEOUT=120
EXTRA_OPTS=(metadata_host=$HOST_IP)

# Allow tenants to create vlans

ENABLE_TENANT_VLANS=True
ENABLE_TENANT_TUNNELS=False
ML2_VLAN_RANGES=physnet1:1100:2999

# these are needed fo VLANs for tenants to connect to physical switch

PHYSICAL_NETWORK=default
OVS_PHYSICAL_BRIDGE=br-int

Q_DHCP_EXTRA_DEFAULT_OPTS=(enable_metadata_network=True enable_isolated_metadata=True)

Notice I don't have Q_ML2_TENANT_NETWORK_TYPE setm but I am saying I want VLANS and I don't want tunnels (and I haven't defined anything else related to tunnels, e.g., VNI ranges).

When I run ./stack.sh with the above, I noticed that br-tun is created:

slogan@slogan-virtual-machine:~/devstack$ sudo ovs-vsctl show
2d7ac7cc-4358-41e7-afd4-3c5a0081d79f
    Bridge br-ex
        Port br-ex
            Interface br-ex
                type: internal
        Port "qg-db338515-8c"
            Interface "qg-db338515-8c"
                type: internal
    Bridge br-tun
        Port br-tun
            Interface br-tun
                type: internal
        Port patch-int
            Interface patch-int
                type: patch
                options: {peer=patch-tun}
    Bridge br-int
...

Also, in ml2_conf.ini:

[ml2]
tenant_network_types = vxlan
type_drivers = local,flat,vlan,gre,vxlan
mechanism_drivers = openvswitch,linuxbridge
...

The code in question is in devstack/lib/neutron_plugins/ml2:

Q_ML2_TENANT_NETWORK_TYPE=${Q_ML2_TENANT_NETWORK_TYPE:-"vxlan"}
# This has to be set here since the agent will set this in the config file
if [[ "$Q_ML2_TENANT_NETWORK_TYPE" == "gre" || "$Q_ML2_TENANT_NETWORK_TYPE" == "vxlan" ]]; then
    Q_TUNNEL_TYPES=$Q_ML2_TENANT_NETWORK_TYPE
elif [[ "$ENABLE_TENANT_TUNNELS" == "True" ]]; then
    Q_TUNNEL_TYPES=gre
fi

The above code sets the tenant network type to vxlan if not specified (as a default). I think the code should account for the ENABLE_TENANT_TUNNELS and ENABLE_TENANT_VLANS when defining the default.

Notice that the wiki has a devstack sample that led me down this path, I'd like to see the code match this wiki by fixing this bug (I think the wiki is fine, it's the script that needs fixing).

Configure devstack for ML2 with VLANs
An example control and compute node localrc file is shown here for configuring ML2 to run with VLANs with devstack. This is equivalent to running the OVS or LinuxBridge plugins in VLAN mode.

Add the following to your control node localrc:
Q_PLUGIN=ml2
ENABLE_TENANT_VLANS=True
ML2_VLAN_RANGES=mynetwork:100:200
To set special VLAN parameters for the VLAN TypeDriver, the following variable in localrc can be used. This is a space separate list of assignment values:
Q_ML2_PLUGIN_VLAN_TYPE_OPTIONS=(network_vlan_ranges=600:700)

(the above is from https://wiki.openstack.org/wiki/Neutron/ML2

slogan621 (slogan621)
Changed in neutron:
assignee: nobody → slogan621 (slogan621)
affects: neutron → devstack
slogan621 (slogan621)
Changed in devstack:
assignee: slogan621 (slogan621) → nobody
Revision history for this message
Jon Grimm (jgrimm) wrote :

Just ran into this myself. Thanks bug reporter.

Changed in devstack:
status: New → Confirmed
tags: added: linuxbridge
tags: added: neutron
Revision history for this message
Sean M. Collins (scollins) wrote :

Assigning this to myself since we are working on testing linux bridge at the gate, and I have seen issues with the VXLAN configuration, so for the time being we have defaulted to VLANs for tenant networks just so that we can get something up and running - but I plan to revisit the issue and get Linux Bridge tested with VXLAN for tenant networks

Changed in devstack:
assignee: nobody → Sean M. Collins (scollins)
Changed in devstack:
assignee: Sean M. Collins (scollins) → Margaret Frances (margaret-frances)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to devstack (master)

Fix proposed to branch: master
Review: https://review.openstack.org/267721

Changed in devstack:
status: Confirmed → In Progress
Revision history for this message
Sean Dague (sdague) wrote :

This devstack bug was last updated over 180 days ago, as devstack
is a fast moving project and we'd like to get the tracker down to
currently actionable bugs, this is getting marked as Invalid. If the
issue still exists, please feel free to reopen it.

Changed in devstack:
status: In Progress → Invalid
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on devstack (master)

Change abandoned by Ian Wienand (<email address hidden>) on branch: master
Review: https://review.openstack.org/267721
Reason: Please restore this if work continues

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.