setting isClusterCreated to true if there is atleast one member in the ropoloy when restarting stratos
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/cd2bf530 Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/cd2bf530 Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/cd2bf530 Branch: refs/heads/master Commit: cd2bf5307bf0c58ff7f80fe4b43023106395a830 Parents: 5a928c9 Author: R-Rajkumar <[email protected]> Authored: Sat Oct 11 23:23:57 2014 +0530 Committer: R-Rajkumar <[email protected]> Committed: Sat Oct 11 23:23:57 2014 +0530 ---------------------------------------------------------------------- .../stratos/autoscaler/monitor/ClusterMonitorFactory.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/stratos/blob/cd2bf530/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/ClusterMonitorFactory.java ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/ClusterMonitorFactory.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/ClusterMonitorFactory.java index 8514aed..9724690 100644 --- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/ClusterMonitorFactory.java +++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/ClusterMonitorFactory.java @@ -384,7 +384,11 @@ public class ClusterMonitorFactory { MemberContext memberContext = new MemberContext(); memberContext.setMemberId(memberId); memberContext.setClusterId(clusterId); - + + // if there is at least one member in the topology, that means service has been created already + // this is to avoid calling startContainer() method again + kubernetesClusterCtxt.setServiceClusterCreated(true); + if (MemberStatus.Activated.equals(member.getStatus())) { dockerClusterMonitor.getKubernetesClusterCtxt().addActiveMember(memberContext); } else if (MemberStatus.Created.equals(member.getStatus())
