Repository: cloudstack
Updated Branches:
  refs/heads/4.4 fbb637791 -> 65172e3b9


ensure agent reconciliation triggers events


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

Branch: refs/heads/4.4
Commit: 0ba75bcebde4e8a4773c7b31e5d8b88bf748a131
Parents: a8273c0
Author: Pierre-Yves Ritschard <[email protected]>
Authored: Mon Feb 16 17:30:51 2015 +0100
Committer: Loic Lambiel <[email protected]>
Committed: Tue Feb 17 16:33:57 2015 +0100

----------------------------------------------------------------------
 api/src/com/cloud/vm/VirtualMachine.java | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0ba75bce/api/src/com/cloud/vm/VirtualMachine.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/vm/VirtualMachine.java 
b/api/src/com/cloud/vm/VirtualMachine.java
index 34387eb..c65e14d 100755
--- a/api/src/com/cloud/vm/VirtualMachine.java
+++ b/api/src/com/cloud/vm/VirtualMachine.java
@@ -142,7 +142,10 @@ public interface VirtualMachine extends RunningOn, 
ControlledEntity, Identity, I
         }
 
         public static boolean isVmStopped(State oldState, Event e, State 
newState) {
-            if (oldState == State.Stopping && newState == State.Stopped) {
+            if ((oldState == State.Stopping && newState == State.Stopped) ||
+                (oldState == State.Running &&
+                 newState == State.Stopped &&
+                 e == Event.FollowAgentPowerOffReport)) {
                 return true;
             }
             return false;

Reply via email to