[
https://issues.apache.org/jira/browse/CLOUDSTACK-8894?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15134264#comment-15134264
]
ASF GitHub Bot commented on CLOUDSTACK-8894:
--------------------------------------------
Github user pedro-martins commented on a diff in the pull request:
https://github.com/apache/cloudstack/pull/868#discussion_r52022212
--- Diff: server/src/com/cloud/vm/UserVmManagerImpl.java ---
@@ -1535,6 +1535,19 @@ private boolean upgradeRunningVirtualMachine(Long
vmId, Long newServiceOfferingI
+ ",memory=," + currentMemory + ")");
}
+ _offeringDao.loadDetails(currentServiceOffering);
+ _offeringDao.loadDetails(newServiceOffering);
+
+ Map<String, String> currentDetails =
currentServiceOffering.getDetails();
+ Map<String, String> newDetails = newServiceOffering.getDetails();
+ String currentVgpuType = currentDetails.get("vgpuType");
+ String newVgpuType = newDetails.get("vgpuType");
+ if(currentVgpuType != null) {
+ if(newVgpuType == null ||
!newVgpuType.equalsIgnoreCase(currentVgpuType)) {
+ throw new InvalidParameterValueException("Dynamic scaling
of vGPU type is not supported. VM has vGPU Type: " + currentVgpuType);
+ }
+ }
+
// Check resource limits
--- End diff --
Hi @anshul1886,
Could you extract the codes between lines 1541 - 1549 to a method with an
auto described name, do some test cases to this new method and create a Javadoc
explaining what the method do, what params it receive, the exceptions it throws
and what can cause the exception?
Ty.
> Dynamic scaling is not restricted when destination offering has changes in
> the vGPU type
> ----------------------------------------------------------------------------------------
>
> Key: CLOUDSTACK-8894
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8894
> Project: CloudStack
> Issue Type: Bug
> Security Level: Public(Anyone can view this level - this is the
> default.)
> Reporter: Anshul Gangwar
> Assignee: Anshul Gangwar
>
> Steps:
> 1.Install and configure XenServer 6.5 with vGPU enabled . Enabled dynamic
> scaliing
> 2. Deploy VM using K160Q type windows 7 template with PV tools installaed and
> dynamic scaling enabled
> 3. Tried dynamic scaling with offering which has K180Q defined.
> Observation:
> 1. Currently vGPU resource dynamic scaling is not supported. But CloudStack
> returns success and updating the VM details with new offering details
> including new vGPU type.
> 2. But from Xenserver , There is no change with vGPU type and it remains with
> old vGPU type. This is not correct
> Expected Result:
> Dynamic scaling should be restricted when source/destination offering has
> vGPU type on a vGPU enabled VM
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)