You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bh...@apache.org on 2015/02/18 06:45:49 UTC
git commit: updated refs/heads/master to 1dc0611
Repository: cloudstack
Updated Branches:
refs/heads/master 9bf2626e5 -> 1dc0611bc
ensure agent reconciliation triggers events
(cherry picked from commit 0ba75bcebde4e8a4773c7b31e5d8b88bf748a131)
Signed-off-by: Rohit Yadav <ro...@shapeblue.com>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/1dc0611b
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/1dc0611b
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/1dc0611b
Branch: refs/heads/master
Commit: 1dc0611bcd356afdb8339777ba2d44e61d44af67
Parents: 9bf2626
Author: Pierre-Yves Ritschard <py...@spootnik.org>
Authored: Mon Feb 16 17:30:51 2015 +0100
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Wed Feb 18 11:15:44 2015 +0530
----------------------------------------------------------------------
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/1dc0611b/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 2a6039f..b45ac7c 100644
--- a/api/src/com/cloud/vm/VirtualMachine.java
+++ b/api/src/com/cloud/vm/VirtualMachine.java
@@ -145,7 +145,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;