← Back to team overview

openstack team mailing list archive

[Quantum] provider:network_type=vlan problem

 

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

Follow ups