[OPNFLWPLUG-703] He plugin: node-removed notification for the same switch may be published twice Created: 27/May/16  Updated: 27/Sep/21  Resolved: 24/Jun/16

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

Type: Bug
Reporter: Shigeru Yasuda Assignee: Unassigned
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: 5974

 Description   

Version:
master (0f768f0752ac94e454c3c9e51879fac9abb61144)

I found a bug that He plugin publishes node-removed notification twice for the same switch when switch connection is reset while that switch is in idle state.

1. ConnectionConductorImpl.onSwitchIdleEvent() is called when switch idle state occurs.
It sends a ECHO_REQUEST to that switch and then waits for reply.
2. If that switch reset the connection, openflowjava invokes ConnectionConductorImpl.onDisconnectEvent().
A node-removed notification for that switch is published here because it calls
SessionManagerOFImpl.invalidateOnDisconnect().
3. A thread waiting for ECHO_REPLY gets an error and then calls SessionManagerOFImpl.invalidateOnDisconnect() explicitly.
So a node-removed notification for that switch is also published here.

This bug may remove node associated with valid OF session from operational DS.
If the switch described above reconnects to the controller between 2. and 3, a node associated with reconnected session will be removed by the second node-removed notification.



 Comments   
Comment by Shigeru Yasuda [ 27/May/16 ]

https://git.opendaylight.org/gerrit/39524 (master)

Comment by Shuva Jyoti Kar [ 11/Jun/16 ]

changes look good !

cherry-picked the same to stable/Be:
https://git.opendaylight.org/gerrit/#/c/40194/

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