nvazquez commented on code in PR #11198:
URL: https://github.com/apache/cloudstack/pull/11198#discussion_r2210919646
##########
plugins/storage/image/default/src/main/java/org/apache/cloudstack/storage/datastore/driver/CloudStackImageStoreDriverImpl.java:
##########
@@ -74,7 +76,14 @@ private String createObjectNameForExtractUrl(String
installPath, ImageFormat for
}
if (format != null) {
- objectNameInUrl = objectNameInUrl + "." +
format.getFileExtension();
+ if (dataObject.getTO() != null
+ &&
DataObjectType.VOLUME.equals(dataObject.getTO().getObjectType())
+ &&
HypervisorType.KVM.equals(dataObject.getTO().getHypervisorType())) {
+ // Fix: The format of KVM volumes on image store is qcow2
+ objectNameInUrl = objectNameInUrl + "." +
ImageFormat.QCOW2.getFileExtension();
Review Comment:
Hi @weizhouapache, the fix looks good but was thinking that since the format
is passed from the format stored on the `volume_store_ref` table, could it be
simpler to fix that instead? (subject to testing)
--
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]