Ensure failures on the undercloud leads to a complete stop

With tripleo_free strategy, we might hit situation where the undercloud
is unreachable for some reasons, preventing external tasks to happen on
the overcloud nodes.

This is especially true for older releases, such as train, where
mistral was still used in order to orchestrate the different playbooks
and runs.

Change-Id: I278fdc9597f83f1dc8390569be9716d3c8847dc4
Closes-Bug: #1960518
(cherry picked from commit 80b294ba88)
(cherry picked from commit 5565ecdf68)
(cherry picked from commit 33f1eecb68)
(cherry picked from commit 10b421198e)
This commit is contained in:
Cédric Jeanneret 2022-02-15 10:47:13 +01:00
parent 173edbafab
commit b5ef9a568e
2 changed files with 15 additions and 0 deletions

View File

@ -170,10 +170,17 @@ class TripleoInventory(object):
'ansible_connection': self.undercloud_connection,
# see https://github.com/ansible/ansible/issues/41808
'ansible_remote_tmp': '/tmp/ansible-${USER}',
# We don't want to let UC fail, especially when it comes to
# external tasks. Thus setting any_error_fatal and
# max_fail_percentage
# See https://bugs.launchpad.net/tripleo/+bug/1960518 for
# context
'any_error_fatal': True,
'auth_url': self.auth_url,
'cacert': self.cacert,
'os_auth_token':
self.session.get_token() if self.session else None,
'max_fail_percentage': 0,
'plan': None,
'project_name': self.project_name,
'username': self.username,

View File

@ -228,8 +228,10 @@ class TestInventory(base.TestCase):
'ansible_host': 'localhost',
'ansible_python_interpreter': sys.executable,
'ansible_remote_tmp': '/tmp/ansible-${USER}',
'any_error_fatal': True,
'auth_url': 'xyz://keystone.local',
'cacert': 'acacert',
'max_fail_percentage': 0,
'os_auth_token': 'atoken',
'overcloud_keystone_url': 'xyz://keystone',
'overcloud_admin_password': 'theadminpw',
@ -259,8 +261,10 @@ class TestInventory(base.TestCase):
'ansible_host': 'localhost',
'ansible_python_interpreter': sys.executable,
'ansible_remote_tmp': '/tmp/ansible-${USER}',
'any_error_fatal': True,
'auth_url': 'xyz://keystone.local',
'cacert': 'acacert',
'max_fail_percentage': 0,
'os_auth_token': 'atoken',
'project_name': 'admin',
'plan': None,
@ -377,8 +381,10 @@ class TestInventory(base.TestCase):
'ansible_host': 'localhost',
'ansible_python_interpreter': 'foo',
'ansible_remote_tmp': '/tmp/ansible-${USER}',
'any_error_fatal': True,
'auth_url': 'xyz://keystone.local',
'cacert': 'acacert',
'max_fail_percentage': 0,
'os_auth_token':
'atoken' if session else None,
'overcloud_keystone_url': 'xyz://keystone',
@ -505,8 +511,10 @@ class TestInventory(base.TestCase):
sys.executable,
'ansible_remote_tmp':
'/tmp/ansible-${USER}',
'any_error_fatal': True,
'auth_url': 'xyz://keystone.local',
'cacert': 'acacert',
'max_fail_percentage': 0,
'os_auth_token': 'atoken',
'overcloud_admin_password': 'theadminpw',
'overcloud_keystone_url': 'xyz://keystone',