upgrade: move removal of services at step 3 (leftovers)

Move HAproxy, Ironic, Keystone, Zaqar and Mistral package removals at step 3
of upgrade process, required to have a successful containerized undercloud
upgrade.

Also add missing cleanup tasks for Keepalived.

This complete the work started by Ic14f7837d8d11fd5260ba7c5236018c9a6226e5e

Change-Id: I52c3aeb1a50ef0080b5411611e3f46941840f13b
This commit is contained in:
Emilien Macchi 2018-07-30 22:55:33 -04:00
parent 311c2de714
commit 908465c118
10 changed files with 31 additions and 0 deletions

View File

@ -279,6 +279,8 @@ outputs:
- name: Stop and disable haproxy service
when: haproxy_enabled|bool
service: name=haproxy state=stopped enabled=no
- when: step|int == 3
block:
- name: Set fact for removal of HAproxy package
set_fact:
remove_haproxy_package: {get_param: UpgradeRemoveUnusedPackages}

View File

@ -203,6 +203,8 @@ outputs:
- ironic_httpd_enabled|bool
- httpd_running|bool
service: name=httpd state=stopped enabled=no
- when: step|int == 3
block:
- name: Set fact for removal of openstack-ironic-api package
set_fact:
remove_ironic_api_package: {get_param: UpgradeRemoveUnusedPackages}

View File

@ -236,6 +236,8 @@ outputs:
- name: Stop and disable ironic_conductor service
when: ironic_conductor_enabled|bool
service: name=openstack-ironic-conductor state=stopped enabled=no
- when: step|int == 3
block:
- name: Set fact for removal of openstack-ironic-conductor package
set_fact:
remove_ironic_conductor_package: {get_param: UpgradeRemoveUnusedPackages}

View File

@ -36,6 +36,10 @@ 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:
@ -133,3 +137,12 @@ outputs:
- name: Stop and disable keepalived service
service: name=keepalived state=stopped enabled=no
when: keepalived_enabled|bool
- when: step|int == 3
block:
- name: Set fact for removal of Keepalived package
set_fact:
remove_keepalived_package: {get_param: UpgradeRemoveUnusedPackages}
- name: Remove Keepalived package if operator requests it
package: name=keepalived state=removed
ignore_errors: True
when: remove_keepalived_package|bool

View File

@ -259,6 +259,8 @@ outputs:
file:
path: /var/spool/cron/keystone
state: absent
- when: step|int == 3
block:
- name: Set fact for removal of openstack-keystone package
set_fact:
remove_keystone_package: {get_param: UpgradeRemoveUnusedPackages}

View File

@ -211,6 +211,8 @@ outputs:
when:
- mistral_httpd_enabled|bool
- httpd_running|bool
- when: step|int == 3
block:
- name: Set fact for removal of openstack-mistral-api package
set_fact:
remove_mistral_api_package: {get_param: UpgradeRemoveUnusedPackages}

View File

@ -146,6 +146,8 @@ outputs:
- name: Stop and disable mistral_engine service
when: mistral_engine_enabled|bool
service: name=openstack-mistral-engine state=stopped enabled=no
- when: step|int == 3
block:
- name: Set fact for removal of openstack-mistral-engine package
set_fact:
remove_mistral_engine_package: {get_param: UpgradeRemoveUnusedPackages}

View File

@ -146,6 +146,8 @@ outputs:
- name: Stop and disable mistral_event_engine service
when: mistral_event_engine_enabled|bool
service: name=openstack-mistral-event-engine state=stopped enabled=no
- when: step|int == 3
block:
- name: Set fact for removal of openstack-mistral-event-engine package
set_fact:
remove_mistral_event_engine_package: {get_param: UpgradeRemoveUnusedPackages}

View File

@ -162,6 +162,8 @@ outputs:
- name: Stop and disable mistral_executor service
when: mistral_executor_enabled|bool
service: name=openstack-mistral-executor state=stopped enabled=no
- when: step|int == 3
block:
- name: Set fact for removal of openstack-mistral-executor package
set_fact:
remove_mistral_executor_package: {get_param: UpgradeRemoveUnusedPackages}

View File

@ -229,6 +229,8 @@ outputs:
- zaqar_httpd_enabled|bool
- httpd_running|bool
service: name=httpd state=stopped enabled=no
- when: step|int == 3
block:
- name: Set fact for removal of openstack-zaqar package
set_fact:
remove_zaqar_package: {get_param: UpgradeRemoveUnusedPackages}