[VOL-5577]:do no tear down the routes when peer port is not found
Change-Id: I0d2a1ec4739f3f768265d0416d7de92098b9b599
Signed-off-by: balaji.nagarajan <balaji.nagarajan@radisys.com>
diff --git a/VERSION b/VERSION
index c77a7de..f06fb9e 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-3.7.9
+3.7.10
diff --git a/rw_core/core/device/manager.go b/rw_core/core/device/manager.go
index d5657eb..1394a56 100755
--- a/rw_core/core/device/manager.go
+++ b/rw_core/core/device/manager.go
@@ -172,7 +172,7 @@
return agent.(*Agent)
}
// TODO: Change the return params to return an error as well
- logger.Errorw(ctx, "loading-device-failed", log.Fields{"device-id": deviceID, "error": err})
+
return nil
}
diff --git a/rw_core/route/device_route.go b/rw_core/route/device_route.go
index d773649..7df2ec7 100644
--- a/rw_core/route/device_route.go
+++ b/rw_core/route/device_route.go
@@ -184,11 +184,13 @@
childDeviceID := rootDevicePeer.DeviceId
childDevicePorts, err := dr.getDeviceWithCacheUpdate(ctx, rootDevicePeer.DeviceId)
if err != nil {
- return err
+ logger.Warnw(ctx, "child-device-ports-not-found", log.Fields{"device-id": rootDevicePeer.DeviceId, "rootDevicePort": rootDevicePort.PortNo, "rootPortPeer": rootDevicePeer.PortNo})
+ continue
}
childPonPort, err := dr.getChildPonPort(ctx, childDeviceID)
if err != nil {
- return err
+ logger.Warnw(ctx, "child-pon-port-not-found", log.Fields{"device-id": childDeviceID, "rootDevicePort": rootDevicePort.PortNo, "rootPortPeer": rootDevicePeer.PortNo})
+ continue
}
for _, childDevicePort := range childDevicePorts {
if childDevicePort.Type == voltha.Port_ETHERNET_UNI {
@@ -418,7 +420,6 @@
func (dr *DeviceRoutes) getDeviceWithCacheUpdate(ctx context.Context, deviceID string) (map[uint32]*voltha.Port, error) {
devicePorts, err := dr.listDevicePorts(ctx, deviceID)
if err != nil {
- logger.Errorw(ctx, "device-not-found", log.Fields{"device-id": deviceID, "error": err})
return nil, err
}
dr.updateCache(deviceID, devicePorts)