Repository: cloudstack Updated Branches: refs/heads/4.3 30ec59817 -> f75317b10
ensure agent reconciliation triggers events (cherry picked from commit 0ba75bcebde4e8a4773c7b31e5d8b88bf748a131) Signed-off-by: Rohit Yadav <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/f75317b1 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/f75317b1 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/f75317b1 Branch: refs/heads/4.3 Commit: f75317b10a25bd9e4ba0d65dac3d6d7d7b1d1336 Parents: 30ec598 Author: Pierre-Yves Ritschard <[email protected]> Authored: Mon Feb 16 17:30:51 2015 +0100 Committer: Rohit Yadav <[email protected]> Committed: Wed Feb 18 11:16:39 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/f75317b1/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 b88df22..ef67da4 100755 --- a/api/src/com/cloud/vm/VirtualMachine.java +++ b/api/src/com/cloud/vm/VirtualMachine.java @@ -137,7 +137,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;
