From b75796900441bd0a24e60bcc982c890897027b56 Mon Sep 17 00:00:00 2001 From: Daniel Bengtsson Date: Fri, 13 Dec 2019 16:28:47 +0100 Subject: [PATCH] Run update without yum update to apply hotfixes. Add a new option to skip the yum update of all packages. Change-Id: Idd22c7b4403bb63c06d2ba714d851a976e830108 (cherry picked from commit da3bf441aa49608698a4eb6c64793d8689e52a48) --- puppet/services/tripleo-packages.yaml | 31 ++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/puppet/services/tripleo-packages.yaml b/puppet/services/tripleo-packages.yaml index e2ea7f1657..76578ad8a1 100644 --- a/puppet/services/tripleo-packages.yaml +++ b/puppet/services/tripleo-packages.yaml @@ -65,6 +65,11 @@ parameters: major-upgrade-composable-steps.yaml and major-upgrade-converge.yaml environment files. default: '' + SkipPackageUpdate: + default: 'false' + description: Set to true to skip the update all packages + type: boolean + outputs: role_data: @@ -278,9 +283,17 @@ outputs: when: - step|int == 3 - is_hosting_ceph_osd.rc != 0 - - name: Update all but Ceph packages - when: step|int == 3 - yum: name=* state=latest exclude=ceph*,librados*,librbd*,libcephfs*,librgw*,python-rados*,python-rbd*,python-cephfs*,python-rgw*,rbd-mirror + - name: Set boolean skip_package_update + set_fact: + skip_package_update: {get_param: SkipPackageUpdate} + - name: Update all packages + when: + - step|int == 3 + - not skip_package_update|bool + yum: + name: '*' + state: latest + exclude: ceph*,librados*,librbd*,libcephfs*,librgw*,python-rados*,python-rbd*,python-cephfs*,python-rgw*,rbd-mirror update_tasks: # With the layered product packaging, the key package is rhosp-openvswitch. It depends on # a openvswitch package that includes the version as part of the name (e.g openvswitch2.10). @@ -389,9 +402,17 @@ outputs: when: - step|int == 3 - is_hosting_ceph_osd.rc != 0 + - name: Set boolean skip_package_update + set_fact: + skip_package_update: {get_param: SkipPackageUpdate} - name: Update all packages - yum: name=* state=latest update_cache=yes - when: step == "3" + when: + - step|int == 3 + - not skip_package_update|bool + yum: + name: '*' + state: latest + update_cache: yes # This is failsafe unless openvswitch package does something to the systemd service state. - name: Ensure openvswitch is running after update when: step|int == 3