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 ce0ef2fa20)
This commit is contained in:
@@ -36,6 +36,11 @@ parameters:
|
||||
default: {}
|
||||
description: Parameters specific to the role
|
||||
type: json
|
||||
UpgradeRemoveUnusedPackages:
|
||||
default: false
|
||||
description: Remove package if the service is being disabled during upgrade
|
||||
type: boolean
|
||||
|
||||
resources:
|
||||
|
||||
ContainersCommon:
|
||||
@@ -126,3 +131,8 @@ outputs:
|
||||
- name: Stop and disable ceilometer agent central service
|
||||
tags: step2
|
||||
service: name=openstack-ceilometer-central state=stopped enabled=no
|
||||
- name: Remove openstack-ceilometer-central package if operator requests it
|
||||
yum: name=openstack-ceilometer-central state=removed
|
||||
tags: step2
|
||||
ignore_errors: True
|
||||
when: {get_param: UpgradeRemoveUnusedPackages}
|
||||
|
||||
Reference in New Issue
Block a user