sureshanaparti commented on a change in pull request #5801:
URL: https://github.com/apache/cloudstack/pull/5801#discussion_r774387931



##########
File path: 
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java
##########
@@ -1463,7 +1463,7 @@ public Answer createVolume(final CreateObjectCommand cmd) 
{
             primaryPool = 
storagePoolMgr.getStoragePool(primaryStore.getPoolType(), 
primaryStore.getUuid());
             disksize = volume.getSize();
             PhysicalDiskFormat format;
-            if (volume.getFormat() == null) {
+            if (volume.getFormat() == null || 
StoragePoolType.RBD.equals(primaryStore.getPoolType())) {

Review comment:
       @slavkap this might be applicable to volumes on other storage pools as 
well, as the format depends on the underlying pool. I think, it is better to 
set the right volume format based on the primary storage in the volume 
orchestrator, instead of overriding here based on the pool type when the format 
is null. (or) update the correct format in the the primary storage driver while 
creating volume.
   
   




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