Bug 877441 - flat network cannot be created with Quantum LinuxBridge plugin
Summary: flat network cannot be created with Quantum LinuxBridge plugin
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: openstack-quantum
Version: el6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Bob Kukura
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-11-16 14:55 UTC by Etsuji Nakai
Modified: 2014-02-27 23:17 UTC (History)
10 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-01-15 13:35:59 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Etsuji Nakai 2012-11-16 14:55:34 UTC
When creating the "--provider:network_type flat" network with the Quantum LinuxBridge plugin, for example,

# quantum net-create public01 --tenant-id xxxx --provider:network_type flat --provider:physical_network physnet1

it fails with the following error.
"Invalid input for operation: unknown provider:physical_network physnet1"

even if the corresponding entry is in /etc/quantum/plugin.init, like:

---
[LINUX_BRIDGE]
physical_interface_mappings = physnet1:eth1
---

And the culprit is here...

/usr/lib/python2.6/site-packages/quantum/plugins/linuxbridge/lb_quantum_plugin.py

    291         if network_type in [constants.TYPE_VLAN, constants.TYPE_FLAT]:
    292             if physical_network_set:
    293                 if physical_network not in self.network_vlan_ranges:
    294                     msg = _("unknown provider:physical_network %s" %
    295                             physical_network)
    296                     raise q_exc.InvalidInput(error_message=msg)
    297             elif 'default' in self.network_vlan_ranges:
    298                 physical_network = 'default'
    299             else:
    300                 msg = _("provider:physical_network required")
    301                 raise q_exc.InvalidInput(error_message=msg)
    302 
    303         return (network_type, physical_network, segmentation_id)

In this part, physical_network is searched in self.network_vlan_ranges both for TYPE_VLAN and TYPE_FLAT. TYPE_FLAT should be checked differently. 

My setup is:

# rpm -qf /usr/lib/python2.6/site-packages/quantum/plugins/linuxbridge/lb_quantum_plugin.py
openstack-quantum-linuxbridge-2012.2-2.el6.noarch

Comment 1 Bob Kukura 2012-11-19 18:00:09 UTC
The physical_interface_mappings configuration variable is used only by the agent, not the server. You need to list the physical network in the server's network_vlan_ranges configuration variable to tell the server about it, even if you are not using any VLANs on it. Don't forget that the same physical network might support a flat network in addition to provider VLANs and/or tenant VLANs.

Try adding something like the following to linuxbridge_conf.ini on the server:

[VLANS]
network_vlan_ranges = physnet1


-Bob

Comment 2 Etsuji Nakai 2012-11-19 23:03:58 UTC
I see. Your suggstion for linuxbridge_conf.ini worked well.

So, this is rather a documentation problem. (The Quantum part of the current Folsom Preview documentation is confusing --- not well merged with the other parts, by the way.)

Anyway, I agree to close this BZ. Thanks.

Comment 3 Gary Kotton 2013-01-15 13:35:59 UTC
Please see comment above


Note You need to log in before you can comment on or make changes to this bug.