undercloud: add missing services for upgrade cleanup
Add cleanup tasks for Ironic, Keystone Mistral and Zaqar, so when upgrading an undercloud to be containerized, an operator can also cleanup these services rpms. Depends-On: I2af99d8bad58f12bd895b473ecb84e4f2091f738 Change-Id: I7e257cece9fa3bdd9f2d1be08ccdf5c681213149
This commit is contained in:
parent
979437aa89
commit
fcc225159a
@ -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:
|
||||
|
||||
@ -199,6 +203,13 @@ outputs:
|
||||
- ironic_httpd_enabled|bool
|
||||
- httpd_running|bool
|
||||
service: name=httpd state=stopped enabled=no
|
||||
- name: Set fact for removal of openstack-ironic-api package
|
||||
set_fact:
|
||||
remove_ironic_api_package: {get_param: UpgradeRemoveUnusedPackages}
|
||||
- name: Remove openstack-ironic-api package if operator requests it
|
||||
yum: name=openstack-ironic-api state=removed
|
||||
ignore_errors: True
|
||||
when: remove_ironic_api_package|bool
|
||||
fast_forward_upgrade_tasks:
|
||||
- block:
|
||||
- name: Check if ironic_api is deployed
|
||||
|
@ -41,6 +41,10 @@ parameters:
|
||||
description: Whether to configure Swift temporary URLs for use with
|
||||
the "direct" and "ansible" deploy interfaces.
|
||||
type: boolean
|
||||
UpgradeRemoveUnusedPackages:
|
||||
default: false
|
||||
description: Remove package if the service is being disabled during upgrade
|
||||
type: boolean
|
||||
|
||||
conditions:
|
||||
configure_swift_temp_url: {equals: [{get_param: IronicConfigureSwiftTempUrlKey}, true]}
|
||||
@ -232,6 +236,13 @@ outputs:
|
||||
- name: Stop and disable ironic_conductor service
|
||||
when: ironic_conductor_enabled|bool
|
||||
service: name=openstack-ironic-conductor state=stopped enabled=no
|
||||
- name: Set fact for removal of openstack-ironic-conductor package
|
||||
set_fact:
|
||||
remove_ironic_conductor_package: {get_param: UpgradeRemoveUnusedPackages}
|
||||
- name: Remove openstack-ironic-conductor package if operator requests it
|
||||
yum: name=openstack-ironic-conductor state=removed
|
||||
ignore_errors: True
|
||||
when: remove_ironic_conductor_package|bool
|
||||
fast_forward_upgrade_tasks:
|
||||
- block:
|
||||
- name: Check if ironic_conductor is deployed
|
||||
|
@ -40,6 +40,10 @@ parameters:
|
||||
default: []
|
||||
description: IPA image URLs, the format should be ["http://path/to/kernel", "http://path/to/ramdisk"]
|
||||
type: json
|
||||
UpgradeRemoveUnusedPackages:
|
||||
default: false
|
||||
description: Remove package if the service is being disabled during upgrade
|
||||
type: boolean
|
||||
|
||||
resources:
|
||||
|
||||
@ -245,3 +249,10 @@ outputs:
|
||||
- name: Stop and disable ironic_inspector dnsmasq service
|
||||
service: name=openstack-ironic-inspector-dnsmasq state=stopped enabled=no
|
||||
when: ironic_inspector_enabled|bool
|
||||
- name: Set fact for removal of openstack-ironic-inspector package
|
||||
set_fact:
|
||||
remove_ironic_inspector_package: {get_param: UpgradeRemoveUnusedPackages}
|
||||
- name: Remove openstack-ironic-inspector package if operator requests it
|
||||
yum: name=openstack-ironic-inspector state=removed
|
||||
ignore_errors: True
|
||||
when: remove_ironic_inspector_package|bool
|
||||
|
@ -54,6 +54,10 @@ parameters:
|
||||
EnableInternalTLS:
|
||||
type: boolean
|
||||
default: false
|
||||
UpgradeRemoveUnusedPackages:
|
||||
default: false
|
||||
description: Remove package if the service is being disabled during upgrade
|
||||
type: boolean
|
||||
|
||||
resources:
|
||||
|
||||
@ -255,6 +259,13 @@ outputs:
|
||||
file:
|
||||
path: /var/spool/cron/keystone
|
||||
state: absent
|
||||
- name: Set fact for removal of openstack-keystone package
|
||||
set_fact:
|
||||
remove_keystone_package: {get_param: UpgradeRemoveUnusedPackages}
|
||||
- name: Remove openstack-keystone package if operator requests it
|
||||
yum: name=openstack-keystone state=removed
|
||||
ignore_errors: True
|
||||
when: remove_keystone_package|bool
|
||||
metadata_settings:
|
||||
get_attr: [KeystoneBase, role_data, metadata_settings]
|
||||
fast_forward_upgrade_tasks:
|
||||
|
@ -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:
|
||||
|
||||
@ -207,3 +211,10 @@ outputs:
|
||||
when:
|
||||
- mistral_httpd_enabled|bool
|
||||
- httpd_running|bool
|
||||
- name: Set fact for removal of openstack-mistral-api package
|
||||
set_fact:
|
||||
remove_mistral_api_package: {get_param: UpgradeRemoveUnusedPackages}
|
||||
- name: Remove openstack-mistral-api package if operator requests it
|
||||
yum: name=openstack-mistral-api state=removed
|
||||
ignore_errors: True
|
||||
when: remove_mistral_api_package|bool
|
||||
|
@ -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:
|
||||
@ -140,3 +144,10 @@ outputs:
|
||||
- name: Stop and disable mistral_engine service
|
||||
when: mistral_engine_enabled|bool
|
||||
service: name=openstack-mistral-engine state=stopped enabled=no
|
||||
- name: Set fact for removal of openstack-mistral-engine package
|
||||
set_fact:
|
||||
remove_mistral_engine_package: {get_param: UpgradeRemoveUnusedPackages}
|
||||
- name: Remove openstack-mistral-engine package if operator requests it
|
||||
yum: name=openstack-mistral-engine state=removed
|
||||
ignore_errors: True
|
||||
when: remove_mistral_engine_package|bool
|
||||
|
@ -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:
|
||||
@ -140,3 +144,10 @@ 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
|
||||
- name: Set fact for removal of openstack-mistral-event-engine package
|
||||
set_fact:
|
||||
remove_mistral_event_engine_package: {get_param: UpgradeRemoveUnusedPackages}
|
||||
- name: Remove openstack-mistral-event-engine package if operator requests it
|
||||
yum: name=openstack-mistral-event-engine state=removed
|
||||
ignore_errors: True
|
||||
when: remove_mistral_event_engine_package|bool
|
||||
|
@ -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:
|
||||
@ -148,3 +152,10 @@ outputs:
|
||||
- name: Stop and disable mistral_executor service
|
||||
when: mistral_executor_enabled|bool
|
||||
service: name=openstack-mistral-executor state=stopped enabled=no
|
||||
- name: Set fact for removal of openstack-mistral-executor package
|
||||
set_fact:
|
||||
remove_mistral_executor_package: {get_param: UpgradeRemoveUnusedPackages}
|
||||
- name: Remove openstack-mistral-executor package if operator requests it
|
||||
yum: name=openstack-mistral-executor state=removed
|
||||
ignore_errors: True
|
||||
when: remove_mistral_executor_package|bool
|
||||
|
@ -43,6 +43,10 @@ parameters:
|
||||
EnableInternalTLS:
|
||||
type: boolean
|
||||
default: false
|
||||
UpgradeRemoveUnusedPackages:
|
||||
default: false
|
||||
description: Remove package if the service is being disabled during upgrade
|
||||
type: boolean
|
||||
|
||||
conditions:
|
||||
zaqar_management_store_sqlalchemy: {equals : [{get_param: ZaqarManagementStore}, 'sqlalchemy']}
|
||||
@ -218,11 +222,19 @@ outputs:
|
||||
when:
|
||||
- zaqar_httpd_enabled|bool
|
||||
- httpd_running|bool
|
||||
- name: Stop and disable zaqar service
|
||||
when:
|
||||
- step|int == 2
|
||||
- zaqar_httpd_enabled|bool
|
||||
- httpd_running|bool
|
||||
service: name=httpd state=stopped enabled=no
|
||||
- when: step|int == 2
|
||||
block:
|
||||
- name: Stop and disable zaqar service
|
||||
when:
|
||||
- zaqar_httpd_enabled|bool
|
||||
- httpd_running|bool
|
||||
service: name=httpd state=stopped enabled=no
|
||||
- name: Set fact for removal of openstack-zaqar package
|
||||
set_fact:
|
||||
remove_zaqar_package: {get_param: UpgradeRemoveUnusedPackages}
|
||||
- name: Remove openstack-zaqar package if operator requests it
|
||||
yum: name=openstack-zaqar state=removed
|
||||
ignore_errors: True
|
||||
when: remove_zaqar_package|bool
|
||||
metadata_settings:
|
||||
get_attr: [ZaqarBase, role_data, metadata_settings]
|
||||
|
Loading…
Reference in New Issue
Block a user