You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by la...@apache.org on 2014/12/05 06:50:01 UTC

stratos git commit: Fixing state query at terminating event

Repository: stratos
Updated Branches:
  refs/heads/master e65dd4cad -> 4a187d12d


Fixing state query at terminating event


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

Branch: refs/heads/master
Commit: 4a187d12dc54590d7f8d0ad484fa3fc24465f9c9
Parents: e65dd4c
Author: Lahiru Sandaruwan <la...@apache.org>
Authored: Fri Dec 5 11:21:44 2014 +0530
Committer: Lahiru Sandaruwan <la...@apache.org>
Committed: Fri Dec 5 11:21:44 2014 +0530

----------------------------------------------------------------------
 .../event/receiver/topology/AutoscalerTopologyEventReceiver.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/4a187d12/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/event/receiver/topology/AutoscalerTopologyEventReceiver.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/event/receiver/topology/AutoscalerTopologyEventReceiver.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/event/receiver/topology/AutoscalerTopologyEventReceiver.java
index 870f632..abc829c 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/event/receiver/topology/AutoscalerTopologyEventReceiver.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/event/receiver/topology/AutoscalerTopologyEventReceiver.java
@@ -255,7 +255,7 @@ public class AutoscalerTopologyEventReceiver {
                 }
                 //changing the status in the monitor, will notify its parent monitor
                 ClusterInstance clusterInstance = (ClusterInstance) monitor.getInstance(instanceId);
-                if (clusterInstance.getPreviousState() == ClusterStatus.Active) {
+                if (clusterInstance.getCurrentState() == ClusterStatus.Active) {
                     // terminated gracefully
                     monitor.setStatus(ClusterStatus.Terminating, instanceId);
                     InstanceNotificationPublisher.sendInstanceCleanupEventForCluster(clusterId, instanceId);