From b8c93b903eef4732e60627c018c70a4c7393977c Mon Sep 17 00:00:00 2001 From: Sorin Sbarnea Date: Thu, 21 Mar 2019 12:53:16 +0000 Subject: [PATCH] Improve tempest plugins installation Instead of ignoring installation failure, new code would fail if tempest plugins cannot be installed and also work if there are no plugins specified. Change-Id: Ic5ea1bf75cd30f8af6d9a3586a0073ff5c54cb27 Related-Bug: #1787912 --- roles/convert-image/templates/convert_image.sh.j2 | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/roles/convert-image/templates/convert_image.sh.j2 b/roles/convert-image/templates/convert_image.sh.j2 index d63ecfce5..7fe0a7d6a 100644 --- a/roles/convert-image/templates/convert_image.sh.j2 +++ b/roles/convert-image/templates/convert_image.sh.j2 @@ -22,12 +22,10 @@ fi {{ ansible_pkg_mgr }} remove -y {{ convert_image_remove_pkgs|join(" ") }} {{ ansible_pkg_mgr }} install -y {{ convert_image_install_pkgs|join(" ") }} -# NOTE(trown) Install tempest and test packages in a seperate yum transaction -# so that we do not fail the conversion if this install fails. There is a period -# after TripleO uploads a new image, but before the buildlogs repo gets synced, -# where this will fail because we try to install older test packages than the -# service packages already installed in the image. -{{ansible_pkg_mgr }} install -y {{ convert_image_tempest_plugins|join(" ") }} || /bin/true +{% if convert_image_tempest_plugins is defined and convert_image_tempest_plugins|length %} +{# keep plugins install isolated from previous yum install to ease debugging #} +{{ ansible_pkg_mgr }} install -y {{ convert_image_tempest_plugins|join(" ") }} +{% endif %} {% endif %}