cloudstack-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Strutts (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (CLOUDSTACK-8306) Unable to set rootdisksize via API
Date Thu, 12 Mar 2015 16:44:39 GMT

     [ https://issues.apache.org/jira/browse/CLOUDSTACK-8306?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Robert Strutts closed CLOUDSTACK-8306.
--------------------------------------
    Resolution: Not a Problem

rootdisksize is in Gigabytes not bytes

> Unable to set rootdisksize via API
> ----------------------------------
>
>                 Key: CLOUDSTACK-8306
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8306
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the default.) 
>          Components: API
>    Affects Versions: 4.4.2
>         Environment: all
>            Reporter: Robert Strutts
>              Labels: patch
>
> See the source file: server/src/com/cloud/vm/UserVmManagerImpl.java
> The code on line #3080, does an un-needed bit shift, resulting in the vaule of zero to
be assigned before it compares rootDiskSize to the template size...: 
> # This patch file was generated by NetBeans IDE
> # It uses platform neutral UTF-8 encoding and \n newlines.
> --- HEAD
> +++ Modified In Working Tree
> @@ -3077,10 +3077,10 @@
>                          throw new InvalidParameterValueException("Unable to look up
template by id " + template.getId());
>                      }
>  
> -                    if ((rootDiskSize << 30) < templateVO.getSize()) {
> +                    if (rootDiskSize < templateVO.getSize()) {
>                          throw new InvalidParameterValueException("unsupported: rootdisksize
override is smaller than template size " + templateVO.getSize());
>                      } else {
> -                        s_logger.debug("rootdisksize of " + (rootDiskSize << 30)
+ " was larger than template size of " + templateVO.getSize());
> +                        s_logger.debug("rootdisksize of " + rootDiskSize + " was larger
than template size of " + templateVO.getSize());
>                      }
>  
>                      s_logger.debug("found root disk size of " + rootDiskSize);



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message