On container removal, remove startup files from the cluster 31/2231/2
authorAlessandro Boch <aboch@cisco.com>
Mon, 28 Oct 2013 20:45:38 +0000 (13:45 -0700)
committerGerrit Code Review <gerrit@opendaylight.org>
Tue, 29 Oct 2013 21:58:44 +0000 (21:58 +0000)
- Currently they are only removed on the local cluster node

Change-Id: I731ca66f41946a623711a434f8580ed16b4f9fc6
Signed-off-by: Alessandro Boch <aboch@cisco.com>
opendaylight/containermanager/implementation/src/main/java/org/opendaylight/controller/containermanager/internal/ContainerManager.java

index 3da7ec8b9f26fb2d7a7630b8d9e7f7e523cebf1e..7319d5a15d360ed7d5f834c8144bd35f562d9691 100644 (file)
@@ -1016,6 +1016,19 @@ public class ContainerManager extends Authorization<String> implements IContaine
         notifyContainerModeChange(delete, notifyLocal);
         // Notify listeners
         notifyContainerAwareListeners(container, delete);
+
+        /*
+         * This is a quick fix until configuration service becomes the
+         * centralized configuration management place. Here container manager
+         * will remove the startup files for all the bundles that are present in
+         * the container being deleted. Do the cleanup here in Container manger
+         * as do not want to put this temporary code in Configuration manager
+         * yet which is ODL.
+         */
+        if (delete) {
+            // TODO: remove when Config Mgr takes over
+            removeComponentsStartUpfiles(containerName);
+        }
     }
 
     private void notifyContainerEntryChangeInternal(String containerName, List<NodeConnector> ncList, UpdateType update, boolean notifyLocal) {
@@ -1191,19 +1204,6 @@ public class ContainerManager extends Authorization<String> implements IContaine
             return status;
         }
 
-        /*
-         * This is a quick fix until configuration service becomes the
-         * centralized configuration management place. Here container manager will
-         * remove the startup files for all the bundles that are present in the
-         * container being deleted. Do the cleanup here in Container manger as do not
-         * want to put this temporary code in Configuration manager yet which is
-         * ODL.
-         */
-        if (delete) {
-            // TODO: remove when Config Mgr takes over
-            removeComponentsStartUpfiles(containerName);
-        }
-
         /*
          * Update Configuration: This will trigger the notifications on cache
          * update callback locally and on the other cluster nodes