You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by re...@apache.org on 2014/12/18 18:42:19 UTC

[3/3] stratos git commit: fixing undeployment flow after the refactoring of application deployment

fixing undeployment flow after the refactoring of application deployment


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

Branch: refs/heads/master
Commit: ff9379f66cd5c66dfa3bcba42df4c949407f2883
Parents: 4e0d793
Author: reka <rt...@gmail.com>
Authored: Thu Dec 18 23:11:53 2014 +0530
Committer: reka <rt...@gmail.com>
Committed: Thu Dec 18 23:11:53 2014 +0530

----------------------------------------------------------------------
 .../stratos/autoscaler/applications/topic/ApplicationBuilder.java | 2 ++
 .../apache/stratos/autoscaler/monitor/component/GroupMonitor.java | 3 +--
 2 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/ff9379f6/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/topic/ApplicationBuilder.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/topic/ApplicationBuilder.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/topic/ApplicationBuilder.java
index 8e45985..a07f5c6 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/topic/ApplicationBuilder.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/topic/ApplicationBuilder.java
@@ -284,6 +284,8 @@ public class ApplicationBuilder {
 
                 }
                 ApplicationsEventPublisher.sendApplicationInstanceTerminatedEvent(appId, instanceId);
+                //removing the clusters and persisted application
+                handleApplicationRemoval(appId);
             } else {
                 log.warn(String.format("Application state transition is not valid: [application-id] %s " +
                                 " [current-status] %s [status-requested] %s", appId,

http://git-wip-us.apache.org/repos/asf/stratos/blob/ff9379f6/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/component/GroupMonitor.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/component/GroupMonitor.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/component/GroupMonitor.java
index 97af0b0..668aac4 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/component/GroupMonitor.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/component/GroupMonitor.java
@@ -186,10 +186,9 @@ public class GroupMonitor extends ParentComponentMonitor {
                     // as it has group scaling enabled.
                     Group group = application.getGroupRecursively(this.id);
                     if (group != null) {
-                        GroupInstance context = group.getInstanceContexts(instanceId);
                         // notify parent
                         log.info("[Group] " + this.id + "is notifying the [parent] " + this.parent.getId() +
-                                " [instance] " + context.getParentId());
+                                " [instance] " + parentInstanceId);
                         MonitorStatusEventBuilder.handleGroupStatusEvent(this.parent,
                                 status, this.id, parentInstanceId);
                     }