[Openstack] [Quantum] provider:network_type=vlan problem

Sumit Naiksatam sumitnaiksatam at gmail.com
Fri Mar 1 20:36:29 UTC 2013


Hi John,

This isn't just an issue with provider networks. Please check the
following bug for some history on this:
https://bugs.launchpad.net/nova/+bug/1039665

I can confirm that I do see the same behavior with the latest code.

Thanks,
~Sumit.

On Fri, Mar 1, 2013 at 11:19 AM, John Gruber <john.t.gruber at gmail.com> wrote:
> Some added color... The interfaces are defined in Quantum and they have MAC
> addresses generated... They just don't make it into the nova-compute
> generated libvirt.xml.  There seems to be other stuff missing to, like the
> bridge name. Is that supposed to be blank?
>
> From the nova-compute.log
>
> 2013-03-01 10:48:48 DEBUG nova.compute.manager
> [req-35d0301e-ef44-4151-bfc4-9be13202e9c9 de223767529242ac85635b3863f6154b
> 33c19bf6b3c848f2842465ee27ef835f] [instance:
> 1466c180-2e03-4479-9fdb-2fe16201b516]
>
> Instance network_info: |
>
> [
> VIF({'network': Network({'bridge': '', 'subnets': [], 'meta': {'injected':
> False, 'tenant_id': u'c035fb76ea664bd59e9f64405933f105'}, 'id':
> u'19af012e-fa1e-4fc2-aac8-7611ef33428b', 'label': u'VLAN4'}), 'meta': {},
> 'id': u'46f861de-6019-44cd-8835-a3044b2cac87', 'address':
> u'fa:16:3e:fc:95:21'}),
> VIF({'network': Network({'bridge': '', 'subnets': [], 'meta': {'injected':
> False, 'tenant_id': u'c035fb76ea664bd59e9f64405933f105'}, 'id':
> u'28310262-bcb3-43b9-8366-f31f5ac7a990', 'label': u'VLAN1'}), 'meta': {},
> 'id': u'8f17842d-2331-47de-bfad-6d6e5acd45f6', 'address':
> u'fa:16:3e:37:2b:d8'}),
> VIF({'network': Network({'bridge': '', 'subnets': [], 'meta': {'injected':
> False, 'tenant_id': u'c035fb76ea664bd59e9f64405933f105'}, 'id':
> u'788bd827-5ba1-4b0f-99b4-e98040c9730d', 'label': u'VLAN2'}), 'meta': {},
> 'id': u'721175a2-1021-4747-a7a1-1ef7a0ea92bb', 'address':
> u'fa:16:3e:12:ba:2b'}),
> VIF({'network': Network({'bridge': '', 'subnets': [], 'meta': {'injected':
> False, 'tenant_id': u'c035fb76ea664bd59e9f64405933f105'}, 'id':
> u'be859d44-1d16-4923-b33b-c5dc292cc68f', 'label': u'VLAN3'}), 'meta': {},
> 'id': u'c39065d4-729b-484b-bcff-e7fa06e1f814', 'address':
> u'fa:16:3e:70:54:a7'})
> ]
>
> | _allocate_network
> /usr/lib/python2.7/dist-packages/nova/compute/manager.py:719
>
> 2013-03-01 10:48:49 DEBUG nova.virt.libvirt.config
> [req-35d0301e-ef44-4151-bfc4-9be13202e9c9 de223767529242ac85635b3863f6154b
> 33c19bf6b3c848f2842465ee27ef835f] Generated XML <domain type="kvm">
>   <uuid>1466c180-2e03-4479-9fdb-2fe16201b516</uuid>
>   <name>instance-0000000d</name>
>   <memory>524288</memory>
>   <vcpu>1</vcpu>
>   <os>
>     <type>hvm</type>
>     <boot dev="hd"/>
>   </os>
>   <features>
>     <acpi/>
>   </features>
>   <clock offset="utc">
>     <timer name="pit" tickpolicy="delay"/>
>     <timer name="rtc" tickpolicy="catchup"/>
>   </clock>
>   <cpu mode="host-model" match="exact"/>
>   <devices>
>     <disk type="file" device="disk">
>       <driver name="qemu" type="qcow2" cache="none"/>
>       <source file="/var/lib/nova/instances/instance-0000000d/disk"/>
>       <target bus="virtio" dev="vda"/>
>     </disk>
>     <serial type="file">
>       <source path="/var/lib/nova/instances/instance-0000000d/console.log"/>
>     </serial>
>     <serial type="pty"/>
>     <input type="tablet" bus="usb"/>
>     <graphics type="vnc" autoport="yes" keymap="en-us" listen="0.0.0.0"/>
>   </devices>
> </domain>
>   to_xml /usr/lib/python2.7/dist-packages/nova/virt/libvirt/config.py:66
>
>
> John Gruber
>
>
> On Fri, Mar 1, 2013 at 12:58 PM, John Gruber <john.t.gruber at gmail.com>
> wrote:
>>
>> I'm installing nova and quantum in an environment where L3 routing and
>> DHCP are handled by other devices on a provider network for specific VLANs.
>> I don't want the service of the quantum-l3 or quantum-dhcp agents, as there
>> services are handled by external devices.
>>
>> Nova compute is setup to use:
>> libvirt_type=kvm
>> libvirt_ovs_bridge=br-int
>> libvirt_vif_type=ethernet
>> libvirt_vif_driver=nova.virt.libvirt.vif.LibvirtHybridOVSBridgeDriver
>> libvirt_use_virtio_for_bridges=True
>>
>> I am using the OVS plugin for Quantum Folsom.  Here is the OVS section of
>> my ovs_quantum_plugin.ini file.
>>
>> [OVS]
>> tenant_network_type = vlan
>> network_vlan_ranges = physnet1:1:4,physnet1:60:64
>> bridge_mappings = physnet1:br-eth2
>>
>> The output of ovs-vsctl show looks like the following:
>>
>> efbab661-98dd-46b3-b5c1-e234c3afac8e
>>     Bridge "br-eth2"
>>         Port "phy-br-eth2"
>>             Interface "phy-br-eth2"
>>         Port "br-eth2"
>>             Interface "br-eth2"
>>                 type: internal
>>         Port "eth2"
>>             Interface "eth2"
>>     Bridge br-int
>>         Port br-int
>>             Interface br-int
>>                 type: internal
>>         Port "int-br-eth2"
>>             Interface "int-br-eth2"
>>     ovs_version: "1.4.0+build0"
>>
>> Interface eth2 is a VLAN trunk.  I can manually create ports in OVS and
>> then add link and ip address for VLANs 1-4,60-64 verifying connectivity.
>>
>> I run the following commands to setup the logical network:
>>
>> quantum net-create VLAN1 --router:external=True --shared
>> --provider:network_type=vlan --provider:physical_network=physnet1
>> --provider:segmentation_id=1
>> quantum net-create VLAN2 --router:external=True --shared
>> --provider:network_type=vlan --provider:physical_network=physnet1
>> --provider:segmentation_id=2
>> quantum net-create VLAN3 --router:external=True --shared
>> --provider:network_type=vlan --provider:physical_network=physnet1
>> --provider:segmentation_id=3
>> quantum net-create VLAN4 --router:external=True --shared
>> --provider:network_type=vlan --provider:physical_network=physnet1 --
>> provider:segmentation_id=4
>>
>> quantum net-list show:
>>
>> +--------------------------------------+-------+---------+
>> | id                                   | name  | subnets |
>> +--------------------------------------+-------+---------+
>> | 19af012e-fa1e-4fc2-aac8-7611ef33428b | VLAN4 |         |
>> | 28310262-bcb3-43b9-8366-f31f5ac7a990 | VLAN1 |         |
>> | 788bd827-5ba1-4b0f-99b4-e98040c9730d | VLAN2 |         |
>> | be859d44-1d16-4923-b33b-c5dc292cc68f | VLAN3 |         |
>> +--------------------------------------+-------+---------+
>>
>> If I create a guest instance with networks VLAN1, VLAN2, VLAN3, VLAN4,
>> connected, but my nova created libvirtl.xml contains no entries for network
>> interfaces at all. The VM boots without NICs.
>>
>> However if I add:
>>
>> quantum subnet-create VLAN1 --gateway 10.0.0.1 10.0.0.0/24 --
>> --enable_dhcp=False
>> quantum subnet-create VLAN2 --gateway 10.0.1.1 10.0.1.0/24 --
>> --enable_dhcp=False
>> quantum subnet-create VLAN3 --gateway 10.0.2.1 10.0.2.0/24 --
>> --enable_dhcp=False
>> quantum subnet-create VLAN4 --gateway 10.0.3.1 10.0.3.0/24 --
>> --enable_dhcp=False
>>
>> Thus making quantum net-list show:
>>
>>
>> +--------------------------------------+-------+--------------------------------------+
>> | id                                   | name  | subnets
>> |
>>
>> +--------------------------------------+-------+--------------------------------------+
>> | 19af012e-fa1e-4fc2-aac8-7611ef33428b | VLAN4 |
>> a451a6ad-ff4d-40e2-8a8a-2582bfd5a3ed |
>> | 28310262-bcb3-43b9-8366-f31f5ac7a990 | VLAN1 |
>> 98c42f7e-15e3-4c9b-b323-54346086bfd4 |
>> | 788bd827-5ba1-4b0f-99b4-e98040c9730d | VLAN2 |
>> e022730c-b0f7-4158-b8ef-e56da0ceb227 |
>> | be859d44-1d16-4923-b33b-c5dc292cc68f | VLAN3 |
>> 1b68886a-a693-4039-813b-23d085bb43d2 |
>>
>> +--------------------------------------+-------+--------------------------------------+
>>
>> My generated libvirt.xml has NICs, but I'm stuck with allocation pools..
>> which I don't want or need. Also the interfaces seem to be bridged only to
>> the integration bridge in OVS.
>>
>> Q1) The nova.virt.libvirt.vif.LibvirtHybridOVSBridgeDriver driver is one
>> of many that say 'deprecated' in the source code. What should I be using?
>> Just the generic?
>> Q2) How do I have provider networks which are VLAN tagged by OVS, have no
>> Quantum subnet assigned, yet will have nova-compute define vifs properly?
>>
>> Thanks for your help in advance,
>>
>> John Gruber
>>
>>
>>
>>
>>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to     : openstack at lists.launchpad.net
> Unsubscribe : https://launchpad.net/~openstack
> More help   : https://help.launchpad.net/ListHelp
>




More information about the Openstack mailing list