Fix: Datapathfailure observed for unknown tunnels 17/88217/4
authorApurba Mukherjee <apurba.mukherjee@ericsson.com>
Tue, 3 Mar 2020 11:16:23 +0000 (16:46 +0530)
committerHema Gopalakrishnan <hema.gopalkrishnan@ericsson.com>
Mon, 3 Aug 2020 17:07:49 +0000 (17:07 +0000)
Alarm was getting raised even when the tunnel state was unknown. Hence
the condition is changed to explicitly check if the tunnel state is
down.

Change-Id: Ia58d52c1994cfe8b943b906e93c61505f5904c95
Signed-off-by: Apurba Mukherjee <apurba.mukherjee@ericsson.com>
itm/itm-impl/src/main/java/org/opendaylight/genius/itm/monitoring/ItmTunnelEventListener.java

index a807b0f44cf10c36ceb2ba5bcceba28f64ef5714..6f05736317d129a44da3d436f836481914ff6933 100644 (file)
@@ -221,7 +221,7 @@ public class ItmTunnelEventListener extends AbstractSyncDataTreeChangeListener<S
                 Uint64 srcDpId = internalTunnel.getSourceDPN();
                 Uint64 dstDpId = internalTunnel.getDestinationDPN();
                 String tunnelType = ItmUtils.convertTunnelTypetoString(internalTunnel.getTransportType());
-                if (!isTunnelInterfaceUp(add)) {
+                if (add.getOperState() == TunnelOperStatus.Down) {
                     LOG.trace("ITM Tunnel State during tep add is DOWN b/w srcDpn: {} and dstDpn: {} for tunnelType: "
                                       + "{}", srcDpId, dstDpId, tunnelType);
                     String alarmText = getInternalAlarmText(srcDpId.toString(), dstDpId.toString(), tunnelType);
@@ -239,7 +239,7 @@ public class ItmTunnelEventListener extends AbstractSyncDataTreeChangeListener<S
                         dstNode = "openflow:" + externalTunnel.getDestinationDevice();
                     }
                     String tunnelType = ItmUtils.convertTunnelTypetoString(externalTunnel.getTransportType());
-                    if (!isTunnelInterfaceUp(add)) {
+                    if (add.getOperState() == TunnelOperStatus.Down) {
                         LOG.trace("ITM Tunnel State during tep add is DOWN b/w srcNode: {} and dstNode: {} for "
                                           + "tunnelType: {}", srcNode, dstNode, tunnelType);
                         String alarmText = getExternalAlarmText(srcNode, dstNode, tunnelType);