cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg38 <...@git.apache.org>
Subject [GitHub] cloudstack pull request #1813: CLOUDSTACK-9604: Root disk resize support for...
Date Wed, 01 Mar 2017 16:04:04 GMT
Github user serg38 commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1813#discussion_r103719599
  
    --- Diff: server/src/com/cloud/vm/UserVmManagerImpl.java ---
    @@ -3614,6 +3604,26 @@ public UserVmVO doInTransaction(TransactionStatus status) throws
InsufficientCap
             });
         }
     
    +    public void validateRootDiskResize(final HypervisorType hypervisorType, Long rootDiskSize,
VMTemplateVO templateVO, UserVmVO vm, final Map<String, String> customParameters) throws
InvalidParameterValueException
    +    {
    +        // rootdisksize must be larger than template.
    +        if ((rootDiskSize << 30) < templateVO.getSize()) {
    +            Long templateVOSizeGB = templateVO.getSize() / 1024 / 1024 / 1024;
    +            s_logger.error("unsupported: rootdisksize override is smaller than template
size " + templateVO.getSize() + "B (" + templateVOSizeGB + "GB)");
    +            throw new InvalidParameterValueException("unsupported: rootdisksize override
is smaller than template size " + templateVO.getSize() + "B (" + templateVOSizeGB + "GB)");
    +        } else if ((rootDiskSize << 30) > templateVO.getSize()){
    +            if (hypervisorType == HypervisorType.VMware && !vm.getDetails().get("rootDiskController").toLowerCase().contains("scsi"))
{
    +                s_logger.error("Found unsupported root disk controller : " + vm.getDetails().get("rootDiskController"));
    --- End diff --
    
    I think NPE on line 3615 is due to rootdiskcontroller might be not set for VM. If template
is imported without explicitly specifying root disk controller than a global setting will
be in effect.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message