Bug 8874 - Tunnel_ips of hardware_vtep is cleared when Open vSwitch process restarted... 33/61533/2
authorRyousuke Masuhara <r-masuhara@zn.nes.jp.nec.com>
Tue, 25 Jul 2017 05:06:39 +0000 (14:06 +0900)
committerAnil Vishnoi <vishnoianil@gmail.com>
Tue, 5 Sep 2017 19:40:19 +0000 (19:40 +0000)
Issue:
  Tunnel_ips of hardware_vtep is cleared when Open vSwitch process
  restarted in Open vSwitch HWVTEP Emulator

Cause of this issue:
  After Open vSwitch process restarted, ODL attempts to acquire tunnel_ips
  from CONFIGURATION MD-SAL and set it to Physical Switch.
  As tunnel_ips is not set from ODL but is set by vtep-ctl command, it
  does not exist in CONFIGURATION MD-SAL.
  This caused an empty value is set to tunnel_ips for Physical Switch.

Fix:
  Let ODL to acquire tunnel_ips from OPERATIONAL MD-SAL after
  VTEP Emulator restarted.

Change-Id: I439ba08c813ede02f82592ca0051b19140f40db2
Signed-off-by: Ryousuke Masuhara <r-masuhara@zn.nes.jp.nec.com>
hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/PhysicalSwitchUpdateCommand.java

index 5295914c6907d8c1783ef07e289fcbd543e9eaa9..27683a853f2c98b428d4f511ff6f17d8ce5d9000 100644 (file)
@@ -86,7 +86,7 @@ public class PhysicalSwitchUpdateCommand extends AbstractTransactCommand {
         PhysicalSwitch physicalSwitch = TyperUtils.getTypedRowWrapper(transaction.getDatabaseSchema(), PhysicalSwitch.class);
         setDescription(physicalSwitch, physicalSwitchAugmentation);
         setManagementIps(physicalSwitch, physicalSwitchAugmentation);
-        setTunnuleIps(physicalSwitch, physicalSwitchAugmentation);
+        setTunnuleIps(physicalSwitch, operationalPhysicalSwitchOptional.get());
         try {
             setTunnels(transaction, iid, physicalSwitch, physicalSwitchAugmentation,
                             operationalPhysicalSwitchOptional.isPresent());
@@ -335,4 +335,4 @@ public class PhysicalSwitchUpdateCommand extends AbstractTransactCommand {
         return result;
     }
 
-}
\ No newline at end of file
+}