Surpress excess warning messages
Don't ask for role of NONE when a device is disconnected and role is
already NONE
Change-Id: Ib86335cc17847c820c33743897ae087765271be9
diff --git a/core/net/src/main/java/org/onosproject/net/device/impl/DeviceManager.java b/core/net/src/main/java/org/onosproject/net/device/impl/DeviceManager.java
index a86b50d..a3dbcad 100644
--- a/core/net/src/main/java/org/onosproject/net/device/impl/DeviceManager.java
+++ b/core/net/src/main/java/org/onosproject/net/device/impl/DeviceManager.java
@@ -766,7 +766,12 @@
final boolean isReachable = isReachable(did);
if (!isReachable) {
// device is not connected to this node
- if (myNextRole != NONE) {
+ if (mastershipService.getLocalRole(did) == NONE) {
+ log.debug("Node was instructed to be {} role for {}, "
+ + "but this node cannot reach the device "
+ + "and role is already None. Ignoring request.",
+ myNextRole, did);
+ } else if (myNextRole != NONE) {
log.warn("Node was instructed to be {} role for {}, "
+ "but this node cannot reach the device. "
+ "Relinquishing role. ",