Merge "undercloud: add missing services for upgrade cleanup"

This commit is contained in:
Zuul 2018-06-15 12:03:16 +00:00 committed by Gerrit Code Review
commit 42c552e4ab
9 changed files with 106 additions and 6 deletions

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:
@ -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

View File

@ -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

View File

@ -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

View File

@ -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:

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:
@ -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

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:
@ -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

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:
@ -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

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:
@ -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

View File

@ -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]