[OPNFLWPLUG-381] flow ID is unknown value in operational store. (e.g. "id": "#UF$TABLE*200-3") Created: 18/Mar/15  Updated: 27/Sep/21  Resolved: 05/Jun/15

Status: Resolved
Project: OpenFlowPlugin
Component/s: General
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: Jamo Luhrsen Assignee: Jozef Gloncak
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issue Links:
Blocks
blocks OPNFLWPLUG-429 Milestone: OpenFlow Plugin Redesign -... Resolved
External issue ID: 2862

 Description   

To recreate, PUT the flow XML below once and verify it exists properly in operational store.
Then change the ipv4 dest ip address in the flow XML to 98.0.0.0/8 and re-PUT it. The operational
store will now show an unknown ID like this:

{
"flow-node-inventory:table": [
{
"id": 200,
"opendaylight-flow-table-statistics:flow-table-statistics":

{ "packets-looked-up": 0, "packets-matched": 0, "active-flows": 1 }

,
"flow": [
{
"id": "#UF$TABLE*200-3",
"flags": "",
"match": {
"ipv4-destination": "98.0.0.0/8",
"ipv4-source": "11.3.0.0/16",
"ethernet-match": {
"ethernet-type":

{ "type": 2048 }

,
"ethernet-source":

{ "address": "00:AB:CD:EF:01:23" }

,
"ethernet-destination":

{ "address": "FF:FF:FF:FF:FF:FF" }

}
},
"priority": 32768,
"instructions": {
"instruction": [
{
"order": 0,
"apply-actions": {
"action": [
{
"order": 0,
"output-action":

{ "output-node-connector": "FLOOD", "max-length": 0 }

}
]
}
}
]
},
"idle-timeout": 300,
"opendaylight-flow-statistics:flow-statistics": {
"duration":

{ "nanosecond": 832000000, "second": 9 }

,
"byte-count": 0,
"packet-count": 0
},
"table_id": 200,
"hard-timeout": 600,
"cookie": 0
}
],
"flow-hash-id-map": [

{ "hash": "Match [_ethernetMatch=EthernetMatch [_ethernetDestination=EthernetDestination [_address=MacAddress [_value=FF:FF:FF:FF:FF:FF], augmentation=[]], _ethernetSource=EthernetSource [_address=MacAddress [_value=00:AB:CD:EF:01:23], augmentation=[]], _ethernetType=EthernetType [_type=EtherType [_value=2048], augmentation=[]], augmentation=[]], _layer3Match=Ipv4Match [_ipv4Destination=Ipv4Prefix [_value=98.0.0.0/8], _ipv4Source=Ipv4Prefix [_value=11.3.0.0/16], augmentation=[]], augmentation=[]]327680", "flow-id": "#UF$TABLE*200-3" }

],
"opendaylight-flow-statistics:aggregate-flow-statistics":

{ "flow-count": 1, "byte-count": 0, "packet-count": 0 }

}
]
}



 Comments   
Comment by Jamo Luhrsen [ 18/Mar/15 ]

XML for flow to PUT:

<flow xmlns="urn:opendaylight:flow:inventory"><instructions><instruction><order>0</order><apply-actions><action><order>0</order><output-action><output-node-connector>FLOOD</output-node-connector></output-action></action></apply-actions></instruction></instructions><match><ethernet-match><ethernet-type><type>0x800</type></ethernet-type><ethernet-source><address>00:ab:cd:ef:01:23</address></ethernet-source><ethernet-destination><address>ff:ff:ff:ff:ff:ff</address></ethernet-destination></ethernet-match><ipv4-source>11.3.0.0/16</ipv4-source><ipv4-destination>99.0.0.0/8</ipv4-destination></match><table_id>200</table_id><id>1</id></flow>

Comment by Luis Gomez [ 24/Apr/15 ]

This is the ONE TC failure we see in the OpenFlow system test.

Comment by subhash kumar singh [ 20/May/15 ]

I am not able to reproduce this bug. First I tried to install the flow with dst_ip 99.0.0.0/8 then with 98.0.0.0/8 and the flow ID does not change.

Please let me know if I am missing ant step for reproducing the bug.

Comment by Luis Gomez [ 20/May/15 ]

Hi Subhash, a few checkings here:

1) Are you using helium plugin (odl-openflowplugin-flow-services-* feature) for this test?

2) Are you adding the 2nd flow without deleting the 1st?

I am sking because this issue is still very apparent in the test automation.

BR/Luis

Comment by subhash kumar singh [ 21/May/15 ]

Hi Luis,

1) Are you using helium plugin (odl-openflowplugin-flow-services-* feature) for this test?
I used the feature odl-openflowplugin-flow-services (version: 0.1.0-SNAPSHOT repo: openflowplugin-0.1.0-SNAPSHOT). Should I use odl-openflowpluging-li ?

2) Are you adding the 2nd flow without deleting the 1st?
Yes, I am adding the 2nd flow without deleting the 1st.

Comment by Jamo Luhrsen [ 26/May/15 ]

I was checking in on this bug and am using this build:
distribution-karaf-0.3.0-20150526.214206-1847.zip

I tried with both plugin codebases' features:
odl-openflowplugin-flow-services-ui
odl-openflowplugin-flow-services-ui-li

At this point I was seeing this unknown value in the flow id inside operational
on the first push. did not require me to modify the flow.

Comment by Luis Gomez [ 27/May/15 ]

I already answered in the list, this issue is bigger than we thought as flow ID is always unknown in Lithium distribution.

Comment by Jozef Gloncak [ 29/May/15 ]

I tested in Lithium and found out (thank to Michal Rehak), that if input contains MAC addresses in upper case. Then it is all right.

The mail was sent to Anton Tkacik (should be able to fix it - probably wrong equals method implemenation in lazy generated code).

Comment by Luis Gomez [ 29/May/15 ]

If I remember correctly the flows we push in integration are L3, they only match IP address.

Comment by Jozef Gloncak [ 01/Jun/15 ]

Response from Anton Tkacik regarding suspicion on problem in equal() method
===================
https://bugs.opendaylight.org/show_bug.cgi?id=2825

will not be fixed in Lithium – since YANG does not provide information that mac-addresses should
Be stored in lower-case and should be compared camel-case agnostic.

That was hugelly discussed few weeks ago with OF community.

Will be probably fixed in Berrylium.
===================

Comment by Abhijit Kumbhare [ 01/Jun/15 ]

Elevated to blocker in OpenFlow plugin meeting. Anil will look into this for the old design. On the new design this still needs to be looked at by Jozef .

Comment by Jozef Gloncak [ 02/Jun/15 ]

My conclusion:
in both plugins it is currently necessary to record flows with MAC address uppercased. As Anton Tkacik responded this comparison problem (lower vs. upper case) would be probably fixed in Berrylium

Comment by Jozef Gloncak [ 03/Jun/15 ]

It looks like in Li plugin is problem with aliens still present. Investigating.

Comment by Luis Gomez [ 03/Jun/15 ]

I do not see this issue with Lithium redesign code.

Comment by Jozef Gloncak [ 03/Jun/15 ]

ok, so if you are using upper case for MAC address it works fine (Li plugin)

Comment by Luis Gomez [ 03/Jun/15 ]

Just to be clear this issue is nothing to do with data format. This issue is ANY flow pushed using Helium code generates alien flow-ID. This behavior is only observed with Helium code.

Comment by Jamo Luhrsen [ 03/Jun/15 ]

just to be more concrete, I have tested this with a single flow config (not an update to an
existing flow) flow XML is below and it does not have any MAC address in there to confuse
the upper vs lower case issue.

for helium SR3 the flow id is fine. For both helium codebase and lithium redesign codebase,
I get alien ids. I'm installing odl-openflowplugin-flow-services-ui for helium codebase
and odl-openflowplugin-flow-services-ui-li for lithium code base.

using mininet with a single switch topo.

here is the flow xml:

<flow xmlns="urn:opendaylight:flow:inventory">
<instructions><instruction>
<order>0</order>
<apply-actions>
<action>
<order>0</order>
<output-action>
<output-node-connector>FLOOD</output-node-connector>
</output-action>
</action>
</apply-actions>
</instruction>
</instructions>
<match>
<ethernet-match>
<ethernet-type>
<type>0x800</type>
</ethernet-type>
</ethernet-match>
<ipv4-source>11.3.0.0/16</ipv4-source>
<ipv4-destination>99.0.0.0/8</ipv4-destination>
</match>
<table_id>0</table_id>
<id>1</id>
</flow>

Comment by Luis Gomez [ 03/Jun/15 ]

Ok, this is new to me because with the flows we push in CI, the Li redesign is doing good.

Comment by Jozef Gloncak [ 04/Jun/15 ]

With input from Jamo I was able to find that problem is in missing priority element.

This patch should solve it in Li OF plugin
https://git.opendaylight.org/gerrit/#/c/21851/

Quotation from commit message:
-------------
Problem was:

  • flow was sent to device
  • attempt to write flow registry - fails (NPE) because missing priority
  • flow was written to device
  • statistics bring info about flow
  • flow isn't found in flow registry therefore alien ID is generated for it.

Solution:

  • sending of flow to device is executed only after storing flow to flow
    registry. If it is unsuccessful then nothing is sent to device. Flow is thus
    stored only in config DS.
    -------------
Comment by Luis Gomez [ 04/Jun/15 ]

We use priority in the flows we are pushing in CI and still fail, so I am not sure the root cause is missing priority.

Comment by Jamo Luhrsen [ 04/Jun/15 ]

another update.

The flow I'm using is in a previous comment (no priority and no MAC addresses).

there are several combinations here:

A)
He plugin:

flow without priority

  • operational store shows alien id

flow with priority

  • operational store shows alien id

B)
Li plugin after[1] Jozef's patch[2]

flow without priority

  • NO flow in operational. expecting flow and default priority (32768) to be there.

flow with priority

  • operational store is OK

C)
Li plugin before[3] Jozef's patch[2]

flow without priority

  • operational store shows alien id

flow with priority

  • operational store is OK

I'm not sure if the patch [2] is the difference between A) and B), but I came to learn
from Michal that if we don't specify a priority, then the defaut 0x8000 == 32768 is to be
used in the flow pushed to the switch.

[1] distribution-karaf-0.3.0-20150604.163741-2284.zip
[2] https://git.opendaylight.org/gerrit/#/c/21851/1
[3] distribution-karaf-0.3.0-20150602.171547-2182.zip

Comment by Anil Vishnoi [ 05/Jun/15 ]

Looks like this issue happen when user don't specify the cookie value while flow installation, which is perfectly alright. Following patch fixes the issue in Helium code base of stable/lithium branch.

stable/lithium : https://git.opendaylight.org/gerrit/#/c/21981/

Comment by Anil Vishnoi [ 05/Jun/15 ]

Jamo, Above patch should fix (A). Can you please verify the above patch.

Thanks
Anil

Comment by Anil Vishnoi [ 05/Jun/15 ]

master : https://git.opendaylight.org/gerrit/#/c/21995/

Comment by Abhijit Kumbhare [ 05/Jun/15 ]

Since this is now fixed for Helium portion of stable/lithium - can you (Jozef/Michal) check if the issue is still present Lithium design?

Comment by Jamo Luhrsen [ 05/Jun/15 ]

CI is now passing:
https://jenkins.opendaylight.org/releng/view/openflowplugin/job/openflowplugin-csit-1node-cds-flow-services-all-stable-lithium/

I've also verified my previous comments steps (A, B, C). There is still a problem where Li-plugin is not allowing a flow if it doesn't have the
priority explicitly set. A new bug will be opened for that.

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