ML2 plugin with gre tunnel_type is unable to use provider extension options

Bug #1202244 reported by Mathieu Rohon
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
High
Mathieu Rohon

Bug Description

my localrc has the options :

ENABLE_TENANT_TUNNELS=True
TENANT_TUNNEL_RANGE=1:1

Q_PLUGIN=ml2
Q_AGENT_EXTRA_AGENT_OPTS=(tunnel_types=gre)

but when we want to set a provider network out of the range, it doesn't work :
neutron net-create net-gre1 --tenant-id 50ef18c194a946089f0618b812fd8df6 --provider:network_type gre --provider:segmentation_id 2
Unable to create the network. No tenant network is available for allocation.

it tries to allocate a tenant network, when a provider network is asked.

Tags: ml2
tags: added: ml2
Revision history for this message
Robert Kukura (rkukura) wrote :
Download full text (3.7 KiB)

It looks like the segmentation_id is being completely ignored when network_type is set to gre:

$ OS_USERNAME=admin neutron net-create --tenant-id demo net-gre --provider:network_type gre --provider:segmentation_id 7
Created a new network:
+---------------------------+--------------------------------------+
| Field | Value |
+---------------------------+--------------------------------------+
| admin_state_up | True |
| id | 6e6bdd98-38db-4e29-931b-728dbb9b4355 |
| name | net-gre |
| provider:network_type | gre |
| provider:physical_network | |
| provider:segmentation_id | 5 |
| router:external | False |
| shared | False |
| status | ACTIVE |
| subnets | |
| tenant_id | demo |
+---------------------------+--------------------------------------+

Even stranger, it looks like the tenant_network_type is used when vlan is specified:

$ OS_USERNAME=admin neutron net-create --tenant-id demo net-vxlan --provider:network_type vxlan --provider:segmentation_id 123456
Created a new network:
+---------------------------+--------------------------------------+
| Field | Value |
+---------------------------+--------------------------------------+
| admin_state_up | True |
| id | 71f630f3-dbdd-4f50-9c75-685beaf218c4 |
| name | net-vxlan |
| provider:network_type | gre |
| provider:physical_network | |
| provider:segmentation_id | 6 |
| router:external | False |
| shared | False |
| status | ACTIVE |
| subnets | |
| tenant_id | demo |
+---------------------------+--------------------------------------+

But specifying a vlan works as expected:

$ OS_USERNAME=admin neutron net-create --tenant-id demo net-vlan --provider:network_type vlan --provider:physical_network physnet1 --provider:segmentation_id 1234
Created a new network:
+---------------------------+--------------------------------------+
| Field | Value |
+---------------------------+--------------------------------------+
| admin_state_up | True |
| id | d5debfa4-47d2-4850-bbf2-e6b3119e3567 |
| name | net-vlan |
| pro...

Read more...

Changed in neutron:
status: New → Confirmed
importance: Undecided → High
Robert Kukura (rkukura)
Changed in neutron:
assignee: nobody → Henry Gessau (gessau)
milestone: none → havana-3
assignee: Henry Gessau (gessau) → Mathieu Rohon (mathieu-rohon)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

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

Changed in neutron:
status: Confirmed → In Progress
Changed in neutron:
assignee: Mathieu Rohon (mathieu-rohon) → Mark McClain (markmcclain)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/37516
Committed: http://github.com/openstack/neutron/commit/c1b1af72e93da37383d6111195bfc8c63cc49fae
Submitter: Jenkins
Branch: master

commit c1b1af72e93da37383d6111195bfc8c63cc49fae
Author: mathieu-rohon <email address hidden>
Date: Thu Jul 25 10:38:16 2013 +0200

    ML2 tunnel drivers validate provider networks correctly

    there was a copy/paste error in GRE/VXlan type drivers implementation.
    the segment wasn't returned while validating the provider network.

    Change-Id: I7df6d2e714d09618644f935a9ed41354b62de9d0
    Fixes: bug #1202244

Changed in neutron:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in neutron:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: havana-3 → 2013.2
Thierry Carrez (ttx)
no longer affects: neutron/havana
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.