Bug 877441 - flat network cannot be created with Quantum LinuxBridge plugin
flat network cannot be created with Quantum LinuxBridge plugin
Status: CLOSED NOTABUG
Product: Fedora EPEL
Classification: Fedora
Component: openstack-quantum (Show other bugs)
el6
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Bob Kukura
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-11-16 09:55 EST by Etsuji Nakai
Modified: 2014-02-27 18:17 EST (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-01-15 08:35:59 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Etsuji Nakai 2012-11-16 09:55:34 EST
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 13:00:09 EST
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 18:03:58 EST
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 08:35:59 EST
Please see comment above

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