table stats not available after a switch flap

Description

The issue was detected here:

https://jenkins.opendaylight.org/releng/view/openflowplugin/job/openflowplugin-csit-1node-sanity-only-neon/

It is not 100% consistent but easier to reproduce with cluster:

1) Connect ovs switch to 3 node cluster
2) flap the connection: sh ovs-vsctl set-controller s1 "tcp:127.0.0.1" && ovs-vsctl set-controller s1 "tcp:10.18.130.167" "tcp:10.18.130.152" "tcp:10.18.130.162
3) observe the table stats are not filled:

Environment

None

Activity

Show:

Somashekhar Javalagi February 18, 2020 at 4:32 AM

Thanks

Luis Gomez Palacios February 17, 2020 at 11:03 PM

I run 8 times test and I do not see issue.

Luis Gomez Palacios February 17, 2020 at 7:21 PM

Cool, the simpler the better. I will run the stats suite multiple times to verify.

Somashekhar Javalagi February 17, 2020 at 4:50 PM
Edited

  We have identified  a fix for this where we are collecting and writing flow stats first and then we are collecting table stats, to prevent overwrite of flow stats by table stats.

https://git.opendaylight.org/gerrit/c/openflowplugin/+/87624

I have run csit once and not seeing any flow table stats issues, can you please try running suit which includes table stats test cases multiple times, to see if it is stable.

Somashekhar Javalagi February 17, 2020 at 5:27 AM

We have added changes to wait for commit for first table stats write. With this csit seems to be fine. But one or two test cases are failing due to some delay in writing node information first time to operational inventory.

https://jenkins.opendaylight.org/releng/job/openflowplugin-patch-test-core-magnesium/47/

One or two nodes are getting connected after 1 or 2 second delay from the time of nodes check in oper inventory. So if test cases can be changed to have little delay before checking nodes from oper inventory, in case of more number of switches connecting, csit will not have any failures.

Can you please comment on this, so that we can have this fix ready.

Done

Details

Assignee

Reporter

Components

Affects versions

Priority

Created July 18, 2019 at 4:45 AM
Updated February 6, 2025 at 2:12 PM
Resolved February 20, 2020 at 6:54 AM