[OVSDB-322] Southbound plugin doesn't allow controller initiated re-connection Created: 16/Mar/16  Updated: 30/Oct/17  Resolved: 17/May/16

Status: Resolved
Project: ovsdb
Component/s: Southbound.Open_vSwitch
Affects Version/s: unspecified
Fix Version/s: None

Type: Bug
Reporter: Anil Vishnoi Assignee: Anil Vishnoi
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: 5542

 Description   

Southbound plugin does not allow controller initiated re-connection,if the previous connection was terminated from switch side and not from controller side (through data store).

Steps to recreate the issue:

(1) Set OVS switch to listen in passive mode
(2) Fire restconf to controller to connect to the switch
(3) Delete manager of the OVS switch, this will terminate the connection
(4) Delete connection configuration from the data store
(5) Set manager in passive mode again for ovs switch
(6) Add the same configuration to data store again to re-connect to the switch.

Controller won't connect to the switch. Log message shows following log message
2016-03-16 00:57:09,240 | WARN | on-dispatcher-38 | OvsdbDataChangeListener | 163 - org.opendaylight.ovsdb.southbound-impl - 1.2.2.SNAPSHOT | Connection to device ConnectionInfo{getRemoteIp=IpAddress [_ipv4Address=Ipv4Address [_value=192.168.122.110], _value=[1, 9, 2, ., 1, 6, 8, ., 1, 2, 2, ., 1, 1, 0]], getRemotePort=PortNumber [_value=16640], augmentations={}} already exists. Plugin does not allow multiple connections to same device, hence dropping the request OvsdbNodeAugmentation{getConnectionInfo=ConnectionInfo{getRemoteIp=IpAddress [_ipv4Address=Ipv4Address [_value=192.168.122.110], _value=[1, 9, 2, ., 1, 6, 8, ., 1, 2, 2, ., 1, 1, 0]], getRemotePort=PortNumber [_value=16640], augmentations={}}}



 Comments   
Comment by Anil Vishnoi [ 16/Mar/16 ]

master : https://git.opendaylight.org/gerrit/#/c/36279/1
stable/beryllium : https://git.opendaylight.org/gerrit/#/c/36278/1
stable/lithium : https://git.opendaylight.org/gerrit/#/c/36280/1

Comment by Anil Vishnoi [ 16/Mar/16 ]

When controller initiated connection gets terminate from switch side (because of network outage, switch removed, machine down etc), it does not clear the instance identifier cache. When controller removes the configuration and connects back, it checks if the relevant IID is present in the cache, if it's present it assumes that controller is already connected. Above patches cleans up the cache and that resolves the issue.

Comment by Vishal Thapar [ 17/Mar/16 ]

Similar fix is needed for hwvtep too. I've raised a patch using the same bug-id:

stable/beryllium: https://git.opendaylight.org/gerrit/#/c/36381/
master: https://git.opendaylight.org/gerrit/#/c/36383/

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