From 725f91078e472bbce2a0c6c0f8a58cc878ec2bf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gon=C3=A9ri=20Le=20Bouder?= Date: Mon, 27 Apr 2015 11:59:23 +0200 Subject: [PATCH] force arch amd64 for EL7 elements rhel7 and centos7 images are both only available on x86_64 arch. if $ARCH is misconfigured, some strange error will happen during the build. For example, DIB will try to install EPEL i386 on the 64bit root system. For the record, tripleo-incubator $NODE_ARCH default value is i386. The problem will happend as soon as the default value is used with one of these root elements. This commit ensure the $ARCH is set to amd64 as soon as the centos7 or rhel7 root element are used. Change-Id: Ie41fa2da48eac6bf89b96cfa137c0f572dae6734 --- elements/centos7/root.d/10-centos7-cloud-image | 3 +++ elements/rhel7/root.d/10-rhel7-cloud-image | 3 +++ 2 files changed, 6 insertions(+) diff --git a/elements/centos7/root.d/10-centos7-cloud-image b/elements/centos7/root.d/10-centos7-cloud-image index 041b33210..57a8c8232 100755 --- a/elements/centos7/root.d/10-centos7-cloud-image +++ b/elements/centos7/root.d/10-centos7-cloud-image @@ -11,6 +11,9 @@ set -o pipefail if [ 'amd64' = "$ARCH" ] ; then ARCH="x86_64" +else + echo 'centos7 root element only support the amd64 $ARCH value.' + exit 1 fi DIB_LOCAL_IMAGE=${DIB_LOCAL_IMAGE:-} diff --git a/elements/rhel7/root.d/10-rhel7-cloud-image b/elements/rhel7/root.d/10-rhel7-cloud-image index e4fc11226..87c082ecd 100755 --- a/elements/rhel7/root.d/10-rhel7-cloud-image +++ b/elements/rhel7/root.d/10-rhel7-cloud-image @@ -11,6 +11,9 @@ set -o pipefail if [ 'amd64' = "$ARCH" ] ; then ARCH="x86_64" +else + echo 'rhel7 root element only support the amd64 $ARCH value.' + exit 1 fi DIB_LOCAL_IMAGE=${DIB_LOCAL_IMAGE:-""}