Re: Is anyone working on the following issues?

Sharon Aicler

Thanks Sam,
It might be that on later versions of OVS it is like that, I will investigate.

On 04/08/2015 10:53 AM, Sam Hague wrote:

as a workaround can you aggregate the add-port and set interface commands:

ovs-vsctl add-port br-ex patch1-vlan-100 -- set interface patch1-vlan-100 type=patch options:peer=patch2-vlan-100

Code was added recently to drop ofport = -1 values because the spec said a value of -1 was a failed add-port. Ed added that code so he might have some ideas how to relax it.

Using ovs-vsctl without having an interface might be abusing it. The man page says "Creates on bridge a new port named port from the network device of the same name" so trying to add a port without a device is why the -1 comes out. That is why we typically combine the commands and ovs will create the interface at the same time as the port. That is also how we do it in the OVSDB project.

Thanks, Sam

----- Original Message -----
From: "Sharon Aicler" <saichler@...>
To: "Sam Hague" <shague@...>
Cc: ovsdb-dev@...
Sent: Wednesday, April 8, 2015 1:31:07 PM
Subject: Re: [ovsdb-dev] Is anyone working on the following issues?

Thank Sam for the quick reply,
I think a "no operational state" is a valid state, no? The issue i am
raising is that "-1" ofport is defined as an illegal value, hence
causing issues.
Here is the scenario that is causing this, I wanted to add a set of
patch ports where after each CLI command I checked the ofport value:

ovs-vsctl add-br br-ex
ovs-vsctl add-br br-int
ovs-vsctl add-port br-ex patch1-vlan-100 -> ofport value for
"patch1-vlan-100" in ovsdb is "-1".
ovs-vsctl add-port br-int patch2-vlan-100 -> ofport value for
"patch2-vlan-100" in ovsdb is "-1".
ovs-vsctl set interface patch1-vlan-100 type=patch -> ofport value
for "patch1-vlan-100" still ovsdb is "-1".
ovs-vsctl set interface patch2-vlan-100 type=patch -> ofport value
for "patch2-vlan-100" still ovsdb is "-1".
ovs-vsctl set interface patch1-vlan-100 options:peer=patch2-vlan-100 ->
ofport value of patch1-vlan-100" was changed to "1".
ovs-vsctl set interface patch2-vlan-100 options:peer=patch1-vlan-100 ->
ofport value of patch2-vlan-100" was changed to "1".
ovs-vsctl remove interface patch1-vlan-100 options peer -> *ofport value
changed back to "-1"*
ovs-vsctl remove interface patch2-vlan-100 options peer 0> *ofport value
changed back to "-1"*

On 04/08/2015 09:57 AM, Sam Hague wrote:
----- Original Message -----
From: "Sharon Aicler"<saichler@...>
Sent: Wednesday, April 8, 2015 12:27:40 PM
Subject: [ovsdb-dev] Is anyone working on the following issues?

I have pulled the latest ovsdb code and compiled it. I have noticed a few
issues and before i dig in to try and fix them, I would like to know if
someone is aware of them and might already be working on a fix. I am using
OVS version 2.0.2, but the following might also be happening with OVS
version 2.3.9.

-1 value for ofport in ovsdb
When a port is added to OVS, if the added port does not have a
interface/sub interface on the host, ovsdb assigns a "-1" value as the
ofport and this is causing ovsdb plugin issues during loading time and the
operation state is not retrieved @ all.
If -1 is returned then that means the port add to ovsdb failed. Normally
when a port is added the related interface is added at the same time,
otherwise the transaction fails. So the -1 should mean there is no
operational state.

If you are adding the port on the ovsdb instance using ovs-vsctl then I
would think the -1 there also means the port is not really added on the

ofport value is missing when a port is added
When ODL has finished loading and there is a correct operation state for
ports, if i add a port, the port is added to the operation state but does
not contain the ofport attribute.

Creating/Tagging a port via the restconf
I also was unable to create or tag a port via the restconf, i used the
json, note my OVS and ODL are not on the same server:
I was trying to create the port "br01.200" on bridge "br02" tagged with
Parts of the vlan tagging code is still in the progress of being added. It
might be best to wait until the rest of the code is in.

"network-topology:termination-point": [
"ovsdb:name": "br01.200",
"ovsdb:bridge-name": "br02",
"tp-id": "br01.200",
"ovsdb:vlan-tag": "200",
"ovsdb:interface-type": "ovsdb:interface-type-internal",


ovsdb-dev mailing list

Join { to automatically receive all group messages.