[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-8306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14358947#comment-14358947
 ] 

Robert Strutts commented on CLOUDSTACK-8306:
--------------------------------------------

The Documentation did not say the size needs to be in Gigabytes and not 
Bytes!!! Sorry, this is not an issue.

> 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)

Reply via email to