From 3dee44518b96ed8412214151a1f6a74f8f6cfd07 Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Mon, 6 Apr 2020 19:16:51 -0400 Subject: [PATCH] tripleo_bootstrap: do not fail if OVS rpm wasn't found We have a use case where OVS rpm can be missing on very basic images,l ike overcloud-minimal. This image can be used by downstream for e.g. Ceph Storage nodes, where an OSP subscription wasn't used (OVS needs OSP). It was reported here: https://bugzilla.redhat.com/show_bug.cgi?id=1820306 This patch will look at eventual failures of the bootstrap packages task, and stop the deployment only if OVS failed to be found, otherwise the deployment will move on. Change-Id: Ib8dcc48c15b04b810b1cde350d5138671469977e (cherry picked from commit 17e413947697cc56356e1fbab3914587414131e8) --- tripleo_ansible/roles/tripleo-bootstrap/tasks/main.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tripleo_ansible/roles/tripleo-bootstrap/tasks/main.yml b/tripleo_ansible/roles/tripleo-bootstrap/tasks/main.yml index 431c7ff71..b9e56bdcc 100644 --- a/tripleo_ansible/roles/tripleo-bootstrap/tasks/main.yml +++ b/tripleo_ansible/roles/tripleo-bootstrap/tasks/main.yml @@ -37,6 +37,15 @@ package: name: "{{ tripleo_bootstrap_packages_bootstrap }}" state: present + # When a node is deployed with overcloud-minimal, OVS isn't required so let's + # ignore the case where the package can't be found (e.g. missing subscription). + # https://bugzilla.redhat.com/show_bug.cgi?id=1820306 + failed_when: + - (ansible_distribution | lower) == 'redhat' + - not ansible_check_mode|bool + - (tripleo_bootstrap_packages_bootstrap_result.rc | int) == 1 + - not ('No package openvswitch available.' in tripleo_bootstrap_packages_bootstrap_result.failures | default([])) + register: tripleo_bootstrap_packages_bootstrap_result - name: Create /var/lib/heat-config/tripleo-config-download directory for deployment data become: true