You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by ni...@apache.org on 2014/10/11 06:13:29 UTC

[43/50] [abbrv] git commit: IP allocation asynchronously in update containers.

IP allocation asynchronously in update containers.


Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/f8353a6f
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/f8353a6f
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/f8353a6f

Branch: refs/heads/master
Commit: f8353a6fb2e84acbc9c69ceaeb025fa00e3c512e
Parents: 848f23c
Author: Nirmal Fernando <ni...@gmail.com>
Authored: Fri Oct 10 20:33:42 2014 +0530
Committer: Nirmal Fernando <ni...@gmail.com>
Committed: Sat Oct 11 09:30:58 2014 +0530

----------------------------------------------------------------------
 .../controller/impl/CloudControllerServiceImpl.java     | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/f8353a6f/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/impl/CloudControllerServiceImpl.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/impl/CloudControllerServiceImpl.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/impl/CloudControllerServiceImpl.java
index 5acb86c..5194a76 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/impl/CloudControllerServiceImpl.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/impl/CloudControllerServiceImpl.java
@@ -1721,12 +1721,12 @@ public class CloudControllerServiceImpl implements CloudControllerService {
                             .getProperties(), StratosConstants.ALLOCATED_SERVICE_HOST_PORT,
                             ctxt.getProperties().getProperty(StratosConstants.ALLOCATED_SERVICE_HOST_PORT)));
                     
-                    dataHolder.addMemberContext(context);
-                    
-                    // trigger topology
-                    // update the topology with the newly spawned member
-                    TopologyBuilder.handleMemberSpawned(cartridgeType, clusterId, null,
-                            pod.getCurrentState().getPodIP(), pod.getCurrentState().getHostIP(), context);
+                    // wait till Pod status turns to running and send member spawned.
+                    ScheduledThreadExecutor exec = ScheduledThreadExecutor.getInstance();
+                    if (LOG.isDebugEnabled()) {
+                        LOG.debug("Cloud Controller is starting the instance start up thread.");
+                    }
+                    dataHolder.addScheduledFutureJob(context.getMemberId(), exec.schedule(new PodActivationWatcher(pod.getId(), context, kubApi), 5000));
                     
                     memberContexts.add(context);
                 }