You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ki...@apache.org on 2014/09/08 14:43:56 UTC
git commit: updated refs/heads/master to c773754
Repository: cloudstack
Updated Branches:
refs/heads/master 40a537fed -> c773754fd
CLOUDSTACK-7504,CLOUDSTACK-7507: For LXC host maintenance, migrate system Vms and schedule restart of users Vms
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/c773754f
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/c773754f
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/c773754f
Branch: refs/heads/master
Commit: c773754fdacb4f3ce47e08d6d2f4e62d5db780f3
Parents: 40a537f
Author: Kishan Kavala <ki...@apache.org>
Authored: Mon Sep 8 18:04:32 2014 +0530
Committer: Kishan Kavala <ki...@apache.org>
Committed: Mon Sep 8 18:13:11 2014 +0530
----------------------------------------------------------------------
server/src/com/cloud/resource/ResourceManagerImpl.java | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c773754f/server/src/com/cloud/resource/ResourceManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/resource/ResourceManagerImpl.java b/server/src/com/cloud/resource/ResourceManagerImpl.java
index 242063e..477b08f 100755
--- a/server/src/com/cloud/resource/ResourceManagerImpl.java
+++ b/server/src/com/cloud/resource/ResourceManagerImpl.java
@@ -30,6 +30,7 @@ import javax.ejb.Local;
import javax.inject.Inject;
import javax.naming.ConfigurationException;
+import com.cloud.vm.VirtualMachine;
import org.apache.cloudstack.api.ApiConstants;
import org.apache.cloudstack.api.command.admin.cluster.AddClusterCmd;
import org.apache.cloudstack.api.command.admin.cluster.DeleteClusterCmd;
@@ -1195,9 +1196,9 @@ public class ResourceManagerImpl extends ManagerBase implements ResourceManager,
if (hosts == null || hosts.isEmpty() || !answer.getMigrate()) {
// for the last host in this cluster, stop all the VMs
_haMgr.scheduleStop(vm, hostId, WorkType.ForceStop);
- } else if (HypervisorType.LXC.equals(host.getHypervisorType())){
- //Stop LXC Vms. LXC doesn't support migration
- _haMgr.scheduleStop(vm, hostId, WorkType.Stop);
+ } else if (HypervisorType.LXC.equals(host.getHypervisorType()) && VirtualMachine.Type.User.equals(vm.getType())){
+ //Migration is not supported for LXC Vms. Schedule restart instead.
+ _haMgr.scheduleRestart(vm, false);
} else {
_haMgr.scheduleMigration(vm);
}