[OVSDB-187] pipeline flows not programmed on manually added br-int Created: 17/Jul/15  Updated: 11/Oct/15  Resolved: 11/Oct/15

Status: Resolved
Project: ovsdb
Component/s: openstack.net-virt
Affects Version/s: unspecified
Fix Version/s: None

Type: Bug
Reporter: Sam Hague Assignee: Sam Hague
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


External issue ID: 4014

 Description   

pipeline flows not programmed on manually added br-int

Steps:

1. Manually add br-int on the ovsdb node
sudo ovs-vsctl add-br br-int
2. stack
3. check for the pipeline flows
sudo ovs-ofctl -O OpenFlow13 dump-flows br-int

The netvirt code expects to get a dataChange event for the new bridge node. The pipeline verifies that that the OvsdbBridgeAugmentation is part of the node before programming the pipeline flows. In the failed scenario this dataChange does not happen. What does happen is a terminationPoint event might come in for the ports on that bridge. In the example below, the only augmentation is the terminationPoint augmentation. The bridgeAugmentation is further down in the terminationPoint so it is not found.

2015-07-17 08:52:04,559 | INFO | pool-44-thread-1 | PipelineOrchestratorImpl | 269 - org.opendaylight.ovsdb.openstack.net-virt-providers - 1.1.1.SNAPSHOT | >>>>> dequeue: Node{getNodeId=Uri [_value=ovsdb://uuid/3b2c4dea-c9aa-4d64-9bc3-d0e6e3fafbff/bridge/br-int], getTerminationPoint=[TerminationPoint{getTpId=Uri [_value=eth1], augmentations={interface org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.OvsdbTerminationPointAugmentation=OvsdbTerminationPointAugmentation

{getInterfaceUuid=Uuid [_value=390ff11d-cc87-47e0-b2a7-aeb6e5437fad], getName=eth1, getOfport=1, getPortUuid=Uuid [_value=95c16f5a-1d23-4eeb-8fe2-93278f7242bf]}

}}, TerminationPoint{getTpId=Uri [_value=br-int], augmentations={interface org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.OvsdbTerminationPointAugmentation=OvsdbTerminationPointAugmentation

{getInterfaceType=class org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.InterfaceTypeInternal, getInterfaceUuid=Uuid [_value=450cfec9-906d-43c1-9685-c4ee7f297104], getName=br-int, getOfport=65534, getPortUuid=Uuid [_value=473c4af1-080e-43e4-9e79-79461840c84b]}

}}], augmentations={interface org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.OvsdbBridgeAugmentation=OvsdbBridgeAugmentation{getBridgeName=OvsdbBridgeName [_value=br-int], getBridgeUuid=Uuid [_value=9b2b977b-cc94-4ef3-b909-148bdc402e88], getDatapathId=DatapathId [_value=00:00:7a:97:2b:9b:f3:4e], getDatapathType=class org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.DatapathTypeSystem, getManagedBy=OvsdbNodeRef [_value=KeyedInstanceIdentifier

{targetType=interface org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node, path=[org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NetworkTopology, org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.Topology[key=TopologyKey [_topologyId=Uri [_value=ovsdb:1]]], org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node[key=NodeKey [_nodeId=Uri [_value=ovsdb://uuid/3b2c4dea-c9aa-4d64-9bc3-d0e6e3fafbff]]]]}

]}}}



 Comments   
Comment by Eric Multanen [ 05/Aug/15 ]

A situation I'm running into consistently is that the Openstack control node which is stacking (and using ODL) will end up not setting the 'controller' for br-int. As I understand it, devstack is creating br-int - presumably before the 'manager' has been set to ODL. (br-int is not present prior to stacking)

Anyway, once stacking is complete, the 'manager' is set to ODL, but the 'controller' for br-int (and br-ex) is not set. And so the pipeline flows are not present.

After manually setting the controller to point to ODL, the pipeline flows get added.

So, is this the same bug, or should I file a separate bug?

Comment by Sharad Mishra [ 11/Aug/15 ]

I am investigating the issue reported by Eric. IMO, the two may be same. What Sam saw is the effect of controller not getting added.

Comment by Sam Hague [ 13/Aug/15 ]

I think there are different issues:

1. The bug I reported here is valid. The pipeline flows will only get added when a node event comes in for a bridge. That does not happen in the case for this bug. In this case you can see that the pipeline flows are never added to config.

2. The pipeline flows are programmed but the controller is never set so the bridge never connects as a openflow switch and flows pushed to it. In this case you can see the pipeline flows in config and the controller address is set.

We need to be clear on which case is being hit. I will create another bug to cover case 2.

There might also be a third case: https://bugs.opendaylight.org/show_bug.cgi?id=3974. In that case br-int is not even created.

Comment by Sharad Mishra [ 26/Aug/15 ]

I tried first 3 steps mentioned here with the patch for 4135 and the flow came up as -

[stack@controller ~]$ sudo ovs-ofctl -O OpenFlow13 dump-flows br-int
OFPST_FLOW reply (OF1.3) (xid=0x2):
cookie=0x0, duration=21.818s, table=0, n_packets=0, n_bytes=0, priority=0 actions=goto_table:20
cookie=0x0, duration=23.783s, table=0, n_packets=0, n_bytes=0, dl_type=0x88cc actions=CONTROLLER:65535
cookie=0x0, duration=21.751s, table=20, n_packets=0, n_bytes=0, priority=0 actions=goto_table:30
cookie=0x0, duration=21.668s, table=30, n_packets=0, n_bytes=0, priority=0 actions=goto_table:40
cookie=0x0, duration=21.584s, table=40, n_packets=0, n_bytes=0, priority=0 actions=goto_table:50
cookie=0x0, duration=21.493s, table=50, n_packets=0, n_bytes=0, priority=0 actions=goto_table:60
cookie=0x0, duration=21.409s, table=60, n_packets=0, n_bytes=0, priority=0 actions=goto_table:70
cookie=0x0, duration=21.325s, table=70, n_packets=0, n_bytes=0, priority=0 actions=goto_table:80
cookie=0x0, duration=21.259s, table=80, n_packets=0, n_bytes=0, priority=0 actions=goto_table:90
cookie=0x0, duration=21.183s, table=90, n_packets=0, n_bytes=0, priority=0 actions=goto_table:100
cookie=0x0, duration=21.133s, table=100, n_packets=0, n_bytes=0, priority=0 actions=goto_table:110
cookie=0x0, duration=21.083s, table=110, n_packets=0, n_bytes=0, priority=0 actions=drop

I get the same flow if I do not manually add br-int.

Am I missing something?

Comment by Sam Hague [ 26/Aug/15 ]

(In reply to Sharad Mishra from comment #4)
> I tried first 3 steps mentioned here with the patch for 4135 and the flow
> came up as -
>
> [stack@controller ~]$ sudo ovs-ofctl -O OpenFlow13 dump-flows br-int
> OFPST_FLOW reply (OF1.3) (xid=0x2):
> cookie=0x0, duration=21.818s, table=0, n_packets=0, n_bytes=0, priority=0
> actions=goto_table:20
> cookie=0x0, duration=23.783s, table=0, n_packets=0, n_bytes=0,
> dl_type=0x88cc actions=CONTROLLER:65535
> cookie=0x0, duration=21.751s, table=20, n_packets=0, n_bytes=0, priority=0
> actions=goto_table:30
> cookie=0x0, duration=21.668s, table=30, n_packets=0, n_bytes=0, priority=0
> actions=goto_table:40
> cookie=0x0, duration=21.584s, table=40, n_packets=0, n_bytes=0, priority=0
> actions=goto_table:50
> cookie=0x0, duration=21.493s, table=50, n_packets=0, n_bytes=0, priority=0
> actions=goto_table:60
> cookie=0x0, duration=21.409s, table=60, n_packets=0, n_bytes=0, priority=0
> actions=goto_table:70
> cookie=0x0, duration=21.325s, table=70, n_packets=0, n_bytes=0, priority=0
> actions=goto_table:80
> cookie=0x0, duration=21.259s, table=80, n_packets=0, n_bytes=0, priority=0
> actions=goto_table:90
> cookie=0x0, duration=21.183s, table=90, n_packets=0, n_bytes=0, priority=0
> actions=goto_table:100
> cookie=0x0, duration=21.133s, table=100, n_packets=0, n_bytes=0, priority=0
> actions=goto_table:110
> cookie=0x0, duration=21.083s, table=110, n_packets=0, n_bytes=0, priority=0
> actions=drop
>
>
> I get the same flow if I do not manually add br-int.
>
> Am I missing something?

Sharad,

not sure what the question is. Are you just saying that you can't reproduce the bug with your patch? That's possible since all these bugs are timing related. The key is to isolate the scenario which is hard. The 4135 fix may or may not have any impact of the problem here. The only way to verify is if the flows are in config and not operational. If you see the flows on the switch then that means they are in operational.

It is this line in PipelineOrchestratorImpl that is failing for this bug:
if (southbound.getBridge(node) != null) {

In this case the node event does not have a BridgeAugmentation so it fails and the pipeline flows don't get programmed.

Sam

Comment by Sharad Mishra [ 26/Aug/15 ]

(In reply to Sam Hague from comment #5)
> (In reply to Sharad Mishra from comment #4)
> > I tried first 3 steps mentioned here with the patch for 4135 and the flow
> > came up as -
> >
> > [stack@controller ~]$ sudo ovs-ofctl -O OpenFlow13 dump-flows br-int
> > OFPST_FLOW reply (OF1.3) (xid=0x2):
> > cookie=0x0, duration=21.818s, table=0, n_packets=0, n_bytes=0, priority=0
> > actions=goto_table:20
> > cookie=0x0, duration=23.783s, table=0, n_packets=0, n_bytes=0,
> > dl_type=0x88cc actions=CONTROLLER:65535
> > cookie=0x0, duration=21.751s, table=20, n_packets=0, n_bytes=0, priority=0
> > actions=goto_table:30
> > cookie=0x0, duration=21.668s, table=30, n_packets=0, n_bytes=0, priority=0
> > actions=goto_table:40
> > cookie=0x0, duration=21.584s, table=40, n_packets=0, n_bytes=0, priority=0
> > actions=goto_table:50
> > cookie=0x0, duration=21.493s, table=50, n_packets=0, n_bytes=0, priority=0
> > actions=goto_table:60
> > cookie=0x0, duration=21.409s, table=60, n_packets=0, n_bytes=0, priority=0
> > actions=goto_table:70
> > cookie=0x0, duration=21.325s, table=70, n_packets=0, n_bytes=0, priority=0
> > actions=goto_table:80
> > cookie=0x0, duration=21.259s, table=80, n_packets=0, n_bytes=0, priority=0
> > actions=goto_table:90
> > cookie=0x0, duration=21.183s, table=90, n_packets=0, n_bytes=0, priority=0
> > actions=goto_table:100
> > cookie=0x0, duration=21.133s, table=100, n_packets=0, n_bytes=0, priority=0
> > actions=goto_table:110
> > cookie=0x0, duration=21.083s, table=110, n_packets=0, n_bytes=0, priority=0
> > actions=drop
> >
> >
> > I get the same flow if I do not manually add br-int.
> >
> > Am I missing something?
>
> Sharad,
>
> not sure what the question is. Are you just saying that you can't reproduce
> the bug with your patch? That's possible since all these bugs are timing
> related. The key is to isolate the scenario which is hard. The 4135 fix may
> or may not have any impact of the problem here. The only way to verify is if
> the flows are in config and not operational. If you see the flows on the
> switch then that means they are in operational.
>
> It is this line in PipelineOrchestratorImpl that is failing for this bug:
> if (southbound.getBridge(node) != null) {
>
> In this case the node event does not have a BridgeAugmentation so it fails
> and the pipeline flows don't get programmed.
>
> Sam

Sam,

I am trying to recreate the bug. Since it is timing related .. it is intermittent. And if I understand you correctly, since in my case I got the flows on switch, it worked this time. Is that correct?

-Sharad

Comment by Sam Hague [ 26/Aug/15 ]

(In reply to Sharad Mishra from comment #6)
> (In reply to Sam Hague from comment #5)
> > (In reply to Sharad Mishra from comment #4)
> > > I tried first 3 steps mentioned here with the patch for 4135 and the flow
> > > came up as -
> > >
> > > [stack@controller ~]$ sudo ovs-ofctl -O OpenFlow13 dump-flows br-int
> > > OFPST_FLOW reply (OF1.3) (xid=0x2):
> > > cookie=0x0, duration=21.818s, table=0, n_packets=0, n_bytes=0, priority=0
> > > actions=goto_table:20
> > > cookie=0x0, duration=23.783s, table=0, n_packets=0, n_bytes=0,
> > > dl_type=0x88cc actions=CONTROLLER:65535
> > > cookie=0x0, duration=21.751s, table=20, n_packets=0, n_bytes=0, priority=0
> > > actions=goto_table:30
> > > cookie=0x0, duration=21.668s, table=30, n_packets=0, n_bytes=0, priority=0
> > > actions=goto_table:40
> > > cookie=0x0, duration=21.584s, table=40, n_packets=0, n_bytes=0, priority=0
> > > actions=goto_table:50
> > > cookie=0x0, duration=21.493s, table=50, n_packets=0, n_bytes=0, priority=0
> > > actions=goto_table:60
> > > cookie=0x0, duration=21.409s, table=60, n_packets=0, n_bytes=0, priority=0
> > > actions=goto_table:70
> > > cookie=0x0, duration=21.325s, table=70, n_packets=0, n_bytes=0, priority=0
> > > actions=goto_table:80
> > > cookie=0x0, duration=21.259s, table=80, n_packets=0, n_bytes=0, priority=0
> > > actions=goto_table:90
> > > cookie=0x0, duration=21.183s, table=90, n_packets=0, n_bytes=0, priority=0
> > > actions=goto_table:100
> > > cookie=0x0, duration=21.133s, table=100, n_packets=0, n_bytes=0, priority=0
> > > actions=goto_table:110
> > > cookie=0x0, duration=21.083s, table=110, n_packets=0, n_bytes=0, priority=0
> > > actions=drop
> > >
> > >
> > > I get the same flow if I do not manually add br-int.
> > >
> > > Am I missing something?
> >
> > Sharad,
> >
> > not sure what the question is. Are you just saying that you can't reproduce
> > the bug with your patch? That's possible since all these bugs are timing
> > related. The key is to isolate the scenario which is hard. The 4135 fix may
> > or may not have any impact of the problem here. The only way to verify is if
> > the flows are in config and not operational. If you see the flows on the
> > switch then that means they are in operational.
> >
> > It is this line in PipelineOrchestratorImpl that is failing for this bug:
> > if (southbound.getBridge(node) != null) {
> >
> > In this case the node event does not have a BridgeAugmentation so it fails
> > and the pipeline flows don't get programmed.
> >
> > Sam
>
>
> Sam,
>
> I am trying to recreate the bug. Since it is timing related .. it is
> intermittent. And if I understand you correctly, since in my case I got the
> flows on switch, it worked this time. Is that correct?
>
> -Sharad

Sharad,

yes, if the flows are on the switch then it passed and the bug wasn't hit.

4014 and 4135 would look similar on the bridge in that you would not see flows. That could happen for different reasons on the ODL side.

1. The line of code I mentioned above where an bridge augmentationis not found and causes the flows to not be added to config. In this case there could be a br-int in operational but somehow NetVirt doesn't see the node update and hence doesn't add the flows. Since the flows are not added to config, they are never pushed to the switch. Here you would need to see if the flows are in config and not on the switch and if the controller is set and connected.

2. The issue which 4135 fixed where the controller was never added to the bridge. In this case the pipeline flows would be programmed and added to config, but since the set-controller never worked the flows would never get pushed to the switch. You would need to chck if the controller is set in the switch to verify if this was hit.

For 1, when I hit the issue, it was during the devstack networking-odl adding br-int and then connecting to ODL. I don't really know how this could happen, though, because I thought if the ovsdb node connects to ODL then those operational updates should make it to NetVirt - one of the updates should have been a BridgeAugmentation. But that did not happen. I could see the ovsdb node connected to ODL and I saw the br-int bridge connected to ODL OpenFlow - but not flows. Looking deeper I saw that the flows were not in config.

Sam

Comment by Sam Hague [ 26/Aug/15 ]

forgot to add, in your testing are you using devstack? And without the fixes we pushed to make devstack not add br-int?

Comment by Sharad Mishra [ 08/Sep/15 ]

Sam, I am using devstack and latest ODL master.

Generated at Wed Feb 07 20:35:44 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.