From 683feac160782744fd852053a5adde19fd992a3d Mon Sep 17 00:00:00 2001 From: Dmitry Tantsur Date: Mon, 20 Jan 2020 12:37:41 +0100 Subject: [PATCH] Fix and return the CentOS 7 job This job is used on stable branches and is currently broken. This change introduces a workaround for older DIB and re-enables the job. Change-Id: I100576c639649a69a8e95463ca87bedda4bbadc3 --- .zuul.yaml | 2 ++ roles/ipa-build-dib-image/tasks/install.yaml | 11 +++++++++++ 2 files changed, 13 insertions(+) diff --git a/.zuul.yaml b/.zuul.yaml index 3151e9d..457b9d3 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -127,6 +127,8 @@ - ipa-tempest-wholedisk-bios-ipmi-iscsi-tinyipa-src - ironic-python-agent-check-image-tinyipa - ironic-python-agent-check-image-dib-centos8 + - ironic-python-agent-check-image-dib-centos7: + voting: false - ironic-python-agent-check-image-dib-fedora: voting: false - ironic-python-agent-check-image-dib-ubuntu: diff --git a/roles/ipa-build-dib-image/tasks/install.yaml b/roles/ipa-build-dib-image/tasks/install.yaml index d842bdf..8d7d9ce 100644 --- a/roles/ipa-build-dib-image/tasks/install.yaml +++ b/roles/ipa-build-dib-image/tasks/install.yaml @@ -25,3 +25,14 @@ name: "{{ ansible_user_dir }}/{{ zuul.projects['opendev.org/openstack/diskimage-builder'].src_dir }}" become: true when: dib_from_source + +# NOTE(dtantsur): work around the issue in older DIB versions when some +# elements try to use the default Python instead of the one DIB is using, +# failing with "No module named yaml" +- name: Install PyYAML in Python 2 + pip: + name: PyYAML + extra_args: -c "{{ ansible_user_dir }}/{{ zuul.projects['opendev.org/openstack/requirements'].src_dir }}/upper-constraints.txt" + executable: pip2 + become: true + ignore_errors: true