rp- commented on code in PR #8889:
URL: https://github.com/apache/cloudstack/pull/8889#discussion_r1622281080


##########
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java:
##########
@@ -266,10 +266,11 @@ public Answer copyTemplateToPrimaryStorage(final 
CopyCommand cmd) {
 
                 Map<String, String> details = primaryStore.getDetails();
 
-                String path = details != null ? 
details.get("managedStoreTarget") : null;
+                String path = derivePath(primaryStore, destData, details);
 
                 if 
(!storagePoolMgr.connectPhysicalDisk(primaryStore.getPoolType(), 
primaryStore.getUuid(), path, details)) {
                     s_logger.warn("Failed to connect physical disk at path: " 
+ path + ", in storage pool id: " + primaryStore.getUuid());
+                    return new PrimaryStorageDownloadAnswer("Failed to spool 
template disk at path: " + path + ", in storage pool id: " + 
primaryStore.getUuid());

Review Comment:
   I tested this branch now and this line breaks the Linstor driver on a fresh 
installation.
   
   AFAIK: on the first template (systemtemplate) copy ACS doesn't provide a 
size for the destination template and
   so Linstor ignores the copy request and also the agent issues a 
`.connectPhysicalDisk()` with `null` as volumePath and the LinstorAdaptor 
ignores this. 
   Later ACS does the correct thing and copies the template from the image 
store to the Linstor primary storage.
   
   BUT this Failure answer breaks this code.



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