thierry-martinez opened a new issue, #6774:
URL: https://github.com/apache/cloudstack/issues/6774

   <!--
   Verify first that your issue/request is not already reported on GitHub.
   Also test if the latest release and main branch are affected too.
   Always add information AFTER of these HTML comments, but no need to delete 
the comments.
   -->
   
   ##### ISSUE TYPE
   <!-- Pick one below and delete the rest -->
    * Bug Report
   
   ##### COMPONENT NAME
   server
   
   ##### CLOUDSTACK VERSION
   
   All versions
   
   ##### CONFIGURATION
   N/A
   
   
   ##### OS / ENVIRONMENT
   N/A
   
   
   ##### SUMMARY
   The maximum size for custom disk offering is checked for disk creation but 
not for resizing.
   Users cannot create volumes larger than `CustomDiskOfferingMaxSize` but can 
resize their volumes afterwards to larger sizes up to the allowed quota.
   
   In the code, `CustomDiskOfferingMaxSize` is checked in 
[`allocVolume`](https://github.com/apache/cloudstack/blob/8ab8fdc1db4fed4d906c69618980fda9ef710e6a/server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java#L718)
 but not in 
[`resizeVolume`](https://github.com/apache/cloudstack/blob/8ab8fdc1db4fed4d906c69618980fda9ef710e6a/server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java#L1020).
   
   
   ##### STEPS TO REPRODUCE
   - Make sure that there is a custom disk offering
   - Try to create a volume with a custom disk offering and a size larger than 
`CustomDiskOfferingMaxSize` but lower than other quotas.
   - Try to resize a volume with a custom disk offering and a size larger than 
`CustomDiskOfferingMaxSize` but lower than other quotas.
   
   <!-- Paste example playbooks or commands between quotes below -->
   ~~~
   
   ~~~
   
   <!-- You can also paste gist.github.com links for larger files -->
   
   ##### EXPECTED RESULTS
   Both creation and resizing should fail.
   
   ~~~
   
   ~~~
   
   ##### ACTUAL RESULTS
   Disk creation fails but resizing succeeds.
   
   <!-- Paste verbatim command output between quotes below -->
   ~~~
   
   ~~~
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to