weizhouapache commented on code in PR #11198:
URL: https://github.com/apache/cloudstack/pull/11198#discussion_r2213518844
##########
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:
Actually you give me a hint to check if the install_path in volume_store_ref
table is correct.
I suspect the install_path ends with .raw for volumes on ceph too. I do not
have a ceph environment to verify it for now.
Even if this PR fixes the suffix of download URL, the install_path needs to
be fixed as well (to .qcow2).
--
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]