From 6d150b03cff457bf43e8c2b55ba03ace20d6c244 Mon Sep 17 00:00:00 2001 From: marios Date: Mon, 3 Jul 2017 19:20:30 +0300 Subject: Remove package if service stopped and disabled Adds a UpgradeRemoveUnusedPackages param to use in the ansible when conditional for the removal Adds package removal to step2 right after a service is stopped and disabled on step2. Package updates happen in step3 so ideally remove before that. The package removal task has ignore_errors true so dependencies or other issue removing packages will not fail the upgrade workflow. Also adds this to the upgrade environment files for visibility and defaulting false Change-Id: Ie4e4a2d41f7752c5a13507a7c15c6f68e203cfca Related-Bug: 1701501 (cherry picked from commit ce0ef2fa207698c1ae61c1620fe3c5e8d1c7bfca) --- docker/services/swift-storage.yaml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'docker/services/swift-storage.yaml') diff --git a/docker/services/swift-storage.yaml b/docker/services/swift-storage.yaml index 108a0368..e0c1194a 100644 --- a/docker/services/swift-storage.yaml +++ b/docker/services/swift-storage.yaml @@ -50,7 +50,10 @@ parameters: default: {} description: 'A hash of additional raw devices to use as Swift backend (eg. {sdb: {}})' type: json - + UpgradeRemoveUnusedPackages: + default: false + description: Remove package if the service is being disabled during upgrade + type: boolean resources: @@ -468,3 +471,12 @@ outputs: - openstack-swift-object-replicator - openstack-swift-object-updater - openstack-swift-object + - name: Remove openstack-swift-container,object,account packages if operator requests it + yum: name={{ item }} state=removed + tags: step2 + ignore_errors: True + when: {get_param: UpgradeRemoveUnusedPackages} + with_items: + - openstack-swift-container + - openstack-swift-object + - openstack-swift-account -- cgit 1.2.3-korg