VLAN range issue in ml2_conf.ini

Bug #1475436 reported by Shane Cunningham
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack-Ansible
Fix Released
Low
Matt Kassawara
Kilo
Fix Released
Low
Matt Kassawara
Trunk
Fix Released
Low
Matt Kassawara

Bug Description

Trying to include two different contiguous VLAN ranges in rpc_user_config.yml. The way OSAD uses those ranges in the ml2_conf.ini results in neutron-server to traceback and is not able to start.

I tried the following different ways to enter the VLAN ranges in rpc_user_config.yml.

range: '1451:1451,1473:1476'
range: 1451:1451,1473:1476

Each of those results in the following traceback.

2015-07-16 21:09:35.213 34822 INFO neutron.plugins.ml2.drivers.type_local [-] ML2 LocalTypeDriver initialization complete
2015-07-16 21:09:35.218 34822 ERROR neutron.plugins.ml2.drivers.type_vlan [-] Failed to parse network_vlan_ranges. Service terminated!
2015-07-16 21:09:35.218 34822 TRACE neutron.plugins.ml2.drivers.type_vlan Traceback (most recent call last):
2015-07-16 21:09:35.218 34822 TRACE neutron.plugins.ml2.drivers.type_vlan File "/usr/local/lib/python2.7/dist-packages/neutron/plugins/ml2/drivers/type_vlan.py", line 89, in _parse_network_vlan_ranges
2015-07-16 21:09:35.218 34822 TRACE neutron.plugins.ml2.drivers.type_vlan cfg.CONF.ml2_type_vlan.network_vlan_ranges)
2015-07-16 21:09:35.218 34822 TRACE neutron.plugins.ml2.drivers.type_vlan File "/usr/local/lib/python2.7/dist-packages/neutron/plugins/common/utils.py", line 74, in parse_network_vlan_ranges
2015-07-16 21:09:35.218 34822 TRACE neutron.plugins.ml2.drivers.type_vlan network, vlan_range = parse_network_vlan_range(entry)
2015-07-16 21:09:35.218 34822 TRACE neutron.plugins.ml2.drivers.type_vlan File "/usr/local/lib/python2.7/dist-packages/neutron/plugins/common/utils.py", line 63, in parse_network_vlan_range
2015-07-16 21:09:35.218 34822 TRACE neutron.plugins.ml2.drivers.type_vlan raise n_exc.NetworkVlanRangeError(vlan_range=entry, error=ex)
2015-07-16 21:09:35.218 34822 TRACE neutron.plugins.ml2.drivers.type_vlan NetworkVlanRangeError: Invalid network VLAN range: '1473:1476' - 'need more than 2 values to unpack'
2015-07-16 21:09:35.218 34822 TRACE neutron.plugins.ml2.drivers.type_vlan
2015-07-16 21:09:35.555 34835 INFO neutron.common.config [-] Logging enabled!
2015-07-16 21:09:35.560 34835 INFO neutron.common.config [-] Config paste file: /etc/neutron/api-paste.ini
2015-07-16 21:09:35.647 34835 INFO neutron.manager [-] Loading core plugin: neutron.plugins.ml2.plugin.Ml2Plugin
2015-07-16 21:09:35.719 34835 INFO neutron.plugins.ml2.managers [-] Configured type driver names: ['flat', 'vlan', 'vxlan', 'local']
2015-07-16 21:09:35.721 34835 INFO neutron.plugins.ml2.drivers.type_flat [-] Allowable flat physical_network names: ['vlan']
2015-07-16 21:09:35.721 34835 INFO neutron.plugins.ml2.drivers.type_local [-] ML2 LocalTypeDriver initialization complete
2015-07-16 21:09:35.727 34835 ERROR neutron.plugins.ml2.drivers.type_vlan [-] Failed to parse network_vlan_ranges. Service terminated!
2015-07-16 21:09:35.727 34835 TRACE neutron.plugins.ml2.drivers.type_vlan Traceback (most recent call last):
2015-07-16 21:09:35.727 34835 TRACE neutron.plugins.ml2.drivers.type_vlan File "/usr/local/lib/python2.7/dist-packages/neutron/plugins/ml2/drivers/type_vlan.py", line 89, in _parse_network_vlan_ranges
2015-07-16 21:09:35.727 34835 TRACE neutron.plugins.ml2.drivers.type_vlan cfg.CONF.ml2_type_vlan.network_vlan_ranges)
2015-07-16 21:09:35.727 34835 TRACE neutron.plugins.ml2.drivers.type_vlan File "/usr/local/lib/python2.7/dist-packages/neutron/plugins/common/utils.py", line 74, in parse_network_vlan_ranges
2015-07-16 21:09:35.727 34835 TRACE neutron.plugins.ml2.drivers.type_vlan network, vlan_range = parse_network_vlan_range(entry)
2015-07-16 21:09:35.727 34835 TRACE neutron.plugins.ml2.drivers.type_vlan File "/usr/local/lib/python2.7/dist-packages/neutron/plugins/common/utils.py", line 63, in parse_network_vlan_range
2015-07-16 21:09:35.727 34835 TRACE neutron.plugins.ml2.drivers.type_vlan raise n_exc.NetworkVlanRangeError(vlan_range=entry, error=ex)
2015-07-16 21:09:35.727 34835 TRACE neutron.plugins.ml2.drivers.type_vlan NetworkVlanRangeError: Invalid network VLAN range: '1473:1476' - 'need more than 2 values to unpack'
2015-07-16 21:09:35.727 34835 TRACE neutron.plugins.ml2.drivers.type_vlan

ml2_conf.ini from a neutron server container that can't start neutron-server.

[ml2_type_vlan]
network_vlan_ranges = vlan:1451:1451,1473:1476

[vlans]
tenant_network_type = vlan
network_vlan_ranges = vlan:1451:1451,1473:1476

If I manually edit ml2_conf.ini in a neutron server container to the following values, then restart neutron-server, neutron-server can start.

[ml2_type_vlan]
network_vlan_ranges = vlan:1451:1451,vlan:1473:1476

[vlans]
tenant_network_type = vlan
network_vlan_ranges = vlan:1451:1451,vlan:1473:1476

I'm either entering the ranges incorrectly in rpc_user_config.yml or there is a bug with the template ml2_conf.ini and how it lays down VLAN ranges.

Tags: in-kilo
Revision history for this message
Nolan Brubaker (nolan-brubaker) wrote :

Given the mention of rpc_user_config.yml, I'm marking this as affecting Juno. While the issue may be in Kilo/master, their config file (openstack_user_config.yml) wasn't mentioned.

Revision history for this message
Shane Cunningham (appprod0) wrote :

Correct, this was on 10.1.10.

Revision history for this message
Evan Callicoat (diopter) wrote :

Yep, confirmed from the Neutron source code in both Juno and Kilo, the format for multiple sets of discontiguous ranges in the same network is:

network:begin:end,network:begin:end

In the interest of completeness, the full pattern actually doesn't require the range, just the network name:

network[:begin:end,...]

In Juno, the ml2_conf.ini.j2 template does the work of generating the network_vlan_ranges sets, and in Kilo+ it's done by a library module. In the template, there is no parsing of the "range" item to loop over multiple ranges, it simply added as seen here:

https://github.com/stackforge/os-ansible-deployment/blob/juno/rpc_deployment/roles/neutron_common/templates/plugins/ml2/ml2_conf.ini#L14

In contrast, the new library correctly parses multiple comma-separated ranges:

https://github.com/stackforge/os-ansible-deployment/blob/kilo/playbooks/library/provider_networks#L177

I'm not sure offhand if it's possible to split in a jinja template, but if not a potential quick-win would be to convert the "range" item into a list, and iterate over it in the template.

Revision history for this message
Jesse Pretorius (jesse-pretorius) wrote :

Triaged by Evan to indicate that this is only an issue for Juno, and not for Kilo/Master. Implementing a change in juno to accommodate this is non-trivial and is likely to cause upgrade headaches, so ideally the best path for a solution is to upgrade to a later version unless someone is interested in finding a solution.

Setting this to low priority for that reason.

Revision history for this message
Jesse Pretorius (jesse-pretorius) wrote :

Actually, setting to wishlist as this would be a feature enhancement.

Revision history for this message
Shane Cunningham (appprod0) wrote :

Hi Jessie,

Correct me if I'm wrong, but it looks like from Evan's comment that the correct way to input this range in rpc_user_config.yml would be the following?

range: '1451:1451,vlan: 1473:1476'

Thanks

Revision history for this message
Shane Cunningham (appprod0) wrote :

Or this way rather, I put an extra space in above.

range: '1451:1451,vlan:1473:1476'

Revision history for this message
Matt Kassawara (ionosphere80) wrote :

I'm reopening this bug because I think we need to clarify how to use multiple VLAN ranges in the example configuration files and potentially other documentation.

Revision history for this message
Jesse Pretorius (jesse-pretorius) wrote :

This has been re-opened to target for a document patch.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to os-ansible-deployment (master)

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

Changed in openstack-ansible:
status: Triaged → In Progress
Revision history for this message
Shane Cunningham (appprod0) wrote :

For anyone else. Confirmed in Juno it will properly lay down different VLAN ranges with the following rpc_user_config.

range: "1912:1912,vlan:2324:2326"

root@infra01:/opt/os-ansible-deployment/rpc_deployment# ansible -m shell neutron_server_container -a "grep network_vlan_ranges /etc/neutron/plugins/ml2/ml2_conf.ini"

infra01_neutron_server_container-84be79dc | success | rc=0 >>
network_vlan_ranges = vlan:1912:1912,vlan:2324:2326
network_vlan_ranges = vlan:1912:1912,vlan:2324:2326

infra02_neutron_server_container-df271fa9 | success | rc=0 >>
network_vlan_ranges = vlan:1912:1912,vlan:2324:2326
network_vlan_ranges = vlan:1912:1912,vlan:2324:2326

infra03_neutron_server_container-8aaed470 | success | rc=0 >>
network_vlan_ranges = vlan:1912:1912,vlan:2324:2326
network_vlan_ranges = vlan:1912:1912,vlan:2324:2326

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to os-ansible-deployment (master)

Reviewed: https://review.openstack.org/209598
Committed: https://git.openstack.org/cgit/stackforge/os-ansible-deployment/commit/?id=c3025ed093e80fbb1d7ed91651341fe139102436
Submitter: Jenkins
Branch: master

commit c3025ed093e80fbb1d7ed91651341fe139102436
Author: Matthew Kassawara <email address hidden>
Date: Wed Aug 5 11:35:59 2015 -0500

    Update documentation for multiple VLAN ranges

    Update example configuration file and installation guide to
    mention support for multiple VLAN ranges on a particular
    network and provide examples. Also address other minor
    issues with networking content in the installation guide.

    Change-Id: Idca97092f326cfbd83a018e853d3e7655d20e491
    Partial-Bug: #1475436

no longer affects: openstack-ansible/juno
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to os-ansible-deployment (kilo)

Reviewed: https://review.openstack.org/215898
Committed: https://git.openstack.org/cgit/stackforge/os-ansible-deployment/commit/?id=0c40d90173bda77bdc10b91eebe56c78f2c01a81
Submitter: Jenkins
Branch: kilo

commit 0c40d90173bda77bdc10b91eebe56c78f2c01a81
Author: Matthew Kassawara <email address hidden>
Date: Wed Aug 5 11:35:59 2015 -0500

    Update documentation for multiple VLAN ranges

    Update example configuration file and installation guide to
    mention support for multiple VLAN ranges on a particular
    network and provide examples. Also address other minor
    issues with networking content in the installation guide.

    Change-Id: Idca97092f326cfbd83a018e853d3e7655d20e491
    Partial-Bug: #1475436
    (cherry picked from commit c3025ed093e80fbb1d7ed91651341fe139102436)

tags: added: in-kilo
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.