The config now is loaded only from the coordinator. The previous way of loading
[controller.git] / opendaylight / switchmanager / implementation / src / main / java / org / opendaylight / controller / switchmanager / internal / SwitchManager.java
index b5d0a48c28709e575f13646971e00ab1ddbc3ea0..4b186fc4a1320b2e836236159a56deb575a96040 100644 (file)
@@ -175,16 +175,11 @@ public class SwitchManager implements ISwitchManager, IConfigurationContainerAwa
         retrieveCaches();
 
         /*
-         * Read startup and build database if we have not already gotten the
-         * configurations synced from another node
+         * Read startup and build database if we are the coordinator
          */
-        if (subnetsConfigList.isEmpty()) {
+        if ((clusterContainerService != null) && (clusterContainerService.amICoordinator())) {
             loadSubnetConfiguration();
-        }
-        if (spanConfigList.isEmpty()) {
             loadSpanConfiguration();
-        }
-        if (nodeConfigList.isEmpty()) {
             loadSwitchConfiguration();
         }