From 29fb179262d88b875572b69f9798da3d794e7325 Mon Sep 17 00:00:00 2001 From: Jose Luis Franco Arza Date: Wed, 25 Apr 2018 15:34:08 +0200 Subject: [PATCH] Get rid of tasks in overcloud updates playbook. This patch removes all the tasks being executed inside the playbook used for running overcloud updates. Most of these removed tasks are being handled somewhere else (import triploe-upgrade [0], mainly) so we can simplify the playbook by calling the tripleo-upgrade role with the required parameters defined in each fs. This patch also gets rid of container_registry_file, which is being moved into the job's fs in [1]. [0] Icc84645a16aa53ca2cb974dbeb52e6474cd98aab [1] I27f13b164bb78619f8830b875ec9f04445ce1e26 Change-Id: Iec42b574d697f3acfd668636e3dd11217a3ea25e Related-Bug: #1749740 --- playbooks/multinode-overcloud-update.yml | 54 +++--------------------- 1 file changed, 7 insertions(+), 47 deletions(-) diff --git a/playbooks/multinode-overcloud-update.yml b/playbooks/multinode-overcloud-update.yml index 5c13b52da..17bfa894f 100644 --- a/playbooks/multinode-overcloud-update.yml +++ b/playbooks/multinode-overcloud-update.yml @@ -1,50 +1,10 @@ -# TODO: DRY update and upgrade prep code into update-upgrade-common.yaml -# https://bugs.launchpad.net/tripleo/+bug/1749740 -- name: Prepare tripleo-upgrade role +- name: Run tripleo-upgrade role to update the overcloud hosts: undercloud - gather_facts: no + gather_facts: yes tags: - overcloud-update - vars: - tripleo_upgrade_branch: "{{ 'stable/'+release if release!='master' else release }}" - tasks: - - name: Check if we have a local copy of the tripleo-upgrade role - stat: - path: /opt/stack/new/tripleo-upgrade - register: tripleo_upgrade_local_role - - - name: Set the pip URL when we have a local copy of the role - set_fact: - tripleo_upgrade_pip_url: "file:///opt/stack/new/tripleo-upgrade#egg=tripleo-upgrade" - when: tripleo_upgrade_local_role.stat.exists - - - name: Set the pip URL when we DO NOT have a local copy of the role - set_fact: - tripleo_upgrade_pip_url: "git+https://git.openstack.org/openstack/tripleo-upgrade.git@{{ tripleo_upgrade_branch }}#egg=tripleo-upgrade" - when: not tripleo_upgrade_local_role.stat.exists - - - name: Install tripleo-upgrade role "{{ tripleo_upgrade_branch }}" branch - pip: - name: "{{ tripleo_upgrade_pip_url }}" - executable: "{{ local_working_dir }}/bin/pip" - -- name: Update overcloud - hosts: undercloud - gather_facts: no - tags: - - overcloud-update - vars: - tripleo_upgrade_branch: "{{ 'stable/'+release if release!='master' else release }}" - # NOTE: right now the container images stay the same before and - # after update. This makes the job run fast while still testing - # the update workflow itself. For the future we may consider - # updating the container images too. (This might have to be paired - # with some work on the image building side to get meaningful - # from-to combination of images. - container_registry_file: containers-default-parameters.yaml - tasks: - - when: overcloud_update|default(false)|bool - block: - - name: Run update via tripleo-upgrade role - include_role: - name: tripleo-upgrade + roles: + - role: tripleo-upgrade + # TODO: Remove this once the fs containing the parameter is merged + container_registry_file: containers-default-parameters.yaml + when: overcloud_update|default(false)|bool