rg9975 commented on PR #7889:
URL: https://github.com/apache/cloudstack/pull/7889#issuecomment-2854986853

   I'm unsure why you would be seeing that.  The driver reads the capacityBytes 
from the provided inputs and, if its set, will attempt to use either 
capacityBytes OR the value capacityInBytes from the array's Statistics object, 
whichever is larger.  When it is not set, it will attempt to get the 
capacityInBytes from the array (if set) and use it or log the exception you are 
seeing.  You perhaps can try using a CMK command to see if there is something 
happening between the UI and API when providing the inputs?  you may also be 
able to set the capacityInBytes on the array (assuming the version of the Web 
Service API your using supports that).  We have only tested on the HPE Web 
Service v1.10+.
   
   ```
               ProviderVolumeStorageStats stats = api.getManagedStorageStats();
               if (capacityBytes != null && capacityBytes != 0 && stats != 
null) {
                   if (stats.getCapacityInBytes() > 0) {
                       if (stats.getCapacityInBytes() < capacityBytes) {
                           throw new InvalidParameterValueException("Capacity 
bytes provided exceeds the capacity of the storage endpoint: provided by user: 
" + capacityBytes + ", storage capacity from storage provider: " + 
stats.getCapacityInBytes());
                       }
                   }
                   parameters.setCapacityBytes(capacityBytes);
               }
               // if we have no user-provided capacity bytes, use the ones 
provided by storage
               else {
                   if (stats == null || stats.getCapacityInBytes() <= 0) {
                       throw new InvalidParameterValueException("Capacity bytes 
not available from the storage provider, user provided capacity bytes must be 
specified");
                   }
                   parameters.setCapacityBytes(stats.getCapacityInBytes());
               }
   ```


-- 
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: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to