OVS plugin: vlan id not being set correctly?

Asked by tiadobatima

Hi all,

Maybe I'm missing something, but I can't see where the vlanID is being set. When I create a network:

# nova-manage network create --label=tenant1-private --vlan=1454 --fixed_range_v4=192.168.0.0/24 --project_id=6aeda55e9c0f4dae8c4caaf54701d99c

# nova-manage network list
id IPv4 IPv6 start address DNS1 DNS2 VlanID project uuid
4 192.168.0.0/24 None 192.168.0.2 8.8.4.4 None None 6aeda55e9c0f4dae8c4caaf54701d99c 56eb7a6e-0570-4595-8de1-f0a931966b65

> select cidr,vlan, uuid from nova.networks;
+----------------+------+--------------------------------------+
| cidr | vlan | uuid |
+----------------+------+--------------------------------------+
| 192.168.0.0/24 | NULL | 56eb7a6e-0570-4595-8de1-f0a931966b65 |
+----------------+------+--------------------------------------+

> select * from ovs_quantum.networks;
+--------------------------------------+----------------------------------+-----------------+-----------+
| uuid | tenant_id | name | op_status |
+--------------------------------------+----------------------------------+-----------------+-----------+
| 56eb7a6e-0570-4595-8de1-f0a931966b65 | 6aeda55e9c0f4dae8c4caaf54701d99c | tenant1-private | UP |
+--------------------------------------+----------------------------------+-----------------+-----------+

select * from ovs_quantum.vlan_bindings;
+---------+--------------------------------------+
| vlan_id | network_id |
+---------+--------------------------------------+
| 7 | 56eb7a6e-0570-4595-8de1-f0a931966b65 |
+---------+--------------------------------------+

> describe vlan_bindings;
+------------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+------------+--------------+------+-----+---------+----------------+
| vlan_id | int(11) | NO | PRI | NULL | auto_increment |
| network_id | varchar(255) | YES | | NULL | |
+------------+--------------+------+-----+---------+----------------+

Is the vlan_id field in the vlan_bindings table supposed to be autoincrement? If yes, where's the vlan id tracked?

I saw another question that mentions this issue, but since the problems look different, I'm starting a new thread for this particular issue. This is the other question:

https://answers.launchpad.net/quantum/+question/199800

Thanks!

Question information

Language:
English Edit question
Status:
Solved
For:
neutron Edit question
Assignee:
No assignee Edit question
Solved by:
tiadobatima
Solved:
Last query:
Last reply:
Revision history for this message
dan wendlandt (danwent) said :
#1

Hi,

Only the nova-manage network create options described in the Quantum admin guide are supported: http://docs.openstack.org/trunk/openstack-network/admin/content/Using-dle455.html

VLAN in particular is ignored, as it would make no sense for quantum plugins that do not use VLANs, and nova itself has no idea what quantum plugin is being run.

In Essex, the only way to specify a VLAN for a particular network is to understand how the plugin stores internal VLAN info (if it does), and then manipulate the database directly after the network was created.

In Folsom, network creation changes to no longer use nova-manage and instead to hit the Quantum API directly. This is the right long-term model. We will have an API extension that plugins can choose to implement that will optionally let a user specify a VLAN to use during network creation (see: https://blueprints.launchpad.net/quantum/+spec/provider-networks). This should be available for testing within a few weeks.

Revision history for this message
tiadobatima (gbaratto-3) said :
#2

Thanks for the info Dan! Very helpful!

Do you or anybody know if changing the vlan_id in the vlan_bindings table is enough to make the OVS agent to set the virtual port to the appropriate vlan in Essex (no tunnel config)?

I tried that but it didn't work, and I was wondering if there is a trick, or a bug. Checking the code for OVS agent, I see a lot of references to vlans, but I couldn't tell if there is a bug there.

Thanks again!
g.

Revision history for this message
Emilien Macchi (emilienm) said :
#3

You need to restart the agent on each server running OVS !

Revision history for this message
tiadobatima (gbaratto-3) said :
#4

I'm gonna pull an Obama, and blame it all on Bush! Rather ConfigParser module ;)

Basically, if there is a leading space in any line in the config file even with the next character being a comment (#), ConfigParse does not ignore the line.

This might be how ini files are supposed to work (I don't know the spec), but it's sure hard to track the problem once it's there.

Sorry for the trouble, and thanks for the help guys!
g.