GabrielBrascher commented on a change in pull request #3681: Validate disk 
offering IOPS normal and maximum read/write values
URL: https://github.com/apache/cloudstack/pull/3681#discussion_r387029027
 
 

 ##########
 File path: 
server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java
 ##########
 @@ -400,6 +400,20 @@
     public static final ConfigKey<Boolean> SystemVMUseLocalStorage = new 
ConfigKey<Boolean>(Boolean.class, "system.vm.use.local.storage", "Advanced", 
"false",
             "Indicates whether to use local storage pools or shared storage 
pools for system VMs.", false, ConfigKey.Scope.Zone, null);
 
+    public final static ConfigKey<Long> BYTES_MAX_READ_LENGTH= new 
ConfigKey<Long>(Long.class, "vm.disk.bytes.maximum.read.length", "Advanced", 
"0",
 
 Review comment:
   @rhtyd sorry but I'm not sure if I understood your doubt. Do you think that 
those parameters could be placed in another class?
   
   This implementation covers a few validations before creating the disk 
offering; therefore I placed the validation code and parameters at this class, 
right before the execution of 
`com.cloud.configuration.ConfigurationManagerImpl.createDiskOffering(...)` [1].
   
   One of the validation avoids unrealistic burst length (e.g. hours of 
writing/reading burst). On the first proposal, I simply added a final static 
variable avoiding one hour of burst; however decided later with the help of 
reviewers to add parameters and leave it as configurable. Default values do not 
change the current behavior.
   
   
https://github.com/apache/cloudstack/blob/debe056beeff3aea67ab5c756158a60c25bced96/server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java#L3021

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to