[VOL-5570]:Open ONU Adapter Resilency failing for BBSIM

Change-Id: I5f5cb8c16a12001e4dd74a69b0add53d0b07e8e5
Signed-off-by: balaji.nagarajan <balaji.nagarajan@radisys.com>
diff --git a/VERSION b/VERSION
index 36f601f..9a4c437 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-3.7.16
+3.7.17
diff --git a/rw_core/core/device/agent.go b/rw_core/core/device/agent.go
index a150097..7692dd2 100755
--- a/rw_core/core/device/agent.go
+++ b/rw_core/core/device/agent.go
@@ -810,7 +810,7 @@
 					"device-type":      agent.deviceType,
 					"adapter-endpoint": device.AdapterEndpoint,
 				})
-			return err
+			return status.Errorf(codes.Internal, "error-getting-grpc-client-for-adapter: %s", err)
 		}
 		// Use the incoming context deadline if it's longer than the configured rpcTimeout,
 		// otherwise use rpcTimeout. This allows clients to specify longer timeouts for
diff --git a/rw_core/core/device/agent_flow.go b/rw_core/core/device/agent_flow.go
index 0a323f3..30ff187 100644
--- a/rw_core/core/device/agent_flow.go
+++ b/rw_core/core/device/agent_flow.go
@@ -409,7 +409,7 @@
 
 // deleteAllFlows deletes all flows in the device table
 func (agent *Agent) deleteAllFlows(ctx context.Context) error {
-	logger.Debugw(ctx, "deleteAllFlows", log.Fields{"device-id": agent.deviceID})
+	logger.Infow(ctx, "deleteAllFlows", log.Fields{"device-id": agent.deviceID})
 
 	var err error
 	var errFlows string
diff --git a/rw_core/core/device/manager_nbi.go b/rw_core/core/device/manager_nbi.go
index 44b1f4f..660f6e6 100644
--- a/rw_core/core/device/manager_nbi.go
+++ b/rw_core/core/device/manager_nbi.go
@@ -141,6 +141,9 @@
 				logger.Errorw(ctx, "Unexpected error", log.Fields{"device-id": id.Id, "Error": err})
 				return nil, err
 			}
+		} else {
+			logger.Errorw(ctx, "Failed to delete device due to an unknown error", log.Fields{"device-id": id.Id, "Error": err})
+			return nil, err
 		}
 
 	}
diff --git a/rw_core/core/device/manager_state_callback.go b/rw_core/core/device/manager_state_callback.go
index 1cb69f2..a909d3a 100644
--- a/rw_core/core/device/manager_state_callback.go
+++ b/rw_core/core/device/manager_state_callback.go
@@ -55,7 +55,7 @@
 
 // DeleteLogicalPorts removes the logical ports associated with that deviceId
 func (dMgr *Manager) DeleteLogicalPorts(ctx context.Context, cDevice *voltha.Device) error {
-	logger.Debugw(ctx, "delete-all-logical-ports", log.Fields{"device-id": cDevice.Id})
+	logger.Infow(ctx, "delete-all-logical-ports", log.Fields{"device-id": cDevice.Id})
 	if err := dMgr.logicalDeviceMgr.deleteLogicalPorts(ctx, cDevice.Id); err != nil {
 		// Just log the error.   The logical device or port may already have been deleted before this callback is invoked.
 		logger.Warnw(ctx, "delete-logical-ports-error", log.Fields{"device-id": cDevice.Id, "error": err})
diff --git a/rw_core/core/device/state/transitions.go b/rw_core/core/device/state/transitions.go
index 74538ec..49c8cbc 100644
--- a/rw_core/core/device/state/transitions.go
+++ b/rw_core/core/device/state/transitions.go
@@ -220,7 +220,7 @@
 			deviceType:    child,
 			previousState: deviceState{Admin: voltha.AdminState_UNKNOWN, Connection: voltha.ConnectStatus_UNKNOWN, Operational: voltha.OperStatus_UNKNOWN, Transient: core.DeviceTransientState_ANY},
 			currentState:  deviceState{Admin: voltha.AdminState_UNKNOWN, Connection: voltha.ConnectStatus_UNKNOWN, Operational: voltha.OperStatus_UNKNOWN, Transient: core.DeviceTransientState_DELETING_POST_ADAPTER_RESPONSE},
-			handlers:      []transitionHandler{dMgr.DeleteAllDeviceFlows, dMgr.ChildDeviceLost, dMgr.DeleteLogicalPorts, dMgr.RunPostDeviceDelete}})
+			handlers:      []transitionHandler{dMgr.DeleteAllDeviceFlows, dMgr.DeleteLogicalPorts, dMgr.ChildDeviceLost, dMgr.RunPostDeviceDelete}})
 	transitionMap.transitions = append(transitionMap.transitions,
 		transition{ // DELETE wait for adapter response(no operation)
 			deviceType:    child,