winterhazel commented on code in PR #13578:
URL: https://github.com/apache/cloudstack/pull/13578#discussion_r3555038804


##########
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/service/StorageStrategy.java:
##########


Review Comment:
   A bit of a corner case, but does it make sense to change this to 
`availableBytes < size`? The way it is now, aggregates that have exactly the 
requested size are skipped.



##########
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/lifecycle/OntapPrimaryDatastoreLifecycle.java:
##########
@@ -337,9 +337,16 @@ public boolean attachZone(DataStore dataStore, ZoneScope 
scope, Hypervisor.Hyper
             logger.error("attachZone : Storage Pool not found for id: " + 
dataStore.getId());
             throw new CloudRuntimeException("Storage Pool not found for id: " 
+ dataStore.getId());
         }
+        if (!Hypervisor.HypervisorType.KVM.equals(hypervisorType)){
+            logger.error("attachZone : ONTAP primary storage is supported only 
for KVM hypervisor");
+            throw new CloudRuntimeException("ONTAP primary storage is 
supported only for KVM hypervisor");
+        }
+        storagePool.setHypervisor(hypervisorType);
+        storagePoolDao.update(storagePool.getId(),storagePool);
+        logger.debug("attachZone : Set Hypervisor type for storage pool {} to 
{}", storagePool.getName(), hypervisorType);

Review Comment:
   ```suggestion
   ```
   
   You can pass `hypervisorType` as a second parameter of 
`_dataStoreHelper.attachZone` at the end of this method.



##########
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/service/StorageStrategy.java:
##########
@@ -251,6 +263,7 @@ public Volume createStorageVolume(String volumeName, Long 
size) {
         volumeRequest.setAggregates(List.of(aggr));
         volumeRequest.setSize(size);
         volumeRequest.setNas(nas);
+        volumeRequest.setGuarantee(new 
Volume.Guarantee(Volume.Guarantee.TypeEnum.NONE));

Review Comment:
   Out of curiosity, is thick provisioning support planned for the future? 



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