Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 2708D200D45 for ; Thu, 23 Nov 2017 10:18:18 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 25779160C14; Thu, 23 Nov 2017 09:18:18 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 701E3160C11 for ; Thu, 23 Nov 2017 10:18:17 +0100 (CET) Received: (qmail 75576 invoked by uid 500); 23 Nov 2017 09:18:16 -0000 Mailing-List: contact commits-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list commits@cloudstack.apache.org Received: (qmail 75565 invoked by uid 99); 23 Nov 2017 09:18:16 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Nov 2017 09:18:16 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id 612A28547D; Thu, 23 Nov 2017 09:18:15 +0000 (UTC) Date: Thu, 23 Nov 2017 09:18:17 +0000 To: "commits@cloudstack.apache.org" Subject: [cloudstack] 04/18: Accept DOS/MBR as file format for ISO images as well MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit From: bhaisaab@apache.org In-Reply-To: <151142869356.21189.7630195348661382013@gitbox.apache.org> References: <151142869356.21189.7630195348661382013@gitbox.apache.org> X-Git-Host: gitbox.apache.org X-Git-Repo: cloudstack X-Git-Refname: refs/heads/debian9-systemvmtemplate X-Git-Reftype: branch X-Git-Rev: ea8d313444762f79b1b379db57242b68ed844ce2 X-Git-NotificationType: diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated Message-Id: <20171123091815.612A28547D@gitbox.apache.org> archived-at: Thu, 23 Nov 2017 09:18:18 -0000 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 ea8d313444762f79b1b379db57242b68ed844ce2 Author: Wido den Hollander 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 --- .../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" .