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 17e4139476)
This commit is contained in:
Emilien Macchi 2020-04-06 19:16:51 -04:00
parent 943fadb5c8
commit 3dee44518b

View File

@ -37,6 +37,15 @@
package: package:
name: "{{ tripleo_bootstrap_packages_bootstrap }}" name: "{{ tripleo_bootstrap_packages_bootstrap }}"
state: present 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 - name: Create /var/lib/heat-config/tripleo-config-download directory for deployment data
become: true become: true