cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sanjaytripa...@apache.org
Subject [1/2] git commit: updated refs/heads/4.5 to a53d39c
Date Tue, 04 Nov 2014 12:25:05 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/4.5 2d58bb625 -> a53d39c1b


CLOUDSTACK-7372: [vGPU] When a host is put in maintenance mode, vGPU enabled VMs
failed to migrate to the other host in the cluster.

Migration for vGPU VMs is not supported in XS, so instead of migrating them to
new server, stopping them.


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

Branch: refs/heads/4.5
Commit: 9168d826dad42b73f03aaa1170d5387f7c19b07d
Parents: 2d58bb6
Author: Sanjay Tripathi <sanjay.tripathi@citrix.com>
Authored: Mon Nov 3 13:09:53 2014 +0530
Committer: Sanjay Tripathi <sanjay.tripathi@citrix.com>
Committed: Tue Nov 4 17:28:22 2014 +0530

----------------------------------------------------------------------
 server/src/com/cloud/resource/ResourceManagerImpl.java | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9168d826/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 a0a3adf..fcc4ddb 100755
--- a/server/src/com/cloud/resource/ResourceManagerImpl.java
+++ b/server/src/com/cloud/resource/ResourceManagerImpl.java
@@ -99,6 +99,7 @@ import com.cloud.exception.DiscoveryException;
 import com.cloud.exception.InvalidParameterValueException;
 import com.cloud.exception.PermissionDeniedException;
 import com.cloud.exception.ResourceInUseException;
+import com.cloud.gpu.GPU;
 import com.cloud.gpu.HostGpuGroupsVO;
 import com.cloud.gpu.VGPUTypesVO;
 import com.cloud.gpu.dao.HostGpuGroupsDao;
@@ -125,6 +126,7 @@ import com.cloud.org.Grouping;
 import com.cloud.org.Grouping.AllocationState;
 import com.cloud.org.Managed;
 import com.cloud.serializer.GsonHelper;
+import com.cloud.service.dao.ServiceOfferingDetailsDao;
 import com.cloud.storage.GuestOSCategoryVO;
 import com.cloud.storage.StorageManager;
 import com.cloud.storage.StoragePool;
@@ -223,6 +225,8 @@ public class ResourceManagerImpl extends ManagerBase implements ResourceManager,
     PlannerHostReservationDao _plannerHostReserveDao;
     @Inject
     private DedicatedResourceDao _dedicatedDao;
+    @Inject
+    private ServiceOfferingDetailsDao _serviceOfferingDetailsDao;
 
     private List<? extends Discoverer> _discoverers;
 
@@ -1193,7 +1197,9 @@ public class ResourceManagerImpl extends ManagerBase implements ResourceManager,
 
             List<HostVO> hosts = listAllUpAndEnabledHosts(Host.Type.Routing, host.getClusterId(),
host.getPodId(), host.getDataCenterId());
             for (final VMInstanceVO vm : vms) {
-                if (hosts == null || hosts.isEmpty() || !answer.getMigrate()) {
+                if (hosts == null || hosts.isEmpty() || !answer.getMigrate()
+                        || _serviceOfferingDetailsDao.findDetail(vm.getServiceOfferingId(),
GPU.Keys.vgpuType.toString()) != null) {
+                    // Migration is not supported for VGPU Vms so stop them.
                     // for the last host in this cluster, stop all the VMs
                     _haMgr.scheduleStop(vm, hostId, WorkType.ForceStop);
                 } else if (HypervisorType.LXC.equals(host.getHypervisorType()) &&
VirtualMachine.Type.User.equals(vm.getType())){


Mime
View raw message