mirror of https://github.com/apache/cloudstack.git
bug 13537: use --no-same-owner when we untar OVA file to work with NFSv4. Reviewed-By: Anthony
This commit is contained in:
parent
33d261c551
commit
72cc472222
|
|
@ -560,12 +560,15 @@ public class VmwareStorageManagerImpl implements VmwareStorageManager {
|
|||
}
|
||||
|
||||
// untar OVA file at template directory
|
||||
command = new Script("tar", 0, s_logger);
|
||||
command = new Script("tar", 0, s_logger);
|
||||
command.add("--no-same-owner");
|
||||
command.add("-xf", installFullName);
|
||||
command.setWorkDir(installFullPath);
|
||||
result = command.execute();
|
||||
s_logger.info("Executing command: " + command.toString());
|
||||
result = command.execute();
|
||||
if(result != null) {
|
||||
String msg = "unable to copy snapshot " + snapshotFullName + " to " + installFullPath;
|
||||
String msg = "unable to untar snapshot " + snapshotFullName + " to "
|
||||
+ installFullPath;
|
||||
s_logger.error(msg);
|
||||
throw new Exception(msg);
|
||||
}
|
||||
|
|
@ -643,8 +646,10 @@ public class VmwareStorageManagerImpl implements VmwareStorageManager {
|
|||
String srcFileName = getOVFFilePath(srcOVAFileName);
|
||||
if(srcFileName == null) {
|
||||
Script command = new Script("tar", 0, s_logger);
|
||||
command.add("--no-same-owner");
|
||||
command.add("-xf", srcOVAFileName);
|
||||
command.setWorkDir(secondaryMountPoint + "/" + secStorageDir);
|
||||
command.setWorkDir(secondaryMountPoint + "/" + secStorageDir);
|
||||
s_logger.info("Executing command: " + command.toString());
|
||||
String result = command.execute();
|
||||
if(result != null) {
|
||||
String msg = "Unable to unpack snapshot OVA file at: " + srcOVAFileName;
|
||||
|
|
|
|||
|
|
@ -63,7 +63,8 @@ public class VmdkProcessor implements Processor {
|
|||
String templateFileFullPath = templatePath + templateName + "." + ImageFormat.OVA.getFileExtension();
|
||||
File templateFile = new File(templateFileFullPath);
|
||||
|
||||
Script command = new Script("tar", 0, s_logger);
|
||||
Script command = new Script("tar", 0, s_logger);
|
||||
command.add("--no-same-owner", templateFileFullPath);
|
||||
command.add("-xf", templateFileFullPath);
|
||||
command.setWorkDir(templateFile.getParent());
|
||||
String result = command.execute();
|
||||
|
|
|
|||
Loading…
Reference in New Issue