Repository: cloudstack Updated Branches: refs/heads/4.4-forward 5e181acbd -> 822b38761
CLOUDSTACK-6595: allow to expunge the vm when its in Error state, in addition to Expunging/Destroyed states Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/822b3876 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/822b3876 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/822b3876 Branch: refs/heads/4.4-forward Commit: 822b38761f1655ef3d5d3648985a197f5c2c1262 Parents: 5e181ac Author: Alena Prokharchyk <alena.prokharc...@citrix.com> Authored: Mon Jul 14 14:02:41 2014 -0700 Committer: Alena Prokharchyk <alena.prokharc...@citrix.com> Committed: Wed Jul 16 13:41:32 2014 -0700 ---------------------------------------------------------------------- server/src/com/cloud/vm/UserVmManagerImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/822b3876/server/src/com/cloud/vm/UserVmManagerImpl.java ---------------------------------------------------------------------- diff --git a/server/src/com/cloud/vm/UserVmManagerImpl.java b/server/src/com/cloud/vm/UserVmManagerImpl.java index 425598c..4fdacd5 100755 --- a/server/src/com/cloud/vm/UserVmManagerImpl.java +++ b/server/src/com/cloud/vm/UserVmManagerImpl.java @@ -3673,7 +3673,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir return vm; } - if ((vm.getState() != State.Destroyed) && (vm.getState() != State.Expunging)) { + if (!(vm.getState() == State.Destroyed || vm.getState() == State.Expunging || vm.getState() == State.Error)) { CloudRuntimeException ex = new CloudRuntimeException("Please destroy vm with specified vmId before expunge"); ex.addProxyObject(String.valueOf(vmId), "vmId"); throw ex;