[OPNFLWPLUG-385] AD-SAL switch manager does not work Created: 23/Mar/15  Updated: 27/Sep/21  Resolved: 17/Nov/15

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

Type: Bug
Reporter: Luis Gomez Assignee: Tony Tkacik
Resolution: Done 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: 2886

 Description   

Hi controller devs,

Our CI System Test has detected a regression in AD-SAL NSF functionality:

  • For mininet OF10 devices, switch manager shows no node information
  • For mininet OF13 devices, switch manager misses some nodes (randomly)

Steps to reproduce:

1) Start controller, install features: odl-openflowplugin-flow-services-ui, odl-openflowplugin-adsal-compatibility, odl-nsf-all

2) start mininet: sudo mn --topo tree,2 --controller 'remote,ip=127.0.0.1'

3) Check switch manager at: http://localhost:8282/controller/nb/v2/switchmanager/default/nodes

By tracing back the error, 2 possible patches show up:

https://git.opendaylight.org/gerrit/16140 (controller message bus)
https://git.opendaylight.org/gerrit/#/c/16821 (yangtool enum)



 Comments   
Comment by Tony Tkacik [ 26/Mar/15 ]

Messagebus is not present / installed in CSIT so it should not be the cause, since it did not touched any codepath in openflowplugin

The second one is more potential, but API contract were preserved, which effectively means ad-sal compatibility was relying on some implementation detail.

Comment by Luis Gomez [ 27/Mar/15 ]

Hi Tony, I am going to remove the adsal test for now to restore the system test and unblock integration openflow patches, let me know when this is fixed so that I can restore the adsal test.

Thanks/Luis

Comment by Hideyuki Tai [ 03/Apr/15 ]

It seems to me that the root cause of this issue (OPNFLWPLUG-385) is in the sal-compatibility in the openflowplugin.git.

The sal-compatibility registers itself with MD-SAL as a DataChangeListener for "Nodes/Node".
On the registration, the sal-compatibility, however, sets DataChangeScope.BASE as the scope of the data change.

[legacy/sal-compatibility/src/main/java/org/opendaylight/openflowplugin/legacy/sal/compatibility/AbstractDataChangeListener.java]
113 protected void registrationListener(final DataBroker db, int i) {
114 try {
115 listenerRegistration = db.registerDataChangeListener(LogicalDatastoreType.OPERATIONAL,
116 getWildCardPath(), this, DataChangeScope.BASE);

Since the scope is BASE, MD-SAL does not notify the sal-compatibility of the data change of children and augmentation of "Nodes/Node".
Though the sal-compatibility needs the data in "FlowCapableNode", which is the augmentation of "Nodes/Node", to update Node information.

[legacy/sal-compatibility/src/main/java/org/opendaylight/openflowplugin/legacy/sal/compatibility/NodeDataChangeListener.java]
31 protected void add(InstanceIdentifier<Node> createKeyIdent, Node node) {
32 FlowCapableNode fcn = node.getAugmentation(FlowCapableNode.class);
33 if(fcn != null) {

Why did it work well before?
I guess that MD-SAL wrongly handled the "DataChangeScope.BASE", and it leaked data changes to listeners before the following patch was merged.
https://git.opendaylight.org/gerrit/#/c/16821
The leak might cover up the sal-compatibility issue.

Comment by Hideyuki Tai [ 03/Apr/15 ]

I've submitted a patch to the openflowplugin.git.
https://git.opendaylight.org/gerrit/#/c/17727/
The patch changes the scope of the data change from BASE to SUBTREE.

In my machine, I observed that the patch fixed the issue (OPNFLWPLUG-385).
By the result, I'm convinced that the root cause of this issue (OPNFLWPLUG-385) is in the sal-compatibility.

Comment by Abhijit Kumbhare [ 13/Apr/15 ]

Michal and Anil have +1-ed the change:

https://git.opendaylight.org/gerrit/#/c/17727/

Please do not close the bug - see Michal's comments on this (this is a temporary work around & actual fix needs to be done separately):

https://lists.opendaylight.org/pipermail/openflowplugin-dev/2015-April/002887.html

Comment by Luis Gomez [ 13/Apr/15 ]

OK, just let me know when I should restore the adsal tests in the CI. For now I am verifying this patch with new patch test job:

https://jenkins.opendaylight.org/releng/view/integration/job/integration-patch-test-master/1/

BR/Luis

Comment by Michal Rehak [ 15/Apr/15 ]

https://git.opendaylight.org/gerrit/#/c/17727/ merged

Comment by Carol Sanders [ 04/May/15 ]

This bug is part of the project to Move all ADSAL associated component bugs to ADSAL

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