Configuring Open vSwitch/Neutron Agent to Use Existing Provider VLANs

asked 2017-05-09 06:13:19 +0200

awestin1 gravatar image

updated 2017-05-11 19:39:15 +0200

We have recently stood up an OpenStack (Ocata) controller and a Hyper-V compute node with Cloudbase Nova agent installed as well as Open vSwitch 2.6.1 neutron agent (installed via the Cloudbase Open vSwitch installer).

Prior to standing up OpenStack in the past few weeks, we have had quite a number of customers hosted and managed manually on our network each with their own dedicated VLAN on our network. I am attempting to create provider networks for each customer where each network is configured to use each customers' existing, corresponding VLAN. For example:

  • Customer A is on VLAN 150
  • Customer B is on VLAN 200
  • Customer C is on VLAN 250
  • etc.

We want to create tenants in OpenStack for each customer, and then create a network for each customer's VLAN and assign it to the corresponding customer and allow customers to launch their own VMs on their dedicated VLANs on our network (with IPs from their subnet pool assigned to the VM automatically).

We have only configured ONE interface that we want to use with Open vSwitch on which OpenStack should be adding VMs. However, for some reason when OpenStack spins up a VM, we look at the Hyper-V settings for the VM and the network adapter is assigned to the wrong Hyper-V VMSwitch and the VLAN is not enabled or assigned.

Per the info below, the bridge br-back_end was created in OVS on the compute node. Port "Ethernet 2 Farm Nic" was added to the bridge. This is the physical interface where Customer A needs to be able to communicate on VLAN 150. Back-end zone is the virtual switch in Hyper-V that uses "Ethernet 2 Farm Nic".

We launched a VM for Customer A (which should be on VLAN 150). Per the info included below, when OpenStack launched the VM, interface/port "8e0a75d9-14a3-48d2-8526-cfdee2dc3cd8" was created automatically on the br-int OVS bridge. However, when looking at the settings for the instance in Hyper-V, it shows the instance is using "8e0a75d9-14a3-48d2-8526-cfdee2dc3cd8" on the Web zone VMSwitch. VLAN is not enabled in the adapter settings for the instance in Hyper-V and the VM (with DHCP turned on) is not picking up an IP address. Screenshot of the Hyper-V adapter settings for the instance.

Does anyone know why the Web zone VMSwitch is being assigned to the instance in Hyper-V and VLAN is not enabled for the adapter (with no VLAN assigned)? Per below, we need to be on VLAN 150 on the Ethernet 2 Farm Nic physical interface. The Back-end zone VMswitch uses the Ethernet 2 Farm Nic physical interface. The Web zone VMswitch uses some other physical interface that we do not want this VM to use. So, I'm not sure why the adapter for the instance is being attached to the Web zone VMswitch...

Does anyone have any ideas? Any thoughts or guidance would be GREATLY appreciated.

Here is our ovs-vsctl show output from the Hyper-V compute node:

PS C:\Windows\system32> ovs-vsctl show
c1a78073-23dd-4cfc-b743-063d9a654440
Bridge ...
(more)
edit retag flag offensive close merge delete

Comments

Perhaps I should be using the Hyper-V agent for this rather than the OVS agent? Any thoughts?

awestin1 gravatar imageawestin1 ( 2017-05-09 06:23:00 +0200 )edit

Hello, if you have only flat/vlan requirements, you can use the hyper-v neutron agent.

avladu gravatar imageavladu ( 2017-05-10 19:06:56 +0200 )edit

Hello awestin1! Could you please look inside nova configuration file? You should have the vswitch_name under the hyperv section. That is where the VM will be attached. Could you share your nova config file too? Thanks, Alin.

abalutoiu gravatar imageabalutoiu ( 2017-05-10 21:41:54 +0200 )edit

@abalutoiu Thanks! I will give that a try. Here is my nova.conf: https://paste.ubuntu.com/24550769/

awestin1 gravatar imageawestin1 ( 2017-05-10 23:27:53 +0200 )edit

@avladu Thank you! I will look into that path as well!

awestin1 gravatar imageawestin1 ( 2017-05-10 23:28:17 +0200 )edit

@abalutoiu I have a question regarding that approach. Can I define only one VMswitch? What if I need to define multiple networks where I need one to be on VLAN 150 on VMswitch1 and another network to be on VLAN 199 on VMswitch2? Will this approach not work?

awestin1 gravatar imageawestin1 ( 2017-05-10 23:29:39 +0200 )edit

@abalutoiu Here is my nova.conf with comments stripped: https://paste.ubuntu.com/24551479/ I figured it would be easier to skim through.

awestin1 gravatar imageawestin1 ( 2017-05-11 01:28:46 +0200 )edit

Hello awestin1. Seem like this is the nova config file from the controller side. Can you also please paste nova.conf from the Hyper-V side? It should be in 'C:\Program Files\Cloudbase Solutions\OpenStack\Nova\etc'. Thanks, Dan.

danardelean gravatar imagedanardelean ( 2017-05-11 11:44:07 +0200 )edit

@danardelean I updated the post and added the nova.conf from the Hyper-V compute node. It's at the bottom now.

awestin1 gravatar imageawestin1 ( 2017-05-11 19:40:31 +0200 )edit