From b106b567b5f0a638a5d2042f5a20a4dbcc649829 Mon Sep 17 00:00:00 2001 From: James Slagle Date: Mon, 14 Jul 2014 15:13:05 -0400 Subject: [PATCH] instack-prepare-for-overcloud should also download vmlinuz/initrd files if they exist --- scripts/instack-prepare-for-overcloud | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/instack-prepare-for-overcloud b/scripts/instack-prepare-for-overcloud index 7e5fded61..407566fd5 100755 --- a/scripts/instack-prepare-for-overcloud +++ b/scripts/instack-prepare-for-overcloud @@ -25,6 +25,16 @@ function download_image { if [ ! -f $image_name ]; then curl -L -O $IMG_SOURCE_URL/$image_name fi + + # Allow the download to fail, in case initrd/vmlinuz is not available, + # will fall back to old behavior of extraction via + # disk-image-get-kernel + for f in vmlinuz initrd; do + local file_name=$(basename -s .qcow2 $image_name).$f + if [ ! -f $file_name ]; then + curl -L -O $IMG_SOURCE_URL/$file_name || true + fi + done } function load_image {