You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bh...@apache.org on 2017/08/19 21:19:44 UTC
[cloudstack] 04/07: Accept DOS/MBR as file format for ISO images as
well
This is an automated email from the ASF dual-hosted git repository.
bhaisaab pushed a commit to branch debian9-systemvmtemplate
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
commit 319247d110c12f572263e3e50f64e558a6616368
Author: Wido den Hollander <wi...@widodh.nl>
AuthorDate: Thu Aug 10 14:57:40 2017 +0200
Accept DOS/MBR as file format for ISO images as well
Under Debian 7 the 'file' command would return:
debian-9.1.0-amd64-netinst.iso: ISO 9660 CD-ROM filesystem data UDF filesystem data
Under Debian 9 however it will return
debian-9.1.0-amd64-netinst.iso: DOS/MBR boot sector
This would make the HTTPTemplateDownloader in the Secondary Storage VM refuse the ISO as
a valid template because it's not a correct format.
Changes this behavior so that it accepts both.
This allows us to use Debian 9 as a System VM template.
Signed-off-by: Wido den Hollander <wi...@widodh.nl>
---
.../java/org/apache/cloudstack/utils/imagestore/ImageStoreUtil.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/utils/src/main/java/org/apache/cloudstack/utils/imagestore/ImageStoreUtil.java b/utils/src/main/java/org/apache/cloudstack/utils/imagestore/ImageStoreUtil.java
index ed13360..e754a8e 100644
--- a/utils/src/main/java/org/apache/cloudstack/utils/imagestore/ImageStoreUtil.java
+++ b/utils/src/main/java/org/apache/cloudstack/utils/imagestore/ImageStoreUtil.java
@@ -81,7 +81,7 @@ public class ImageStoreUtil {
return "";
}
- if (output.contains("ISO 9660") && isCorrectExtension(uripath, "iso")) {
+ if ((output.startsWith("ISO 9660") || output.startsWith("DOS/MBR")) && isCorrectExtension(uripath, "iso")) {
s_logger.debug("File at path " + path + " looks like an iso : " + output);
return "";
}
--
To stop receiving notification emails like this one, please contact
"commits@cloudstack.apache.org" <co...@cloudstack.apache.org>.