From e84051e5b28684c1b983196ffb0c6aca1edd29d2 Mon Sep 17 00:00:00 2001 From: stephane Date: Wed, 15 Jun 2016 16:47:56 -0700 Subject: [PATCH] Restore diskimage-builder install In the change I0fc25c64339bc4c1f03ccb35cbc4efad4a7ad966, we lost the ability to install diskimage-builder if not present. Add this back if we're using dib to build IPA. Change-Id: Ic4e59f6ad18af44cec33b770d1df91f5e9eade12 Closes-Bug: 1593005 --- devstack/lib/ironic | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/devstack/lib/ironic b/devstack/lib/ironic index 2682d2bf8f..fdf83fe6b7 100644 --- a/devstack/lib/ironic +++ b/devstack/lib/ironic @@ -1054,6 +1054,12 @@ function build_ipa_dib_ramdisk { local ramdisk_path=$2 local tempdir tempdir=$(mktemp -d --tmpdir=${DEST}) + + # install diskimage-builder if not present + if ! $(type -P disk-image-create > /dev/null); then + install_diskimage_builder + fi + echo "Building IPA ramdisk with DIB options: $IRONIC_DIB_RAMDISK_OPTIONS" disk-image-create "$IRONIC_DIB_RAMDISK_OPTIONS" \ -o "$tempdir/ironic-agent" \