multiple ovsdb connections from same southbound client




      Sometimes southbound node does not appear on the operational topology upon reboot of the southbound node in a haproxy deployment .


      In a HAPROXY deployed environment, it exposes a virtual ip say to southbound devices.

      All southbound devices connect to tcp:

      haproxy load balances these connections among the three controller nodes  say (,,

      while load balancing it does not retain the source ip of the device but puts its own ip.


root@odl1:~# netstat -nap | grep :6640

tcp        0      0     ESTABLISHED 27863/java     

tcp        0      0     ESTABLISHED 27863/java     


      Now controller thinks that there are multiple ovsdb connections from same client node (it does not know its client is a haproxy ).


      In ovsdb library there is a connection maintenance logic (StalePassiveConnectionService) which is supposed to the following ( correct my understanding ).


      Get existing connections from same client ip

      if there are none

               Process the new connection by handing off the connection object to ovsdb and hwvtep library.


               Send  echo on all the existing connections.

               If echo for any of them succeeds, do not process the fresh connection, keep it in pending list.


      But it was doing the opposite.


     In some of restart test cases we hit into the following bug.

      if the other connected devices respond back to echo within 10sec , new connection is processed.

      If any of the existing connected device is not responding back to echo within 10sec, new connection is not processed.


     In a haproxy deployments this check should be turned off.