DaanHoogland commented on a change in pull request #4555:
URL: https://github.com/apache/cloudstack/pull/4555#discussion_r547358883



##########
File path: 
engine/storage/src/main/java/org/apache/cloudstack/storage/image/deployasis/DeployAsIsHelperImpl.java
##########
@@ -175,14 +168,27 @@ private void handleGuestOsFromOVFDescriptor(long 
templateId, String guestOsType,
 
         if (CollectionUtils.isNotEmpty(guestOsMappings)) {
             GuestOSHypervisorVO mapping = guestOsMappings.get(0);
-            long guestOsId = mapping.getGuestOsId();
-            LOGGER.info("Updating deploy-as-is template guest OS to " + 
guestOsType);
-            updateTemplateGuestOsId(template, guestOsId);
+            return mapping.getGuestOsId();
         } else {
             throw new CloudRuntimeException("Did not find a guest OS with type 
" + guestOsType);
         }
     }
 
+    /**
+     * Handle the guest OS read from the OVF and try to match it to an 
existing guest OS in DB.
+     * If the guest OS cannot be mapped to an existing guest OS in DB, then 
create it and create support for hypervisor versions.
+     * Roll back actions in case of unexpected erros

Review comment:
       very significant review comment:
   ```suggestion
        * Roll back actions in case of unexpected errors
   ```




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to