X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fswitchmanager%2Fimplementation%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fswitchmanager%2Finternal%2FSwitchManager.java;h=d8e6a7412f1d6e75fd9a0c1ba9a5b5bbbe2135ca;hp=4b186fc4a1320b2e836236159a56deb575a96040;hb=9f822b0960eb0cf92966ca3df666b714158e3ab2;hpb=5dd78e29d5b7fb6e32ad12d10e83d7941b31f4dd diff --git a/opendaylight/switchmanager/implementation/src/main/java/org/opendaylight/controller/switchmanager/internal/SwitchManager.java b/opendaylight/switchmanager/implementation/src/main/java/org/opendaylight/controller/switchmanager/internal/SwitchManager.java index 4b186fc4a1..d8e6a7412f 100644 --- a/opendaylight/switchmanager/implementation/src/main/java/org/opendaylight/controller/switchmanager/internal/SwitchManager.java +++ b/opendaylight/switchmanager/implementation/src/main/java/org/opendaylight/controller/switchmanager/internal/SwitchManager.java @@ -237,7 +237,7 @@ public class SwitchManager implements ISwitchManager, IConfigurationContainerAwa @SuppressWarnings({ "unchecked" }) private void retrieveCaches() { if (this.clusterContainerService == null) { - log.info("un-initialized clusterContainerService, can't create cache"); + log.warn("un-initialized clusterContainerService, can't create cache"); return; } @@ -789,7 +789,7 @@ public class SwitchManager implements ISwitchManager, IConfigurationContainerAwa return; } - log.info("Set Node {}'s Mode to {}", nodeId, cfgObject.getMode()); + log.trace("Set Node {}'s Mode to {}", nodeId, cfgObject.getMode()); if (modeChange) { notifyModeChange(node, cfgObject.isProactive()); @@ -1103,8 +1103,7 @@ public class SwitchManager implements ISwitchManager, IConfigurationContainerAwa private void updateNode(Node node, Set props) { log.trace("{} updated, props: {}", node, props); - if (nodeProps == null || !nodeProps.containsKey(node) || - props == null || props.isEmpty()) { + if (nodeProps == null || props == null) { return; } @@ -1305,10 +1304,6 @@ public class SwitchManager implements ISwitchManager, IConfigurationContainerAwa if (nodeProps.replace(node, propMapCurr, propMap)) { return; } - if (!propMapCurr.get(prop.getName()).equals(nodeProps.get(node).get(prop.getName()))) { - log.debug("Cluster conflict: Unable to add property {} to node {}.", prop.getName(), node.getID()); - return; - } } log.warn("Cluster conflict: Unable to add property {} to node {}.", prop.getName(), node.getID()); } @@ -1326,12 +1321,6 @@ public class SwitchManager implements ISwitchManager, IConfigurationContainerAwa if (nodeProps.replace(node, propMapCurr, propMap)) { return new Status(StatusCode.SUCCESS); } - if (!propMapCurr.get(propName).equals(nodeProps.get(node).get(propName))) { - String msg = "Cluster conflict: Unable to remove property " + propName + " for node " - + node.getID(); - return new Status(StatusCode.CONFLICT, msg); - } - } else { return new Status(StatusCode.SUCCESS); } @@ -1447,7 +1436,10 @@ public class SwitchManager implements ISwitchManager, IConfigurationContainerAwa if (macAddress == null) { log.warn("Failed to acquire controller MAC: No physical interface found"); // This happens when running controller on windows VM, for example - // Try parsing the OS command output + // TODO: Try parsing the OS command output + // For now provide a quick fix for the release + macAddress = new byte[] { (byte) 0x00, (byte) 0x00, (byte) 0x0c, (byte) 0x60, (byte) 0x0D, (byte) 0x10 }; + log.debug("Assigning custom MAC address to controller"); } return macAddress; }