Merge "Fixing a bug to show node name if present instead of node id while adding...
authorAndrew Kim <andrekim@cisco.com>
Mon, 26 Aug 2013 17:11:15 +0000 (17:11 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Mon, 26 Aug 2013 17:11:15 +0000 (17:11 +0000)
opendaylight/connectionmanager/implementation/src/main/java/org/opendaylight/controller/connectionmanager/scheme/AbstractScheme.java

index d93f74b..d7c4e5f 100644 (file)
@@ -237,13 +237,12 @@ public abstract class AbstractScheme {
                  * with this controller to take hold of a Node.
                  */
                 if (isConnectionAllowed(node)) {
-                    if (!nodeConnections.replace(node, oldControllers, newControllers)) {
+                    if (oldControllers == null || !nodeConnections.replace(node, oldControllers, newControllers)) {
                         clusterServices.trollback();
                         try {
                             Thread.sleep(100);
                         } catch ( InterruptedException e) {}
-                        log.debug("Replace failed... old={} with new={} for {} to {}", oldControllers.toString(), newControllers.toString(),
-                                controller.getHostAddress(), node.toString());
+                        log.debug("Retrying ... {} with {}", controller.getHostAddress(), node.toString());
                         return putNodeToController(node, controller);
                     } else {
                         log.debug("Replace successful old={} with new={} for {} to {}", oldControllers.toString(), newControllers.toString(),