cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] DaanHoogland commented on issue #2665: configdrive: run unit test only for Linux
Date Thu, 24 May 2018 07:41:12 GMT
DaanHoogland commented on issue #2665: configdrive: run unit test only for Linux
URL: https://github.com/apache/cloudstack/pull/2665#issuecomment-391619983
 
 
   as for running on macos, i think the following might do:
   ```
   diff --git a/engine/storage/configdrive/src/org/apache/cloudstack/storage/configdrive/ConfigDriveBuilder.java
b/engine/storage/configdrive/src/org/apache/cloudstack/storage/configdrive/ConfigDriveBuilder.java
   index d847aa1d1d..b975e12154 100644
   --- a/engine/storage/configdrive/src/org/apache/cloudstack/storage/configdrive/ConfigDriveBuilder.java
   +++ b/engine/storage/configdrive/src/org/apache/cloudstack/storage/configdrive/ConfigDriveBuilder.java
   @@ -136,7 +136,18 @@ public class ConfigDriveBuilder {
                }
   
                File tmpIsoStore = new File(tempDirName, new File(isoFileName).getName());
   -            Script command = new Script("/usr/bin/genisoimage", Duration.standardSeconds(300),
LOG);
   +            File isoCreator = new File("/usr/bin/genisoimage");
   +            if (!isoCreator.exists()) {
   +                isoCreator = new File("/usr/local/bin/mkisofs"); // are these all the
paths we search?
   +                if(!isoCreator.exists()) {
   +                    throw new CloudRuntimeException("cannot create iso for config drive
using any know tool.");
   +                }
   +            }
   +            if(!isoCreator.canExecute()) {
   +                throw new CloudRuntimeException("cannot create iso for config drive using
" + isoCreator.getCanonicalPath());
   +            }
   +
   +            Script command = new Script(isoCreator.getCanonicalPath(), Duration.standardSeconds(300),
LOG);
                command.add("-o", tmpIsoStore.getAbsolutePath());
                command.add("-ldots");
                command.add("-allow-lowercase");
   ```
   I'll test and add to this PR (or separately if we feel it needs to be.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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

Mime
View raw message