Remove any left-over tuskar packages on upgrade

During the instack install/upgrade undercloud run remove any
left over packages - see bug for more info. This cherrypick
is slightly different from ocata because here we don't have
the 'is upgrade' check/fact so we run the tuskar removal on
every instack run.

Closes-Bug: 1691744
Change-Id: I25dcdd82803f51db456213751849443715c8fe6f
(cherry picked from commit 7cbdf710a7)
This commit is contained in:
marios 2017-05-18 15:21:31 +03:00
parent b3a7d23bfe
commit a99caeb061
1 changed files with 13 additions and 0 deletions

View File

@ -1196,6 +1196,18 @@ def _post_config(instack_env):
_post_config_mistral(instack_env, mistral)
def _die_tuskar_die():
"""Remove tuskar* packages
Make sure to remove tuskar https://bugs.launchpad.net/tripleo/+bug/1691744
# openstack-[tuskar, tuskar-ui, tuskar-ui-extras] & python-tuskarclient
"""
try:
_run_command(['sudo', 'yum', 'remove', '-y', '*tuskar*'])
except subprocess.CalledProcessError as e:
LOG.error('Error with tuskar removal task %s - continuing', e.output)
def install(instack_root):
"""Install the undercloud
@ -1209,6 +1221,7 @@ def install(instack_root):
_validate_configuration()
instack_env = _generate_environment(instack_root)
_generate_init_data(instack_env)
_die_tuskar_die()
_run_yum_update(instack_env)
_run_instack(instack_env)
_run_orc(instack_env)