You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2019/12/09 13:23:36 UTC

[GitHub] [cloudstack] DaanHoogland commented on a change in pull request #3748: Systemvm template api (WIP)

DaanHoogland commented on a change in pull request #3748: Systemvm template api (WIP)
URL: https://github.com/apache/cloudstack/pull/3748#discussion_r355444209
 
 

 ##########
 File path: server/src/main/java/com/cloud/template/TemplateManagerImpl.java
 ##########
 @@ -2312,32 +2312,29 @@ public SeedSystemVMTemplateResponse seedSystemVMTemplate(HashSet<String> imageSt
 
             startInstallTemplate(template.getId(), cmd.getId());
             // Decompress file
-            decompressFile(inputFile, "/tmp/" + template.getUuid() + "." + fileExtension);
+            boolean decompressed = decompressFile(inputFile, "/tmp/" + template.getUuid() + "." + fileExtension);
+            if (decompressed) {
+                inputFile = "/tmp/" + template.getUuid() + "." + fileExtension;
+            }
 
-            String finalDestination = mountPoint + "/template/tmpl/1/" + template.getId() + "/"+ template.getUuid() + "." + fileExtension;
+            String finalDestination = mountPoint + "/template/tmpl/2/" + template.getId() + "/"+ template.getUuid() + "." + fileExtension;
 
 Review comment:
   I would use a getUserId() kind of mech here, as admin may not be the only on with ROOTadmin rights.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services