Upgrades: Refactor playbooks to set facts

To not to redefine variable multiple times in each service we
run check only once and we set fact. To increase readability of
generated playbook we add block per strep in services.

Change-Id: I2399a72709d240f84e3463c5c3b56942462d1e5c
This commit is contained in:
Lukas Bezdicka
2018-04-17 13:44:18 +02:00
parent e0139adfda
commit 56bec75c02
74 changed files with 1736 additions and 1587 deletions

View File

@@ -123,32 +123,32 @@ outputs:
/var/log/containers/aodh and /var/log/containers/httpd/aodh-api. /var/log/containers/aodh and /var/log/containers/httpd/aodh-api.
ignore_errors: true ignore_errors: true
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if aodh_evaluator is deployed - name: Check if aodh_evaluator is deployed
command: systemctl is-enabled --quiet openstack-aodh-evaluator command: systemctl is-enabled --quiet openstack-aodh-evaluator
tags: common
ignore_errors: True ignore_errors: True
register: aodh_evaluator_enabled register: aodh_evaluator_enabled_result
- name: Set fact aodh_evaluator_enabled
set_fact:
aodh_evaluator_enabled: "{{ aodh_evaluator_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service openstack-aodh-evaluator is running" - name: "PreUpgrade step0,validation: Check service openstack-aodh-evaluator is running"
command: systemctl is-active --quiet openstack-aodh-evaluator command: systemctl is-active --quiet openstack-aodh-evaluator
when:
- step|int == 0
- aodh_evaluator_enabled.rc == 0
tags: validation tags: validation
when: aodh_evaluator_enabled|bool
- when: step|int == 2
block:
- name: Stop and disable openstack-aodh-evaluator service - name: Stop and disable openstack-aodh-evaluator service
when: when: aodh_evaluator_enabled|bool
- step|int == 2
- aodh_evaluator_enabled.rc == 0
service: name=openstack-aodh-evaluator.service state=stopped enabled=no service: name=openstack-aodh-evaluator.service state=stopped enabled=no
- name: Set fact for removal of openstack-aodh-evaluator package - name: Set fact for removal of openstack-aodh-evaluator package
when: step|int == 2
set_fact: set_fact:
remove_aodh_evaluator_package: {get_param: UpgradeRemoveUnusedPackages} remove_aodh_evaluator_package: {get_param: UpgradeRemoveUnusedPackages}
- name: Remove openstack-aodh-evaluator package if operator requests it - name: Remove openstack-aodh-evaluator package if operator requests it
yum: name=openstack-aodh-evaluator state=removed yum: name=openstack-aodh-evaluator state=removed
ignore_errors: True ignore_errors: True
when: when: remove_aodh_evaluator_package|bool
- step|int == 2
- remove_aodh_evaluator_package|bool
fast_forward_upgrade_tasks: fast_forward_upgrade_tasks:
- name: FFU check if openstack-aodh-evaluator is deployed - name: FFU check if openstack-aodh-evaluator is deployed
command: systemctl is-enabled --quiet openstack-aodh-evaluator command: systemctl is-enabled --quiet openstack-aodh-evaluator

View File

@@ -123,32 +123,32 @@ outputs:
/var/log/containers/aodh and /var/log/containers/httpd/aodh-api. /var/log/containers/aodh and /var/log/containers/httpd/aodh-api.
ignore_errors: true ignore_errors: true
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if aodh_listener is deployed - name: Check if aodh_listener is deployed
command: systemctl is-enabled --quiet openstack-aodh-listener command: systemctl is-enabled --quiet openstack-aodh-listener
tags: common
ignore_errors: True ignore_errors: True
register: aodh_listener_enabled register: aodh_listener_enabled_result
- name: Set fact aodh_listener_enabled
set_fact:
aodh_listener_enabled: "{{ aodh_listener_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service openstack-aodh-listener is running" - name: "PreUpgrade step0,validation: Check service openstack-aodh-listener is running"
command: systemctl is-active --quiet openstack-aodh-listener command: systemctl is-active --quiet openstack-aodh-listener
when: when: aodh_listener_enabled|bool
- step|int == 0
- aodh_listener_enabled.rc == 0
tags: validation tags: validation
- when: step|int == 2
block:
- name: Stop and disable openstack-aodh-listener service - name: Stop and disable openstack-aodh-listener service
when: when: aodh_listener_enabled|bool
- step|int == 2
- aodh_listener_enabled.rc == 0
service: name=openstack-aodh-listener.service state=stopped enabled=no service: name=openstack-aodh-listener.service state=stopped enabled=no
- name: Set fact for removal of openstack-aodh-listener package - name: Set fact for removal of openstack-aodh-listener package
when: step|int == 2
set_fact: set_fact:
remove_aodh_listener_package: {get_param: UpgradeRemoveUnusedPackages} remove_aodh_listener_package: {get_param: UpgradeRemoveUnusedPackages}
- name: Remove openstack-aodh-listener package if operator requests it - name: Remove openstack-aodh-listener package if operator requests it
yum: name=openstack-aodh-listener state=removed yum: name=openstack-aodh-listener state=removed
ignore_errors: True ignore_errors: True
when: when: remove_aodh_listener_package|bool
- step|int == 2
- remove_aodh_listener_package|bool
fast_forward_upgrade_tasks: fast_forward_upgrade_tasks:
- name: FFU check if openstack-aodh-listener is deployed - name: FFU check if openstack-aodh-listener is deployed
command: systemctl is-enabled --quiet openstack-aodh-listener command: systemctl is-enabled --quiet openstack-aodh-listener

View File

@@ -123,32 +123,32 @@ outputs:
/var/log/containers/aodh and /var/log/containers/httpd/aodh-api. /var/log/containers/aodh and /var/log/containers/httpd/aodh-api.
ignore_errors: true ignore_errors: true
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if aodh_notifier is deployed - name: Check if aodh_notifier is deployed
command: systemctl is-enabled --quiet openstack-aodh-notifier command: systemctl is-enabled --quiet openstack-aodh-notifier
tags: common
ignore_errors: True ignore_errors: True
register: aodh_notifier_enabled register: aodh_notifier_enabled_result
- name: Set fact aodh_notifier_enabled
set_fact:
aodh_notifier_enabled: "{{ aodh_notifier_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service openstack-aodh-notifier is running" - name: "PreUpgrade step0,validation: Check service openstack-aodh-notifier is running"
command: systemctl is-active --quiet openstack-aodh-notifier command: systemctl is-active --quiet openstack-aodh-notifier
when: when: aodh_notifier_enabled|bool
- step|int == 0
- aodh_notifier_enabled.rc == 0
tags: validation tags: validation
- when: step|int == 2
block:
- name: Stop and disable openstack-aodh-notifier service - name: Stop and disable openstack-aodh-notifier service
when: when: aodh_notifier_enabled|bool
- step|int == 2
- aodh_notifier_enabled.rc == 0
service: name=openstack-aodh-notifier.service state=stopped enabled=no service: name=openstack-aodh-notifier.service state=stopped enabled=no
- name: Set fact for removal of openstack-aodh-notifier package - name: Set fact for removal of openstack-aodh-notifier package
when: step|int == 2
set_fact: set_fact:
remove_aodh_notifier_package: {get_param: UpgradeRemoveUnusedPackages} remove_aodh_notifier_package: {get_param: UpgradeRemoveUnusedPackages}
- name: Remove openstack-aodh-notifier package if operator requests it - name: Remove openstack-aodh-notifier package if operator requests it
yum: name=openstack-aodh-notifier state=removed yum: name=openstack-aodh-notifier state=removed
ignore_errors: True ignore_errors: True
when: when: remove_aodh_notifier_package|bool
- step|int == 2
- remove_aodh_notifier_package|bool
fast_forward_upgrade_tasks: fast_forward_upgrade_tasks:
- name: FFU check if openstack-aodh-notifier is deployed - name: FFU check if openstack-aodh-notifier is deployed
command: systemctl is-enabled --quiet openstack-aodh-notifier command: systemctl is-enabled --quiet openstack-aodh-notifier

View File

@@ -230,30 +230,30 @@ outputs:
environment: *kolla_env environment: *kolla_env
host_prep_tasks: {get_attr: [BarbicanApiLogging, host_prep_tasks]} host_prep_tasks: {get_attr: [BarbicanApiLogging, host_prep_tasks]}
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if openstack-barbican-api is deployed - name: Check if openstack-barbican-api is deployed
command: systemctl is-enabled --quiet openstack-barbican-api command: systemctl is-enabled --quiet openstack-barbican-api
tags: common
ignore_errors: True ignore_errors: True
register: barbican_enabled register: barbican_enabled_result
- name: Set fact barbican_enabled
set_fact:
barbican_enabled: "{{ barbican_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service barbican-api is running" - name: "PreUpgrade step0,validation: Check service barbican-api is running"
command: systemctl is-active --quiet openstack-barbican-api command: systemctl is-active --quiet openstack-barbican-api
when: when: barbican_enabled|bool
- step|int == 0 - when: step|int == 2
- barbican_enabled.rc == 0 block:
- name: Stop and disable barbican_api service - name: Stop and disable barbican_api service
when: when: barbican_enabled|bool
- step|int == 2
- barbican_enabled.rc == 0
service: name=openstack-barbican-api state=stopped enabled=no service: name=openstack-barbican-api state=stopped enabled=no
- name: Set fact for removal of openstack-barbican-api package - name: Set fact for removal of openstack-barbican-api package
when: step|int == 2
set_fact: set_fact:
remove_barbican_api_package: {get_param: UpgradeRemoveUnusedPackages} remove_barbican_api_package: {get_param: UpgradeRemoveUnusedPackages}
- name: Remove openstack-barbican-api package if operator requests it - name: Remove openstack-barbican-api package if operator requests it
yum: name=openstack-barbican-api state=removed yum: name=openstack-barbican-api state=removed
ignore_errors: True ignore_errors: True
when: when: remove_barbican_api_package|bool
- step|int == 2
- remove_barbican_api_package|bool
metadata_settings: metadata_settings:
get_attr: [BarbicanApiBase, role_data, metadata_settings] get_attr: [BarbicanApiBase, role_data, metadata_settings]

View File

@@ -151,32 +151,32 @@ outputs:
/var/log/containers/ceilometer. /var/log/containers/ceilometer.
ignore_errors: true ignore_errors: true
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if ceilometer_agent_central is deployed - name: Check if ceilometer_agent_central is deployed
command: systemctl is-enabled --quiet openstack-ceilometer-central command: systemctl is-enabled --quiet openstack-ceilometer-central
tags: common
ignore_errors: True ignore_errors: True
register: ceilometer_agent_central_enabled register: ceilometer_agent_central_enabled_result
- name: Set fact ceilometer_agent_central_enabled
set_fact:
ceilometer_agent_central_enabled: "{{ ceilometer_agent_central_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service openstack-ceilometer-central is running" - name: "PreUpgrade step0,validation: Check service openstack-ceilometer-central is running"
command: systemctl is-active --quiet openstack-ceilometer-central command: systemctl is-active --quiet openstack-ceilometer-central
when: when: ceilometer_agent_central_enabled|bool
- step|int == 0
- ceilometer_agent_central_enabled.rc == 0
tags: validation tags: validation
- when: step|int == 2
block:
- name: Stop and disable ceilometer agent central service - name: Stop and disable ceilometer agent central service
service: name=openstack-ceilometer-central state=stopped enabled=no service: name=openstack-ceilometer-central state=stopped enabled=no
when: when: ceilometer_agent_central_enabled|bool
- step|int == 2
- ceilometer_agent_central_enabled.rc == 0
- name: Set fact for removal of openstack-ceilometer-central package - name: Set fact for removal of openstack-ceilometer-central package
when: step|int == 2
set_fact: set_fact:
remove_ceilometer_central_package: {get_param: UpgradeRemoveUnusedPackages} remove_ceilometer_central_package: {get_param: UpgradeRemoveUnusedPackages}
- name: Remove openstack-ceilometer-central package if operator requests it - name: Remove openstack-ceilometer-central package if operator requests it
yum: name=openstack-ceilometer-central state=removed yum: name=openstack-ceilometer-central state=removed
ignore_errors: True ignore_errors: True
when: when: remove_ceilometer_central_package|bool
- step|int == 2
- remove_ceilometer_central_package|bool
fast_forward_upgrade_tasks: fast_forward_upgrade_tasks:
- name: FFU check if openstack-ceilometer-central is deployed - name: FFU check if openstack-ceilometer-central is deployed
command: systemctl is-enabled --quiet openstack-ceilometer-central command: systemctl is-enabled --quiet openstack-ceilometer-central

View File

@@ -110,54 +110,50 @@ outputs:
/var/log/containers/ceilometer. /var/log/containers/ceilometer.
ignore_errors: true ignore_errors: true
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if openstack-ceilometer-compute is deployed - name: Check if openstack-ceilometer-compute is deployed
command: systemctl is-enabled --quiet openstack-ceilometer-compute command: systemctl is-enabled --quiet openstack-ceilometer-compute
tags: common
ignore_errors: True ignore_errors: True
register: openstack_ceilometer_compute_enabled register: openstack_ceilometer_compute_enabled_result
- name: Set fact openstack_ceilometer_compute_enabled
set_fact:
openstack_ceilometer_compute_enabled: "{{ openstack_ceilometer_compute_enabled_result.rc == 0 }}"
- name: Check if openstack-ceilometer-polling is deployed - name: Check if openstack-ceilometer-polling is deployed
command: systemctl is-enabled --quiet openstack-ceilometer-polling command: systemctl is-enabled --quiet openstack-ceilometer-polling
tags: common
ignore_errors: True ignore_errors: True
register: openstack_ceilometer_polling_enabled register: openstack_ceilometer_polling_enabled_result
- name: Set fact openstack_ceilometer_polling_enabled
set_fact:
openstack_ceilometer_polling_enabled: "{{ openstack_ceilometer_polling_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service openstack-ceilometer-compute is running" - name: "PreUpgrade step0,validation: Check service openstack-ceilometer-compute is running"
command: systemctl is-active --quiet openstack-ceilometer-compute command: systemctl is-active --quiet openstack-ceilometer-compute
when: when: openstack_ceilometer_compute_enabled|bool
- step|int == 0
- openstack_ceilometer_compute_enabled.rc == 0
tags: validation tags: validation
- name: "PreUpgrade step0,validation: Check service openstack-ceilometer-polling is running" - name: "PreUpgrade step0,validation: Check service openstack-ceilometer-polling is running"
command: systemctl is-active --quiet openstack-ceilometer-polling command: systemctl is-active --quiet openstack-ceilometer-polling
when: when: openstack_ceilometer_polling_enabled|bool
- step|int == 0
- openstack_ceilometer_polling_enabled.rc == 0
tags: validation tags: validation
- when: step|int == 2
block:
- name: Stop and disable ceilometer compute agent - name: Stop and disable ceilometer compute agent
service: name=openstack-ceilometer-compute state=stopped enabled=no service: name=openstack-ceilometer-compute state=stopped enabled=no
when: when: openstack_ceilometer_compute_enabled|bool
- step|int == 2
- openstack_ceilometer_compute_enabled.rc|default('') == 0
- name: Stop and disable ceilometer polling agent - name: Stop and disable ceilometer polling agent
service: name=openstack-ceilometer-polling state=stopped enabled=no service: name=openstack-ceilometer-polling state=stopped enabled=no
when: when: openstack_ceilometer_polling_enabled|bool
- step|int == 2
- openstack_ceilometer_polling_enabled.rc|default('') == 0
- name: Set fact for removal of openstack-ceilometer-compute and polling package - name: Set fact for removal of openstack-ceilometer-compute and polling package
when: step|int == 2
set_fact: set_fact:
remove_ceilometer_compute_polling_package: {get_param: UpgradeRemoveUnusedPackages} remove_ceilometer_compute_polling_package: {get_param: UpgradeRemoveUnusedPackages}
- name: Remove openstack-ceilometer-compute package if operator requests it - name: Remove openstack-ceilometer-compute package if operator requests it
yum: name=openstack-ceilometer-compute state=removed yum: name=openstack-ceilometer-compute state=removed
ignore_errors: True ignore_errors: True
when: when: remove_ceilometer_compute_polling_package|bool
- step|int == 2
- remove_ceilometer_compute_polling_package|bool
- name: Remove openstack-ceilometer-polling package if operator requests it - name: Remove openstack-ceilometer-polling package if operator requests it
yum: name=openstack-ceilometer-polling state=removed yum: name=openstack-ceilometer-polling state=removed
ignore_errors: True ignore_errors: True
when: when: remove_ceilometer_compute_polling_package|bool
- step|int == 2
- remove_ceilometer_compute_polling_package|bool
fast_forward_upgrade_tasks: fast_forward_upgrade_tasks:
- name: FFU check if openstack-ceilometer-compute is deployed - name: FFU check if openstack-ceilometer-compute is deployed
command: systemctl is-enabled openstack-ceilometer-compute command: systemctl is-enabled openstack-ceilometer-compute

View File

@@ -130,32 +130,32 @@ outputs:
/var/log/containers/ceilometer. /var/log/containers/ceilometer.
ignore_errors: true ignore_errors: true
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if ceilometer-agent-ipmi is deployed - name: Check if ceilometer-agent-ipmi is deployed
command: systemctl is-enabled --quiet openstack-ceilometer-ipmi command: systemctl is-enabled --quiet openstack-ceilometer-ipmi
tags: common
ignore_errors: True ignore_errors: True
register: ceilometer_ipmi_enabled register: ceilometer_ipmi_enabled_result
- name: Set fact ceilometer_ipmi_enabled
set_fact:
ceilometer_ipmi_enabled: "{{ ceilometer_ipmi_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check if openstack-ceilometer-ipmi is running" - name: "PreUpgrade step0,validation: Check if openstack-ceilometer-ipmi is running"
command: systemctl is-active --quiet openstack-ceilometer-ipmi command: systemctl is-active --quiet openstack-ceilometer-ipmi
when: when: ceilometer_ipmi_enabled|bool
- step|int == 0
- ceilometer_ipmi_enabled.rc == 0
tags: validation tags: validation
- when: step|int == 2
block:
- name: Stop and disable ceilometer agent ipmi service - name: Stop and disable ceilometer agent ipmi service
service: name=openstack-ceilometer-agent-ipmi state=stopped enabled=no service: name=openstack-ceilometer-agent-ipmi state=stopped enabled=no
when: when: ceilometer_ipmi_enabled|bool
- step|int == 2
- ceilometer_ipmi_enabled.rc == 0
- name: Set fact for removal of openstack-ceilometer-ipmi package - name: Set fact for removal of openstack-ceilometer-ipmi package
when: step|int == 2
set_fact: set_fact:
remove_ceilometer_ipmi_package: {get_param: UpgradeRemoveUnusedPackages} remove_ceilometer_ipmi_package: {get_param: UpgradeRemoveUnusedPackages}
- name: Remove openstack-ceilometer-ipmi package if operator requests it - name: Remove openstack-ceilometer-ipmi package if operator requests it
yum: name=openstack-ceilometer-ipmi state=removed yum: name=openstack-ceilometer-ipmi state=removed
ignore_errors: True ignore_errors: True
when: when: remove_ceilometer_ipmi_package|bool
- step|int == 2
- remove_ceilometer_ipmi_package|bool
fast_forward_upgrade_tasks: fast_forward_upgrade_tasks:
- name: FFU check if openstack-ceilometer-ipmi is enabled - name: FFU check if openstack-ceilometer-ipmi is enabled
command: systemctl is-enabled openstack-ceilometer-ipmi command: systemctl is-enabled openstack-ceilometer-ipmi

View File

@@ -140,32 +140,32 @@ outputs:
/var/log/containers/ceilometer. /var/log/containers/ceilometer.
ignore_errors: true ignore_errors: true
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if ceilometer_agent_notification is deployed - name: Check if ceilometer_agent_notification is deployed
command: systemctl is-enabled --quiet openstack-ceilometer-notification command: systemctl is-enabled --quiet openstack-ceilometer-notification
tags: common
ignore_errors: True ignore_errors: True
register: ceilometer_agent_notification_enabled register: ceilometer_agent_notification_enabled_result
- name: Set fact ceilometer_agent_notification_enabled
set_fact:
ceilometer_agent_notification_enabled: "{{ ceilometer_agent_notification_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service openstack-ceilometer-notification is running" - name: "PreUpgrade step0,validation: Check service openstack-ceilometer-notification is running"
command: systemctl is-active --quiet openstack-ceilometer-notification command: systemctl is-active --quiet openstack-ceilometer-notification
when: when: ceilometer_agent_notification_enabled|bool
- step|int == 0
- ceilometer_agent_notification_enabled.rc == 0
tags: validation tags: validation
- when: step|int == 2
block:
- name: Stop and disable ceilometer agent notification service - name: Stop and disable ceilometer agent notification service
service: name=openstack-ceilometer-notification state=stopped enabled=no service: name=openstack-ceilometer-notification state=stopped enabled=no
when: when: ceilometer_agent_notification_enabled|bool
- step|int == 2
- ceilometer_agent_notification_enabled.rc == 0
- name: Set fact for removal of openstack-ceilometer-notification package - name: Set fact for removal of openstack-ceilometer-notification package
when: step|int == 2
set_fact: set_fact:
remove_ceilometer_notification_package: {get_param: UpgradeRemoveUnusedPackages} remove_ceilometer_notification_package: {get_param: UpgradeRemoveUnusedPackages}
- name: Remove openstack-ceilometer-notification package if operator requests it - name: Remove openstack-ceilometer-notification package if operator requests it
yum: name=openstack-ceilometer-notification state=removed yum: name=openstack-ceilometer-notification state=removed
ignore_errors: True ignore_errors: True
when: when: remove_ceilometer_notification_package|bool
- step|int == 2
- remove_ceilometer_notification_package|bool
fast_forward_upgrade_tasks: fast_forward_upgrade_tasks:
- name: FFU check if openstack-ceilometer-notification is deployed - name: FFU check if openstack-ceilometer-notification is deployed
command: systemctl is-enabled openstack-ceilometer-notification command: systemctl is-enabled openstack-ceilometer-notification

View File

@@ -215,47 +215,43 @@ outputs:
/var/log/containers/cinder and /var/log/containers/httpd/cinder-api. /var/log/containers/cinder and /var/log/containers/httpd/cinder-api.
ignore_errors: true ignore_errors: true
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check is cinder_api is deployed - name: Check is cinder_api is deployed
command: systemctl is-enabled openstack-cinder-api command: systemctl is-enabled openstack-cinder-api
tags: common
ignore_errors: True ignore_errors: True
register: cinder_api_enabled register: cinder_api_enabled_result
- name: Set fact cinder_api_enabled
set_fact:
cinder_api_enabled: "{{ cinder_api_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service openstack-cinder-api is running" - name: "PreUpgrade step0,validation: Check service openstack-cinder-api is running"
shell: systemctl is-active --quiet openstack-cinder-api shell: systemctl is-active --quiet openstack-cinder-api
when: when: cinder_api_enabled|bool
- step|int == 0
- cinder_api_enabled.rc == 0
tags: validation tags: validation
- when: step|int == 2
block:
- name: Stop and disable cinder_api service (pre-upgrade not under httpd) - name: Stop and disable cinder_api service (pre-upgrade not under httpd)
service: name=openstack-cinder-api state=stopped enabled=no service: name=openstack-cinder-api state=stopped enabled=no
when: when: cinder_api_enabled|bool
- step|int == 2
- cinder_api_enabled.rc == 0
- name: check for cinder_api running under apache (post upgrade) - name: check for cinder_api running under apache (post upgrade)
shell: "httpd -t -D DUMP_VHOSTS | grep -q cinder" shell: "httpd -t -D DUMP_VHOSTS | grep -q cinder"
register: cinder_api_apache register: cinder_api_apache
ignore_errors: true ignore_errors: true
when: step|int == 2
- name: Stop and disable cinder_api service - name: Stop and disable cinder_api service
service: name=httpd state=stopped enabled=no service: name=httpd state=stopped enabled=no
when: when: cinder_api_apache.rc == 0
- step|int == 2
- cinder_api_apache.rc == 0
- name: remove old cinder cron jobs - name: remove old cinder cron jobs
when: step|int == 2
file: file:
path: /var/spool/cron/cinder path: /var/spool/cron/cinder
state: absent state: absent
- name: Set fact for removal of httpd package - name: Set fact for removal of httpd package
when: step|int == 2
set_fact: set_fact:
remove_httpd_package: {get_param: UpgradeRemoveUnusedPackages} remove_httpd_package: {get_param: UpgradeRemoveUnusedPackages}
- name: Remove httpd package if operator requests it - name: Remove httpd package if operator requests it
yum: name=httpd state=removed yum: name=httpd state=removed
ignore_errors: True ignore_errors: True
when: when: remove_httpd_package|bool
- step|int == 2
- remove_httpd_package|bool
fast_forward_upgrade_tasks: fast_forward_upgrade_tasks:
- name: Check is cinder_api is deployed - name: Check is cinder_api is deployed
command: systemctl is-enabled --quiet openstack-cinder-api command: systemctl is-enabled --quiet openstack-cinder-api

View File

@@ -164,16 +164,29 @@ outputs:
path: /etc/ceph path: /etc/ceph
state: directory state: directory
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if cinder_backup is deployed
command: systemctl is-enabled openstack-cinder-backup
ignore_errors: True
register: cinder_backup_enabled_result
- name: Set fact cinder_backup_enabled
set_fact:
cinder_backup_enabled: "{{ cinder_backup_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service openstack-cinder-backup is running"
shell: systemctl is-active --quiet openstack-cinder-backup
when: cinder_backup_enabled|bool
tags: validation
- when: step|int == 2
block:
- name: Stop and disable cinder_backup service - name: Stop and disable cinder_backup service
when: step|int == 2 when: cinder_backup_enabled|bool
service: name=openstack-cinder-backup state=stopped enabled=no service: name=openstack-cinder-backup state=stopped enabled=no
- name: Set fact for removal of openstack-cinder package - name: Set fact for removal of openstack-cinder package
when: step|int == 2
set_fact: set_fact:
remove_cinder_package: {get_param: UpgradeRemoveUnusedPackages} remove_cinder_package: {get_param: UpgradeRemoveUnusedPackages}
- name: Remove openstack-cinder package if operator requests it - name: Remove openstack-cinder package if operator requests it
yum: name=openstack-cinder state=removed yum: name=openstack-cinder state=removed
ignore_errors: True ignore_errors: True
when: when: remove_cinder_package|bool
- step|int == 2
- remove_cinder_package|bool

View File

@@ -143,32 +143,32 @@ outputs:
/var/log/containers/cinder and /var/log/containers/httpd/cinder-api. /var/log/containers/cinder and /var/log/containers/httpd/cinder-api.
ignore_errors: true ignore_errors: true
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if cinder_scheduler is deployed - name: Check if cinder_scheduler is deployed
command: systemctl is-enabled openstack-cinder-scheduler command: systemctl is-enabled openstack-cinder-scheduler
tags: common
ignore_errors: True ignore_errors: True
register: cinder_scheduler_enabled register: cinder_scheduler_enabled_result
- name: Set fact cinder_scheduler_enabled
set_fact:
cinder_scheduler_enabled: "{{ cinder_scheduler_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service openstack-cinder-scheduler is running" - name: "PreUpgrade step0,validation: Check service openstack-cinder-scheduler is running"
shell: systemctl is-active --quiet openstack-cinder-scheduler shell: systemctl is-active --quiet openstack-cinder-scheduler
when: when: cinder_scheduler_enabled|bool
- step|int == 0
- cinder_scheduler_enabled.rc == 0
tags: validation tags: validation
- when: step|int == 2
block:
- name: Stop and disable cinder_scheduler service - name: Stop and disable cinder_scheduler service
when: when: cinder_scheduler_enabled|bool
- step|int == 2
- cinder_scheduler_enabled.rc == 0
service: name=openstack-cinder-scheduler state=stopped enabled=no service: name=openstack-cinder-scheduler state=stopped enabled=no
- name: Set fact for removal of openstack-cinder package - name: Set fact for removal of openstack-cinder package
when: step|int == 2
set_fact: set_fact:
remove_cinder_package: {get_param: UpgradeRemoveUnusedPackages} remove_cinder_package: {get_param: UpgradeRemoveUnusedPackages}
- name: Remove openstack-cinder package if operator requests it - name: Remove openstack-cinder package if operator requests it
yum: name=openstack-cinder state=removed yum: name=openstack-cinder state=removed
ignore_errors: True ignore_errors: True
when: when: remove_cinder_package|bool
- step|int == 2
- remove_cinder_package|bool
fast_forward_upgrade_tasks: fast_forward_upgrade_tasks:
- name: Check if cinder_scheduler is deployed - name: Check if cinder_scheduler is deployed
command: systemctl is-enabled --quiet openstack-cinder-scheduler command: systemctl is-enabled --quiet openstack-cinder-scheduler

View File

@@ -223,32 +223,32 @@ outputs:
creates: /dev/loop2 creates: /dev/loop2
when: cinder_enable_iscsi_backend when: cinder_enable_iscsi_backend
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if cinder_volume is deployed - name: Check if cinder_volume is deployed
command: systemctl is-enabled openstack-cinder-volume command: systemctl is-enabled openstack-cinder-volume
tags: common
ignore_errors: True ignore_errors: True
register: cinder_volume_enabled register: cinder_volume_enabled_result
- name: Set fact cinder_volume_enabled
set_fact:
cinder_volume_enabled: "{{ cinder_volume_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service openstack-cinder-volume is running" - name: "PreUpgrade step0,validation: Check service openstack-cinder-volume is running"
shell: systemctl is-active --quiet openstack-cinder-volume shell: systemctl is-active --quiet openstack-cinder-volume
when: when: cinder_volume_enabled|bool
- step|int == 0
- cinder_volume_enabled.rc == 0
tags: validation tags: validation
- when: step|int == 2
block:
- name: Stop and disable cinder_volume service - name: Stop and disable cinder_volume service
when: when: cinder_volume_enabled|bool
- step|int == 2
- cinder_volume_enabled.rc == 0
service: name=openstack-cinder-volume state=stopped enabled=no service: name=openstack-cinder-volume state=stopped enabled=no
- name: Set fact for removal of openstack-cinder package - name: Set fact for removal of openstack-cinder package
when: step|int == 2
set_fact: set_fact:
remove_cinder_package: {get_param: UpgradeRemoveUnusedPackages} remove_cinder_package: {get_param: UpgradeRemoveUnusedPackages}
- name: Remove openstack-cinder package if operator requests it - name: Remove openstack-cinder package if operator requests it
yum: name=openstack-cinder state=removed yum: name=openstack-cinder state=removed
ignore_errors: True ignore_errors: True
when: when: remove_cinder_package|bool
- step|int == 2
- remove_cinder_package|bool
fast_forward_upgrade_tasks: fast_forward_upgrade_tasks:
- name: Check if cinder_volume is deployed - name: Check if cinder_volume is deployed
command: systemctl is-enabled --quiet openstack-cinder-volume command: systemctl is-enabled --quiet openstack-cinder-volume

View File

@@ -124,32 +124,32 @@ outputs:
/var/log/containers/collectd. /var/log/containers/collectd.
ignore_errors: true ignore_errors: true
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if collectd is deployed - name: Check if collectd is deployed
command: systemctl is-enabled --quiet collectd command: systemctl is-enabled --quiet collectd
tags: common
ignore_errors: True ignore_errors: True
register: collectd_enabled register: collectd_enabled_result
- name: Set fact collectd_enabled
set_fact:
collectd_enabled: "{{ collectd_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service collectd service is running" - name: "PreUpgrade step0,validation: Check service collectd service is running"
command: systemctl is-active --quiet collectd command: systemctl is-active --quiet collectd
when: when: collectd_enabled|bool
- step|int == 0
- collectd_enabled.rc == 0
tags: validation tags: validation
- when: step|int == 2
block:
- name: Stop and disable collectd service - name: Stop and disable collectd service
when: when: collectd_enabled|bool
- step|int == 2
- collectd_enabled.rc == 0
service: name=collectd.service state=stopped enabled=no service: name=collectd.service state=stopped enabled=no
- name: Set fact for removal of collectd package - name: Set fact for removal of collectd package
when: step|int == 2
set_fact: set_fact:
remove_collectd_package: {get_param: UpgradeRemoveUnusedPackages} remove_collectd_package: {get_param: UpgradeRemoveUnusedPackages}
- name: Remove collectd package if operator requests it - name: Remove collectd package if operator requests it
yum: name=collectd state=removed yum: name=collectd state=removed
ignore_errors: True ignore_errors: True
when: when: remove_collectd_package|bool
- step|int == 2
- remove_collectd_package|bool
fast_forward_upgrade_tasks: fast_forward_upgrade_tasks:
- name: Check if collectd.service is deployed - name: Check if collectd.service is deployed
command: systemctl is-enabled --quiet collectd.service command: systemctl is-enabled --quiet collectd.service

View File

@@ -148,29 +148,29 @@ outputs:
/var/log/containers/congress. /var/log/containers/congress.
ignore_errors: true ignore_errors: true
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if congress is deployed - name: Check if congress is deployed
command: systemctl is-enabled --quiet openstack-congress-server command: systemctl is-enabled --quiet openstack-congress-server
tags: common
ignore_errors: True ignore_errors: True
register: congress_enabled register: congress_enabled_result
- name: Set fact congress_enabled
set_fact:
congress_enabled: "{{ congress_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service openstack-congress-server is running" - name: "PreUpgrade step0,validation: Check service openstack-congress-server is running"
command: systemctl is-active --quiet openstack-congress-server command: systemctl is-active --quiet openstack-congress-server
when: when: congress_enabled|bool
- step|int == 0
- congress_enabled.rc == 0
tags: validation tags: validation
- when: step|int == 2
block:
- name: Stop and disable congress_api service - name: Stop and disable congress_api service
when: when: congress_enabled|bool
- step|int == 2
- congress_enabled.rc == 0
service: name=openstack-congress-server state=stopped enabled=no service: name=openstack-congress-server state=stopped enabled=no
- name: Set fact for removal of openstack-congress package - name: Set fact for removal of openstack-congress package
when: step|int == 2
set_fact: set_fact:
remove_congress_package: {get_param: UpgradeRemoveUnusedPackages} remove_congress_package: {get_param: UpgradeRemoveUnusedPackages}
- name: Remove openstack-congress package if operator requests it - name: Remove openstack-congress package if operator requests it
yum: name=openstack-congress state=removed yum: name=openstack-congress state=removed
ignore_errors: True ignore_errors: True
when: when: remove_congress_package|bool
- step|int == 2
- remove_congress_package|bool

View File

@@ -165,21 +165,24 @@ outputs:
metadata_settings: metadata_settings:
get_attr: [MongodbPuppetBase, role_data, metadata_settings] get_attr: [MongodbPuppetBase, role_data, metadata_settings]
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check for mongodb service - name: Check for mongodb service
command: systemctl is-enabled --quiet mongod command: systemctl is-enabled --quiet mongod
tags: common
ignore_errors: True ignore_errors: True
register: mongod_enabled register: mongod_enabled_result
- name: Set fact mongod_enabled
set_fact:
mongod_enabled: "{{ mongod_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check if mongod is running" - name: "PreUpgrade step0,validation: Check if mongod is running"
command: systemctl is-active --quiet mongod command: systemctl is-active --quiet mongod
when: when: mongod_enabled|bool
- step|int == 0
- mongod_enabled.rc == 0
tags: validation tags: validation
- when: step|int == 2
block:
- name: Stop and disable mongodb service - name: Stop and disable mongodb service
when: when: mongod_enabled|bool
- step|int == 2
- mongod_enabled.rc == 0
service: name=mongod state=stopped enabled=no service: name=mongod state=stopped enabled=no
fast_forward_upgrade_tasks: fast_forward_upgrade_tasks:
- name: Check for mongodb service - name: Check for mongodb service

View File

@@ -238,17 +238,22 @@ outputs:
/var/log/containers/mysql. /var/log/containers/mysql.
ignore_errors: true ignore_errors: true
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if mysql service is deployed - name: Check if mysql service is deployed
command: systemctl is-enabled --quiet mariadb command: systemctl is-enabled --quiet mariadb
tags: common
ignore_errors: True ignore_errors: True
register: mariadb_enabled register: mariadb_enabled_result
- name: Set fact mariadb_enabled
set_fact:
mariadb_enabled: "{{ mariadb_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check if mysql service is running" - name: "PreUpgrade step0,validation: Check if mysql service is running"
command: systemctl is-active --quiet mariadb command: systemctl is-active --quiet mariadb
when: when: mariadb_enabled|bool
- step|int == 0
- mariadb_enabled.rc == 0
tags: validation tags: validation
- when: step|int == 2
block:
# https://bugs.launchpad.net/tripleo/+bug/1753247 # https://bugs.launchpad.net/tripleo/+bug/1753247
- name: Rename old neutron database to ovs_neutron - name: Rename old neutron database to ovs_neutron
shell: > shell: >
@@ -261,13 +266,9 @@ outputs:
mysql -e "DROP DATABASE \`neutron\`;" mysql -e "DROP DATABASE \`neutron\`;"
fi fi
become: true become: true
when: when: {get_param: UndercloudUpgrade}
- step|int == 2
- {get_param: UndercloudUpgrade}
- name: Stop and disable mysql service - name: Stop and disable mysql service
when: when: mariadb_enabled|bool
- step|int == 2
- mariadb_enabled.rc == 0
service: name=mariadb state=stopped enabled=no service: name=mariadb state=stopped enabled=no
post_upgrade_tasks: post_upgrade_tasks:
- name: Check and upgrade Mysql database after major version upgrade - name: Check and upgrade Mysql database after major version upgrade

View File

@@ -168,19 +168,22 @@ outputs:
/var/log/containers/redis. /var/log/containers/redis.
ignore_errors: true ignore_errors: true
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if redis is deployed - name: Check if redis is deployed
command: systemctl is-enabled --quiet redis command: systemctl is-enabled --quiet redis
tags: common
ignore_errors: True ignore_errors: True
register: redis_enabled register: redis_enabled_result
- name: Set fact redis_enabled
set_fact:
redis_enabled: "{{ redis_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check if redis is running" - name: "PreUpgrade step0,validation: Check if redis is running"
command: systemctl is-active --quiet redis command: systemctl is-active --quiet redis
when: when: redis_enabled|bool
- step|int == 0
- redis_enabled.rc == 0
tags: validation tags: validation
- when: step|int == 2
block:
- name: Stop and disable redis service - name: Stop and disable redis service
when: when: redis_enabled|bool
- step|int == 2
- redis_enabled.rc == 0
service: name=redis state=stopped enabled=no service: name=redis state=stopped enabled=no

View File

@@ -217,37 +217,38 @@ outputs:
- ec2api-metadata - ec2api-metadata
ignore_errors: true ignore_errors: true
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if EC2-API is deployed - name: Check if EC2-API is deployed
command: systemctl is-enabled --quiet openstack-ec2-api command: systemctl is-enabled --quiet openstack-ec2-api
tags: common
ignore_errors: True ignore_errors: True
register: ec2_api_enabled register: ec2_api_enabled_result
- name: Set fact ec2_api_enabled
set_fact:
ec2_api_enabled: "{{ ec2_api_enabled_result.rc == 0 }}"
- name: Check if EC2-API-METADATA are deployed - name: Check if EC2-API-METADATA are deployed
command: systemctl is-enabled --quiet openstack-ec2-api-metadata command: systemctl is-enabled --quiet openstack-ec2-api-metadata
tags: common
ignore_errors: True ignore_errors: True
register: ec2_api_metadata_enabled register: ec2_api_metadata_enabled_result
- name: Set fact ec2_api_metadata_enabled
set_fact:
ec2_api_metadata_enabled: "{{ ec2_api_metadata_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check if openstack-ec2-api is running" - name: "PreUpgrade step0,validation: Check if openstack-ec2-api is running"
command: systemctl is-active --quiet openstack-ec2-api command: systemctl is-active --quiet openstack-ec2-api
when: when: ec2_api_enabled|bool
- step|int == 0
- ec2_api_enabled.rc == 0
tags: validation tags: validation
- name: "PreUpgrade step0,validation: Check if openstack-ec2-metadata-api is running" - name: "PreUpgrade step0,validation: Check if openstack-ec2-metadata-api is running"
command: systemctl is-active --quiet openstack-ec2-api-metadata command: systemctl is-active --quiet openstack-ec2-api-metadata
when: when: ec2_api_metadata_enabled|bool
- step|int == 0
- ec2_api_metadata_enabled.rc == 0
tags: validation tags: validation
- when: step|int == 2
block:
- name: Stop and disable EC2-API service - name: Stop and disable EC2-API service
when: when: ec2_api_enabled|bool
- step|int == 2
- ec2_api_enabled.rc == 0
service: name=openstack-ec2-api state=stopped enabled=no service: name=openstack-ec2-api state=stopped enabled=no
- name: Stop and disable EC2-API-METADATA service - name: Stop and disable EC2-API-METADATA service
when: when: ec2_api_metadata_enabled|bool
- step|int == 2
- ec2_api_metadata_enabled.rc == 0
service: name=openstack-ec2-api-metadata state=stopped enabled=no service: name=openstack-ec2-api-metadata state=stopped enabled=no
metadata_settings: metadata_settings:
get_attr: [Ec2ApiPuppetBase, role_data, metadata_settings] get_attr: [Ec2ApiPuppetBase, role_data, metadata_settings]

View File

@@ -117,19 +117,22 @@ outputs:
path: /var/lib/etcd path: /var/lib/etcd
state: directory state: directory
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if etcd is deployed - name: Check if etcd is deployed
command: systemctl is-enabled --quiet etcd command: systemctl is-enabled --quiet etcd
tags: common
ignore_errors: True ignore_errors: True
register: etcd_enabled register: etcd_enabled_result
- name: Set fact etcd_enabled
set_fact:
etcd_enabled: "{{ etcd_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check if etcd is running" - name: "PreUpgrade step0,validation: Check if etcd is running"
command: systemctl is-active --quiet etcd command: systemctl is-active --quiet etcd
when: when: etcd_enabled|bool
- step|int == 0
- etcd_enabled.rc == 0
tags: validation tags: validation
- when: step|int == 2
block:
- name: Stop and disable etcd service - name: Stop and disable etcd service
when: when: etcd_enabled|bool
- step|int == 2
- etcd_enabled.rc == 0
service: name=etcd state=stopped enabled=no service: name=etcd state=stopped enabled=no

View File

@@ -121,22 +121,21 @@ outputs:
path: /var/cache/containers/fluentd path: /var/cache/containers/fluentd
state: directory state: directory
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if fluent.service is deployed - name: Check if fluent.service is deployed
command: systemctl is-enabled --quiet fluentd.service command: systemctl is-enabled --quiet fluentd.service
ignore_errors: True ignore_errors: True
register: fluentd_enabled_result register: fluentd_enabled_result
when:
- step|int == 0
- name: Set fact fluentd_enabled - name: Set fact fluentd_enabled
set_fact: set_fact:
fluentd_enabled: "{{ fluentd_enabled_result.rc == 0 }}" fluentd_enabled: "{{ fluentd_enabled_result.rc == 0 }}"
when: - when: step|int == 2
- step|int == 0 block:
- name: Stop and disable fluentd service - name: Stop and disable fluentd service
service: name=fluentd.service state=stopped enabled=no service: name=fluentd.service state=stopped enabled=no
when: when: fluentd_enabled|bool
- step|int == 2
- fluentd_enabled|bool
fast_forward_upgrade_tasks: fast_forward_upgrade_tasks:
- name: Check if fluent.service is deployed - name: Check if fluent.service is deployed
command: systemctl is-enabled --quiet fluentd.service command: systemctl is-enabled --quiet fluentd.service

View File

@@ -268,32 +268,32 @@ outputs:
path: /etc/ceph path: /etc/ceph
state: directory state: directory
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if glance_api is deployed - name: Check if glance_api is deployed
command: systemctl is-enabled --quiet openstack-glance-api command: systemctl is-enabled --quiet openstack-glance-api
tags: common
ignore_errors: True ignore_errors: True
register: glance_api_enabled register: glance_api_enabled_result
- name: Set fact glance_api_enabled
set_fact:
glance_api_enabled: "{{ glance_api_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service openstack-glance-api is running" - name: "PreUpgrade step0,validation: Check service openstack-glance-api is running"
command: systemctl is-active --quiet openstack-glance-api command: systemctl is-active --quiet openstack-glance-api
tags: validation tags: validation
when: when: glance_api_enabled|bool
- step|int == 0 - when: step|int == 2
- glance_api_enabled.rc == 0 block:
- name: Stop and disable glance_api service - name: Stop and disable glance_api service
when: when: glance_api_enabled|bool
- step|int == 2
- glance_api_enabled.rc == 0
service: name=openstack-glance-api state=stopped enabled=no service: name=openstack-glance-api state=stopped enabled=no
- name: Set fact for removal of openstack-glance package - name: Set fact for removal of openstack-glance package
when: step|int == 2
set_fact: set_fact:
remove_glance_package: {get_param: UpgradeRemoveUnusedPackages} remove_glance_package: {get_param: UpgradeRemoveUnusedPackages}
- name: Remove openstack-glance package if operator requests it - name: Remove openstack-glance package if operator requests it
yum: name=openstack-glance state=removed yum: name=openstack-glance state=removed
ignore_errors: True ignore_errors: True
when: when: remove_glance_package|bool
- step|int == 2
- remove_glance_package|bool
metadata_settings: metadata_settings:
get_attr: [GlanceApiPuppetBase, role_data, metadata_settings] get_attr: [GlanceApiPuppetBase, role_data, metadata_settings]
fast_forward_upgrade_tasks: fast_forward_upgrade_tasks:

View File

@@ -147,21 +147,24 @@ outputs:
path: /etc/ceph path: /etc/ceph
state: directory state: directory
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if gnocchi_metricd is deployed - name: Check if gnocchi_metricd is deployed
command: systemctl is-enabled --quiet openstack-gnocchi-metricd command: systemctl is-enabled --quiet openstack-gnocchi-metricd
tags: common
ignore_errors: True ignore_errors: True
register: gnocchi_metricd_enabled register: gnocchi_metricd_enabled_result
- name: Set fact gnocchi_metricd_enabled
set_fact:
gnocchi_metricd_enabled: "{{ gnocchi_metricd_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service openstack-gnocchi-metricd is running" - name: "PreUpgrade step0,validation: Check service openstack-gnocchi-metricd is running"
command: systemctl is-active --quiet openstack-gnocchi-metricd command: systemctl is-active --quiet openstack-gnocchi-metricd
when: when: gnocchi_metricd_enabled|bool
- step|int == 0
- gnocchi_metricd_enabled.rc == 0
tags: validation tags: validation
- when: step|int == 2
block:
- name: Stop and disable openstack-gnocchi-metricd service - name: Stop and disable openstack-gnocchi-metricd service
when: when: gnocchi_metricd_enabled|bool
- step|int == 2
- gnocchi_metricd_enabled.rc == 0
service: name=openstack-gnocchi-metricd.service state=stopped enabled=no service: name=openstack-gnocchi-metricd.service state=stopped enabled=no
fast_forward_upgrade_tasks: fast_forward_upgrade_tasks:
- name: FFU check if openstack-gnocchi-metricd is deployed - name: FFU check if openstack-gnocchi-metricd is deployed

View File

@@ -147,21 +147,24 @@ outputs:
path: /etc/ceph path: /etc/ceph
state: directory state: directory
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if gnocchi_statsd is deployed - name: Check if gnocchi_statsd is deployed
command: systemctl is-enabled --quiet openstack-gnocchi-statsd command: systemctl is-enabled --quiet openstack-gnocchi-statsd
tags: common
ignore_errors: True ignore_errors: True
register: gnocchi_statsd_enabled register: gnocchi_statsd_enabled_result
- name: Set fact gnocchi_statsd_enabled
set_fact:
gnocchi_statsd_enabled: "{{ gnocchi_statsd_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service openstack-gnocchi-statsd is running" - name: "PreUpgrade step0,validation: Check service openstack-gnocchi-statsd is running"
command: systemctl is-active --quiet openstack-gnocchi-statsd command: systemctl is-active --quiet openstack-gnocchi-statsd
when: when: gnocchi_statsd_enabled|bool
- step|int == 0
- gnocchi_statsd_enabled.rc == 0
tags: validation tags: validation
- when: step|int == 2
block:
- name: Stop and disable openstack-gnocchi-statsd service - name: Stop and disable openstack-gnocchi-statsd service
when: when: gnocchi_statsd_enabled|bool
- step|int == 2
- gnocchi_statsd_enabled.rc == 0
service: name=openstack-gnocchi-statsd.service state=stopped enabled=no service: name=openstack-gnocchi-statsd.service state=stopped enabled=no
fast_forward_upgrade_tasks: fast_forward_upgrade_tasks:
- name: FFU check if openstack-gnocchi-statsd is deployed - name: FFU check if openstack-gnocchi-statsd is deployed

View File

@@ -146,21 +146,24 @@ outputs:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
host_prep_tasks: {get_attr: [HeatEngineLogging, host_prep_tasks]} host_prep_tasks: {get_attr: [HeatEngineLogging, host_prep_tasks]}
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if heat_engine is deployed - name: Check if heat_engine is deployed
command: systemctl is-enabled --quiet openstack-heat-engine command: systemctl is-enabled --quiet openstack-heat-engine
tags: common
ignore_errors: True ignore_errors: True
register: heat_engine_enabled register: heat_engine_enabled_result
- name: Set fact heat_engine_enabled
set_fact:
heat_engine_enabled: "{{ heat_engine_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service openstack-heat-engine is running" - name: "PreUpgrade step0,validation: Check service openstack-heat-engine is running"
command: systemctl is-active --quiet openstack-heat-engine command: systemctl is-active --quiet openstack-heat-engine
when: when: heat_engine_enabled|bool
- step|int == 0
- heat_engine_enabled.rc == 0
tags: validation tags: validation
- when: step|int == 2
block:
- name: Stop and disable heat_engine service - name: Stop and disable heat_engine service
when: when: heat_engine_enabled|bool
- step|int == 2
- heat_engine_enabled.rc == 0
service: name=openstack-heat-engine state=stopped enabled=no service: name=openstack-heat-engine state=stopped enabled=no
fast_forward_upgrade_tasks: fast_forward_upgrade_tasks:
- name: FFU check if openstack-heat-engine is enabled - name: FFU check if openstack-heat-engine is enabled

View File

@@ -213,21 +213,24 @@ outputs:
- httpboot - httpboot
- tftpboot - tftpboot
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if ironic_conductor is deployed - name: Check if ironic_conductor is deployed
command: systemctl is-enabled --quiet openstack-ironic-conductor command: systemctl is-enabled --quiet openstack-ironic-conductor
tags: common
ignore_errors: True ignore_errors: True
register: ironic_conductor_enabled register: ironic_conductor_enabled_result
- name: Set fact ironic_conductor_enabled
set_fact:
ironic_conductor_enabled: "{{ ironic_conductor_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service openstack-ironic-conductor is running" - name: "PreUpgrade step0,validation: Check service openstack-ironic-conductor is running"
command: systemctl is-active --quiet openstack-ironic-conductor command: systemctl is-active --quiet openstack-ironic-conductor
tags: validation tags: validation
when: when: ironic_conductor_enabled|bool
- step|int == 0 - when: step|int == 2
- ironic_conductor_enabled.rc == 0 block:
- name: Stop and disable ironic_conductor service - name: Stop and disable ironic_conductor service
when: when: ironic_conductor_enabled|bool
- step|int == 2
- ironic_conductor_enabled.rc == 0
service: name=openstack-ironic-conductor state=stopped enabled=no service: name=openstack-ironic-conductor state=stopped enabled=no
fast_forward_upgrade_tasks: fast_forward_upgrade_tasks:
- block: - block:

View File

@@ -223,9 +223,25 @@ outputs:
path: /var/lib/ironic-inspector/dhcp-hostsdir path: /var/lib/ironic-inspector/dhcp-hostsdir
state: directory state: directory
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if ironic_inspector is deployed
command: systemctl is-enabled --quiet openstack-ironic-inspector
ignore_errors: True
register: ironic_inspector_enabled_result
- name: Set fact ironic_inspector_enabled
set_fact:
ironic_inspector_enabled: "{{ ironic_inspector_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service openstack-ironic-inspector is running"
command: systemctl is-active --quiet openstack-ironic-inspector
tags: validation
when: ironic_inspector_enabled|bool
- when: step|int == 2 - when: step|int == 2
block: block:
- name: Stop and disable ironic_inspector service - name: Stop and disable ironic_inspector service
service: name=openstack-ironic-inspector state=stopped enabled=no service: name=openstack-ironic-inspector state=stopped enabled=no
when: ironic_inspector_enabled|bool
- name: Stop and disable ironic_inspector dnsmasq service - name: Stop and disable ironic_inspector dnsmasq service
service: name=openstack-ironic-inspector-dnsmasq state=stopped enabled=no service: name=openstack-ironic-inspector-dnsmasq state=stopped enabled=no
when: ironic_inspector_enabled|bool

View File

@@ -104,19 +104,22 @@ outputs:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
host_prep_tasks: {get_attr: [NeutronLogging, host_prep_tasks]} host_prep_tasks: {get_attr: [NeutronLogging, host_prep_tasks]}
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if ironic-neutron-agent is deployed - name: Check if ironic-neutron-agent is deployed
command: systemctl is-enabled --quiet ironic-neutron-agent command: systemctl is-enabled --quiet ironic-neutron-agent
tags: common
ignore_errors: True ignore_errors: True
register: ironic_neutron_agent_enabled register: ironic_neutron_agent_enabled_result
- name: Set fact ironic_neutron_agent_enabled
set_fact:
ironic_neutron_agent_enabled: "{{ ironic_neutron_agent_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service ironic-neutron-agent is running" - name: "PreUpgrade step0,validation: Check service ironic-neutron-agent is running"
command: systemctl is-active --quiet ironic-neutron-agent command: systemctl is-active --quiet ironic-neutron-agent
when: when: ironic_neutron_agent_enabled|bool
- step|int == 0
- ironic_neutron_agent_enabled.rc == 0
tags: validation tags: validation
- when: step|int == 2
block:
- name: Stop and disable ironic-neutron-agent service - name: Stop and disable ironic-neutron-agent service
when: when: ironic_neutron_agent_enabled|bool
- step|int == 2
- ironic_neutron_agent_enabled.rc == 0
service: name=ironic-neutron-agent state=stopped enabled=no service: name=ironic-neutron-agent state=stopped enabled=no

View File

@@ -112,35 +112,36 @@ outputs:
service: name=iscsid.socket state=stopped enabled=no service: name=iscsid.socket state=stopped enabled=no
when: stat_iscsid_socket.stat.exists when: stat_iscsid_socket.stat.exists
upgrade_tasks: upgrade_tasks:
- name: Check if iscsid service is deployed - when: step|int == 0
tags: common tags: common
block:
- name: Check if iscsid service is deployed
ignore_errors: True ignore_errors: True
command: systemctl is-enabled --quiet iscsid command: systemctl is-enabled --quiet iscsid
register: iscsid_enabled register: iscsid_enabled_result
- name: Set fact iscsid_enabled
set_fact:
iscsid_enabled: "{{ iscsid_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check if iscsid is running" - name: "PreUpgrade step0,validation: Check if iscsid is running"
command: systemctl is-active --quiet iscsid command: systemctl is-active --quiet iscsid
when: when: iscsid_enabled|bool
- step|int == 0
- iscsid_enabled.rc == 0
tags: validation tags: validation
- name: Stop and disable iscsid service
when:
- step|int == 2
- iscsid_enabled.rc == 0
service: name=iscsid state=stopped enabled=no
- name: Check if iscsid.socket service is deployed - name: Check if iscsid.socket service is deployed
tags: common
command: systemctl is-enabled --quiet iscsid.socket command: systemctl is-enabled --quiet iscsid.socket
ignore_errors: True ignore_errors: True
register: iscsid_socket_enabled register: iscsid_socket_enabled_result
- name: Set fact iscsid_socket_enabled
set_fact:
iscsid_socket_enabled: "{{ iscsid_socket_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check if iscsid.socket is running" - name: "PreUpgrade step0,validation: Check if iscsid.socket is running"
command: systemctl is-active --quiet iscsid.socket command: systemctl is-active --quiet iscsid.socket
when: when: iscsid_socket_enabled|bool
- step|int == 0
- iscsid_socket_enabled.rc == 0
tags: validation tags: validation
- when: step|int == 2
block:
- name: Stop and disable iscsid service
when: iscsid_enabled|bool
service: name=iscsid state=stopped enabled=no
- name: Stop and disable iscsid.socket service - name: Stop and disable iscsid.socket service
when: when: iscsid_socket_enabled|bool
- step|int == 2
- iscsid_socket_enabled.rc == 0
service: name=iscsid.socket state=stopped enabled=no service: name=iscsid.socket state=stopped enabled=no

View File

@@ -114,19 +114,22 @@ outputs:
/var/log/containers/keepalived. /var/log/containers/keepalived.
ignore_errors: true ignore_errors: true
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if keepalived is deployed - name: Check if keepalived is deployed
command: systemctl is-enabled --quiet keepalived command: systemctl is-enabled --quiet keepalived
tags: common
ignore_errors: True ignore_errors: True
register: keepalived_enabled register: keepalived_enabled_result
- name: Set fact keepalived_enabled
set_fact:
keepalived_enabled: "{{ keepalived_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service keepalived is running" - name: "PreUpgrade step0,validation: Check service keepalived is running"
command: systemctl is-active --quiet keepalived command: systemctl is-active --quiet keepalived
when: when: keepalived_enabled|bool
- step|int == 0
- keepalived_enabled.rc == 0
tags: validation tags: validation
- when: step|int == 2
block:
- name: Stop and disable keepalived service - name: Stop and disable keepalived service
when:
- step|int == 2
- keepalived_enabled.rc == 0
service: name=keepalived state=stopped enabled=no service: name=keepalived state=stopped enabled=no
when: keepalived_enabled|bool

View File

@@ -138,19 +138,22 @@ outputs:
/var/log/containers/manila and /var/log/containers/httpd/manila-api. /var/log/containers/manila and /var/log/containers/httpd/manila-api.
ignore_errors: true ignore_errors: true
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if manila_api is deployed - name: Check if manila_api is deployed
command: systemctl is-enabled --quiet openstack-manila-api command: systemctl is-enabled --quiet openstack-manila-api
tags: common
ignore_errors: True ignore_errors: True
register: manila_api_enabled register: manila_api_enabled_result
- name: Set fact manila_api_enabled
set_fact:
manila_api_enabled: "{{ manila_api_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service openstack-manila-api is running" - name: "PreUpgrade step0,validation: Check service openstack-manila-api is running"
command: systemctl is-active --quiet openstack-manila-api command: systemctl is-active --quiet openstack-manila-api
when: when: manila_api_enabled|bool
- step|int == 0
- manila_api_enabled.rc == 0
tags: validation tags: validation
- when: step|int == 2
block:
- name: Stop and disable manila_api service - name: Stop and disable manila_api service
when: when: manila_api_enabled|bool
- step|int == 2
- manila_api_enabled.rc == 0
service: name=openstack-manila-api state=stopped enabled=no service: name=openstack-manila-api state=stopped enabled=no

View File

@@ -114,19 +114,22 @@ outputs:
/var/log/containers/manila and /var/log/containers/httpd/manila-api. /var/log/containers/manila and /var/log/containers/httpd/manila-api.
ignore_errors: true ignore_errors: true
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if manila_scheduler is deployed - name: Check if manila_scheduler is deployed
command: systemctl is-enabled --quiet openstack-manila-scheduler command: systemctl is-enabled --quiet openstack-manila-scheduler
tags: common
ignore_errors: True ignore_errors: True
register: manila_scheduler_enabled register: manila_scheduler_enabled_result
- name: Set fact manila_scheduler_enabled
set_fact:
manila_scheduler_enabled: "{{ manila_scheduler_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service openstack-manila-scheduler is running" - name: "PreUpgrade step0,validation: Check service openstack-manila-scheduler is running"
command: systemctl is-active --quiet openstack-manila-scheduler command: systemctl is-active --quiet openstack-manila-scheduler
when: when: manila_scheduler_enabled|bool
- step|int == 0
- manila_scheduler_enabled.rc == 0
tags: validation tags: validation
- when: step|int == 2
block:
- name: Stop and disable manila_scheduler service - name: Stop and disable manila_scheduler service
when: when: manila_scheduler_enabled|bool
- step|int == 2
- manila_scheduler_enabled.rc == 0
service: name=openstack-manila-scheduler state=stopped enabled=no service: name=openstack-manila-scheduler state=stopped enabled=no

View File

@@ -146,19 +146,22 @@ outputs:
path: /etc/ceph path: /etc/ceph
state: directory state: directory
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if manila_share is deployed - name: Check if manila_share is deployed
command: systemctl is-enabled --quiet openstack-manila-share command: systemctl is-enabled --quiet openstack-manila-share
tags: common
ignore_errors: True ignore_errors: True
register: manila_share_enabled register: manila_share_enabled_result
- name: Set fact manila_share_enabled
set_fact:
manila_share_enabled: "{{ manila_share_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service openstack-manila-share is running" - name: "PreUpgrade step0,validation: Check service openstack-manila-share is running"
command: systemctl is-active --quiet openstack-manila-share command: systemctl is-active --quiet openstack-manila-share
when: when: manila_share_enabled|bool
- step|int == 0
- manila_share_enabled.rc == 0
tags: validation tags: validation
- when: step|int == 2
block:
- name: Stop and disable manila_share service - name: Stop and disable manila_share service
when: when: manila_share_enabled|bool
- step|int == 2
- manila_share_enabled.rc == 0
service: name=openstack-manila-share state=stopped enabled=no service: name=openstack-manila-share state=stopped enabled=no

View File

@@ -117,21 +117,24 @@ outputs:
/var/log/containers/memcached. /var/log/containers/memcached.
ignore_errors: true ignore_errors: true
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if memcached is deployed - name: Check if memcached is deployed
command: systemctl is-enabled --quiet memcached command: systemctl is-enabled --quiet memcached
tags: common
ignore_errors: True ignore_errors: True
register: memcached_enabled register: memcached_enabled_result
- name: Set fact memcached_enabled
set_fact:
memcached_enabled: "{{ memcached_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service memcached is running" - name: "PreUpgrade step0,validation: Check service memcached is running"
command: systemctl is-active --quiet memcached command: systemctl is-active --quiet memcached
when: when: memcached_enabled|bool
- step|int == 0
- memcached_enabled.rc == 0
tags: validation tags: validation
- when: step|int == 2
block:
- name: Stop and disable memcached service - name: Stop and disable memcached service
when: when: memcached_enabled|bool
- step|int == 2
- memcached_enabled.rc == 0
service: name=memcached state=stopped enabled=no service: name=memcached state=stopped enabled=no
fast_forward_upgrade_tasks: fast_forward_upgrade_tasks:
- name: Check if memcached is deployed - name: Check if memcached is deployed

View File

@@ -226,21 +226,24 @@ outputs:
/var/log/containers/rabbitmq. /var/log/containers/rabbitmq.
ignore_errors: true ignore_errors: true
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if rabbitmq server is deployed - name: Check if rabbitmq server is deployed
command: systemctl is-enabled --quiet rabbitmq-server command: systemctl is-enabled --quiet rabbitmq-server
tags: common
ignore_errors: True ignore_errors: True
register: rabbitmq_enabled register: rabbitmq_enabled_result
- name: Set fact rabbitmq_enabled
set_fact:
rabbitmq_enabled: "{{ rabbitmq_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service rabbitmq server is running" - name: "PreUpgrade step0,validation: Check service rabbitmq server is running"
command: systemctl is-active --quiet rabbitmq-server command: systemctl is-active --quiet rabbitmq-server
when: when: rabbitmq_enabled|bool
- step|int == 0
- rabbitmq_enabled.rc == 0
tags: validation tags: validation
- when: step|int == 2
block:
- name: Stop and disable rabbitmq service - name: Stop and disable rabbitmq service
when: when: rabbitmq_enabled|bool
- step|int == 2
- rabbitmq_enabled.rc == 0
service: name=rabbitmq-server state=stopped enabled=no service: name=rabbitmq-server state=stopped enabled=no
update_tasks: update_tasks:
# TODO: Are we sure we want to support this. Rolling update # TODO: Are we sure we want to support this. Rolling update

View File

@@ -226,21 +226,24 @@ outputs:
/var/log/containers/rabbitmq. /var/log/containers/rabbitmq.
ignore_errors: true ignore_errors: true
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if rabbitmq server is deployed - name: Check if rabbitmq server is deployed
command: systemctl is-enabled --quiet rabbitmq-server command: systemctl is-enabled --quiet rabbitmq-server
tags: common
ignore_errors: True ignore_errors: True
register: rabbitmq_enabled register: rabbitmq_enabled_result
- name: Set fact rabbitmq_enabled
set_fact:
rabbitmq_enabled: "{{ rabbitmq_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service rabbitmq server is running" - name: "PreUpgrade step0,validation: Check service rabbitmq server is running"
command: systemctl is-active --quiet rabbitmq-server command: systemctl is-active --quiet rabbitmq-server
when: when: rabbitmq_enabled|bool
- step|int == 0
- rabbitmq_enabled.rc == 0
tags: validation tags: validation
- when: step|int == 2
block:
- name: Stop and disable rabbitmq service - name: Stop and disable rabbitmq service
when: when: rabbitmq_enabled|bool
- step|int == 2
- rabbitmq_enabled.rc == 0
service: name=rabbitmq-server state=stopped enabled=no service: name=rabbitmq-server state=stopped enabled=no
update_tasks: update_tasks:
# TODO: Are we sure we want to support this. Rolling update # TODO: Are we sure we want to support this. Rolling update

View File

@@ -121,19 +121,22 @@ outputs:
/var/log/containers/mistral. /var/log/containers/mistral.
ignore_errors: true ignore_errors: true
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if mistral engine is deployed - name: Check if mistral engine is deployed
command: systemctl is-enabled --quiet openstack-mistral-engine command: systemctl is-enabled --quiet openstack-mistral-engine
tags: common
ignore_errors: True ignore_errors: True
register: mistral_engine_enabled register: mistral_engine_enabled_result
- name: Set fact mistral_engine_enabled
set_fact:
mistral_engine_enabled: "{{ mistral_engine_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check if openstack-mistral-engine is running" - name: "PreUpgrade step0,validation: Check if openstack-mistral-engine is running"
command: systemctl is-active --quiet openstack-mistral-engine command: systemctl is-active --quiet openstack-mistral-engine
when: when: mistral_engine_enabled|bool
- step|int == 0
- mistral_engine_enabled.rc == 0
tags: validation tags: validation
- when: step|int == 2
block:
- name: Stop and disable mistral_engine service - name: Stop and disable mistral_engine service
when: when: mistral_engine_enabled|bool
- step|int == 2
- mistral_engine_enabled.rc == 0
service: name=openstack-mistral-engine state=stopped enabled=no service: name=openstack-mistral-engine state=stopped enabled=no

View File

@@ -121,19 +121,22 @@ outputs:
/var/log/containers/mistral. /var/log/containers/mistral.
ignore_errors: true ignore_errors: true
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if mistral-event-engine is deployed - name: Check if mistral-event-engine is deployed
command: systemctl is-enabled --quiet openstack-mistral-event-engine command: systemctl is-enabled --quiet openstack-mistral-event-engine
tags: common
ignore_errors: True ignore_errors: True
register: mistral_event_engine_enabled register: mistral_event_engine_enabled_result
- name: Set fact mistral_event_engine_enabled
set_fact:
mistral_event_engine_enabled: "{{ mistral_event_engine_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check if openstack-mistral-event-engine is running" - name: "PreUpgrade step0,validation: Check if openstack-mistral-event-engine is running"
command: systemctl is-active --quiet openstack-mistral-event-engine command: systemctl is-active --quiet openstack-mistral-event-engine
when: when: mistral_event_engine_enabled|bool
- step|int == 0
- mistral_event_engine_enabled.rc == 0
tags: validation tags: validation
- when: step|int == 2
block:
- name: Stop and disable mistral_event_engine service - name: Stop and disable mistral_event_engine service
when: when: mistral_event_engine_enabled|bool
- step|int == 2
- mistral_event_engine_enabled.rc == 0
service: name=openstack-mistral-event-engine state=stopped enabled=no service: name=openstack-mistral-event-engine state=stopped enabled=no

View File

@@ -129,19 +129,22 @@ outputs:
/var/log/containers/mistral. /var/log/containers/mistral.
ignore_errors: true ignore_errors: true
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if mistral executor is deployed - name: Check if mistral executor is deployed
command: systemctl is-enabled --quiet openstack-mistral-executor command: systemctl is-enabled --quiet openstack-mistral-executor
tags: common
ignore_errors: True ignore_errors: True
register: mistral_executor_enabled register: mistral_executor_enabled_result
- name: Set fact mistral_executor_enabled
set_fact:
mistral_executor_enabled: "{{ mistral_executor_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check if openstack-mistral-executor is running" - name: "PreUpgrade step0,validation: Check if openstack-mistral-executor is running"
command: systemctl is-active --quiet openstack-mistral-executor command: systemctl is-active --quiet openstack-mistral-executor
when: when: mistral_executor_enabled|bool
- step|int == 0
- mistral_executor_enabled.rc == 0
tags: validation tags: validation
- when: step|int == 2
block:
- name: Stop and disable mistral_executor service - name: Stop and disable mistral_executor service
when: when: mistral_executor_enabled|bool
- step|int == 2
- mistral_executor_enabled.rc == 0
service: name=openstack-mistral-executor state=stopped enabled=no service: name=openstack-mistral-executor state=stopped enabled=no

View File

@@ -88,19 +88,22 @@ outputs:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
host_prep_tasks: host_prep_tasks:
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if multipathd is deployed - name: Check if multipathd is deployed
command: systemctl is-enabled --quiet multipathd command: systemctl is-enabled --quiet multipathd
tags: common
ignore_errors: True ignore_errors: True
register: multipathd_enabled register: multipathd_enabled_result
- name: Set fact multipathd_enabled
set_fact:
multipathd_enabled: "{{ multipathd_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service multipathd is running" - name: "PreUpgrade step0,validation: Check service multipathd is running"
command: systemctl is-active --quiet multipathd command: systemctl is-active --quiet multipathd
when: when: multipathd_enabled|bool
- step|int == 0
- multipathd_enabled.rc == 0
tags: validation tags: validation
- when: step|int == 2
block:
- name: Stop and disable multipathd service - name: Stop and disable multipathd service
when: when: multipathd_enabled|bool
- step|int == 2
- multipathd_enabled.rc == 0
service: name=multipathd state=stopped enabled=no service: name=multipathd state=stopped enabled=no

View File

@@ -201,32 +201,32 @@ outputs:
- {} - {}
host_prep_tasks: {get_attr: [NeutronLogging, host_prep_tasks]} host_prep_tasks: {get_attr: [NeutronLogging, host_prep_tasks]}
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if neutron_server is deployed - name: Check if neutron_server is deployed
command: systemctl is-enabled --quiet neutron-server command: systemctl is-enabled --quiet neutron-server
tags: common
ignore_errors: True ignore_errors: True
register: neutron_server_enabled register: neutron_server_enabled_result
- name: Set fact neutron_server_enabled
set_fact:
neutron_server_enabled: "{{ neutron_server_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service neutron-server is running" - name: "PreUpgrade step0,validation: Check service neutron-server is running"
command: systemctl is-active --quiet neutron-server command: systemctl is-active --quiet neutron-server
when: when: neutron_server_enabled|bool
- step|int == 0
- neutron_server_enabled.rc == 0
tags: validation tags: validation
- when: step|int == 2
block:
- name: Stop and disable neutron_api service - name: Stop and disable neutron_api service
when: when: neutron_server_enabled|bool
- step|int == 2
- neutron_server_enabled.rc == 0
service: name=neutron-server state=stopped enabled=no service: name=neutron-server state=stopped enabled=no
- name: Set fact for removal of openstack-neutron package - name: Set fact for removal of openstack-neutron package
when: step|int == 2
set_fact: set_fact:
remove_neutron_package: {get_param: UpgradeRemoveUnusedPackages} remove_neutron_package: {get_param: UpgradeRemoveUnusedPackages}
- name: Remove openstack-neutron package if operator requests it - name: Remove openstack-neutron package if operator requests it
yum: name=openstack-neutron state=removed yum: name=openstack-neutron state=removed
ignore_errors: True ignore_errors: True
when: when: remove_neutron_package|bool
- step|int == 2
- remove_neutron_package|bool
metadata_settings: metadata_settings:
get_attr: [NeutronBase, role_data, metadata_settings] get_attr: [NeutronBase, role_data, metadata_settings]
fast_forward_upgrade_tasks: fast_forward_upgrade_tasks:

View File

@@ -232,21 +232,24 @@ outputs:
path: /var/lib/neutron path: /var/lib/neutron
state: directory state: directory
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if neutron_dhcp_agent is deployed - name: Check if neutron_dhcp_agent is deployed
command: systemctl is-enabled --quiet neutron-dhcp-agent command: systemctl is-enabled --quiet neutron-dhcp-agent
tags: common
ignore_errors: True ignore_errors: True
register: neutron_dhcp_agent_enabled register: neutron_dhcp_agent_enabled_result
- name: Set fact neutron_dhcp_agent_enabled
set_fact:
neutron_dhcp_agent_enabled: "{{ neutron_dhcp_agent_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service neutron-dhcp-agent is running" - name: "PreUpgrade step0,validation: Check service neutron-dhcp-agent is running"
command: systemctl is-active --quiet neutron-dhcp-agent command: systemctl is-active --quiet neutron-dhcp-agent
when: when: neutron_dhcp_agent_enabled|bool
- step|int == 0
- neutron_dhcp_agent_enabled.rc == 0
tags: validation tags: validation
- when: step|int == 2
block:
- name: Stop and disable neutron_dhcp service - name: Stop and disable neutron_dhcp service
when: when: neutron_dhcp_agent_enabled|bool
- step|int == 2
- neutron_dhcp_agent_enabled.rc == 0
service: name=neutron-dhcp-agent state=stopped enabled=no service: name=neutron-dhcp-agent state=stopped enabled=no
fast_forward_upgrade_tasks: fast_forward_upgrade_tasks:
- name: Check if neutron_dhcp_agent is deployed - name: Check if neutron_dhcp_agent is deployed

View File

@@ -230,21 +230,24 @@ outputs:
path: /var/lib/neutron path: /var/lib/neutron
state: directory state: directory
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if neutron_l3_agent is deployed - name: Check if neutron_l3_agent is deployed
command: systemctl is-enabled --quiet neutron-l3-agent command: systemctl is-enabled --quiet neutron-l3-agent
tags: common
ignore_errors: True ignore_errors: True
register: neutron_l3_agent_enabled register: neutron_l3_agent_enabled_result
- name: Set fact neutron_l3_agent_enabled
set_fact:
neutron_l3_agent_enabled: "{{ neutron_l3_agent_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service neutron-l3-agent is running" - name: "PreUpgrade step0,validation: Check service neutron-l3-agent is running"
command: systemctl is-active --quiet neutron-l3-agent command: systemctl is-active --quiet neutron-l3-agent
when: when: neutron_l3_agent_enabled|bool
- step|int == 0
- neutron_l3_agent_enabled.rc == 0
tags: validation tags: validation
- when: step|int == 2
block:
- name: Stop and disable neutron_l3 service - name: Stop and disable neutron_l3 service
when: when: neutron_l3_agent_enabled|bool
- step|int == 2
- neutron_l3_agent_enabled.rc == 0
service: name=neutron-l3-agent state=stopped enabled=no service: name=neutron-l3-agent state=stopped enabled=no
fast_forward_upgrade_tasks: fast_forward_upgrade_tasks:
- name: Check if neutron_l3_agent is deployed - name: Check if neutron_l3_agent is deployed

View File

@@ -138,21 +138,24 @@ outputs:
path: /var/lib/neutron path: /var/lib/neutron
state: directory state: directory
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if neutron_metadata_agent is deployed - name: Check if neutron_metadata_agent is deployed
command: systemctl is-enabled --quiet neutron-metadata-agent command: systemctl is-enabled --quiet neutron-metadata-agent
tags: common
ignore_errors: True ignore_errors: True
register: neutron_metadata_agent_enabled register: neutron_metadata_agent_enabled_result
- name: Set fact neutron_metadata_agent_enabled
set_fact:
neutron_metadata_agent_enabled: "{{ neutron_metadata_agent_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service neutron-metadata-agent is running" - name: "PreUpgrade step0,validation: Check service neutron-metadata-agent is running"
command: systemctl is-active --quiet neutron-metadata-agent command: systemctl is-active --quiet neutron-metadata-agent
when: when: neutron_metadata_agent_enabled|bool
- step|int == 0
- neutron_metadata_agent_enabled.rc == 0
tags: validation tags: validation
- when: step|int == 2
block:
- name: Stop and disable neutron_metadata service - name: Stop and disable neutron_metadata service
when: when: neutron_metadata_agent_enabled|bool
- step|int == 2
- neutron_metadata_agent_enabled.rc == 0
service: name=neutron-metadata-agent state=stopped enabled=no service: name=neutron-metadata-agent state=stopped enabled=no
fast_forward_upgrade_tasks: fast_forward_upgrade_tasks:
- name: Check if neutron_metadata_agent is deployed - name: Check if neutron_metadata_agent is deployed

View File

@@ -185,32 +185,32 @@ outputs:
list_concat: list_concat:
- get_attr: [NeutronOvsAgentBase, role_data, ovs_upgrade_tasks] - get_attr: [NeutronOvsAgentBase, role_data, ovs_upgrade_tasks]
- -
- when: step|int == 0
tags: common
block:
- name: Check if neutron_ovs_agent is deployed - name: Check if neutron_ovs_agent is deployed
command: systemctl is-enabled --quiet neutron-openvswitch-agent command: systemctl is-enabled --quiet neutron-openvswitch-agent
tags: common
ignore_errors: True ignore_errors: True
register: neutron_ovs_agent_enabled register: neutron_ovs_agent_enabled_result
- name: Set fact neutron_ovs_agent_enabled
set_fact:
neutron_ovs_agent_enabled: "{{ neutron_ovs_agent_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service neutron-openvswitch-agent is running" - name: "PreUpgrade step0,validation: Check service neutron-openvswitch-agent is running"
command: systemctl is-active --quiet neutron-openvswitch-agent command: systemctl is-active --quiet neutron-openvswitch-agent
when: when: neutron_ovs_agent_enabled|bool
- step|int == 0
- neutron_ovs_agent_enabled.rc == 0
tags: validation tags: validation
- when: step|int == 2
block:
- name: Stop and disable neutron_ovs_agent service - name: Stop and disable neutron_ovs_agent service
when: when: neutron_ovs_agent_enabled|bool
- step|int == 2
- neutron_ovs_agent_enabled.rc == 0
service: name=neutron-openvswitch-agent state=stopped enabled=no service: name=neutron-openvswitch-agent state=stopped enabled=no
- name: Set fact for removal of openstack-neutron-openvswitch package - name: Set fact for removal of openstack-neutron-openvswitch package
when: step|int == 2
set_fact: set_fact:
remove_neutron_openvswitch_package: {get_param: UpgradeRemoveUnusedPackages} remove_neutron_openvswitch_package: {get_param: UpgradeRemoveUnusedPackages}
- name: Remove openstack-neutron-openvswitch package if operator requests it - name: Remove openstack-neutron-openvswitch package if operator requests it
yum: name=openstack-neutron-openvswitch state=removed yum: name=openstack-neutron-openvswitch state=removed
ignore_errors: True ignore_errors: True
when: when: remove_neutron_openvswitch_package|bool
- step|int == 2
- remove_neutron_openvswitch_package|bool
update_tasks: update_tasks:
# puppetlabs-firewall manages security rules via Puppet but make the rules # puppetlabs-firewall manages security rules via Puppet but make the rules
# consistent by default. Since Neutron also creates some rules, we don't # consistent by default. Since Neutron also creates some rules, we don't

View File

@@ -113,19 +113,22 @@ outputs:
metadata_settings: metadata_settings:
get_attr: [NeutronSriovAgentBase, role_data, metadata_settings] get_attr: [NeutronSriovAgentBase, role_data, metadata_settings]
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if neutron_sriov_nic_agent is deployed - name: Check if neutron_sriov_nic_agent is deployed
command: systemctl is-enabled --quiet neutron-sriov-nic-agent command: systemctl is-enabled --quiet neutron-sriov-nic-agent
tags: common
ignore_errors: True ignore_errors: True
register: neutron_sriov_nic_agent_enabled register: neutron_sriov_nic_agent_enabled_result
- name: Set fact neutron_sriov_nic_agent_enabled
set_fact:
neutron_sriov_nic_agent_enabled: "{{ neutron_sriov_nic_agent_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service neutron-sriov-nic-agent is running" - name: "PreUpgrade step0,validation: Check service neutron-sriov-nic-agent is running"
command: systemctl is-active --quiet neutron-sriov-nic-agent command: systemctl is-active --quiet neutron-sriov-nic-agent
when: when: neutron_sriov_nic_agent_enabled|bool
- step|int == 0
- neutron_sriov_nic_agent_enabled.rc == 0
tags: validation tags: validation
- when: step|int == 2
block:
- name: Stop and disable neutron_sriov_agent service - name: Stop and disable neutron_sriov_agent service
when: when: neutron_sriov_nic_agent_enabled|bool
- step|int == 2
- neutron_sriov_nic_agent_enabled.rc == 0
service: name=neutron-sriov-nic-agent state=stopped enabled=no service: name=neutron-sriov-nic-agent state=stopped enabled=no

View File

@@ -250,39 +250,40 @@ outputs:
file: path=/var/lib/nova/instanceha/enabled state=touch file: path=/var/lib/nova/instanceha/enabled state=touch
when: iha_nodes.stdout|lower | search('"'+ansible_hostname|lower+'"') when: iha_nodes.stdout|lower | search('"'+ansible_hostname|lower+'"')
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if nova_compute is deployed - name: Check if nova_compute is deployed
command: systemctl is-enabled --quiet openstack-nova-compute command: systemctl is-enabled --quiet openstack-nova-compute
tags: common
ignore_errors: True ignore_errors: True
register: nova_compute_enabled register: nova_compute_enabled_result
- name: Set fact nova_compute_enabled
set_fact:
nova_compute_enabled: "{{ nova_compute_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service openstack-nova-compute is running"
command: systemctl is-active --quiet openstack-nova-compute
tags: validation
when: nova_compute_enabled|bool
- when: step|int == 1
block:
- name: Set compute upgrade level to auto - name: Set compute upgrade level to auto
when: step|int == 1
ini_file: ini_file:
str_replace: str_replace:
template: "dest=/etc/nova/nova.conf section=upgrade_levels option=compute value=LEVEL" template: "dest=/etc/nova/nova.conf section=upgrade_levels option=compute value=LEVEL"
params: params:
LEVEL: {get_param: UpgradeLevelNovaCompute} LEVEL: {get_param: UpgradeLevelNovaCompute}
- name: "PreUpgrade step0,validation: Check service openstack-nova-compute is running" - when: step|int == 2
command: systemctl is-active --quiet openstack-nova-compute block:
tags: validation
when:
- step|int == 0
- nova_compute_enabled.rc == 0
- name: Stop and disable nova-compute service - name: Stop and disable nova-compute service
when: when: nova_compute_enabled|bool
- step|int == 2
- nova_compute_enabled.rc == 0
service: name=openstack-nova-compute state=stopped enabled=no service: name=openstack-nova-compute state=stopped enabled=no
- name: Set fact for removal of openstack-nova-compute package - name: Set fact for removal of openstack-nova-compute package
when: step|int == 2
set_fact: set_fact:
remove_nova_compute_package: {get_param: UpgradeRemoveUnusedPackages} remove_nova_compute_package: {get_param: UpgradeRemoveUnusedPackages}
- name: Remove openstack-nova-compute package if operator requests it - name: Remove openstack-nova-compute package if operator requests it
yum: name=openstack-nova-compute state=removed yum: name=openstack-nova-compute state=removed
ignore_errors: True ignore_errors: True
when: when: remove_nova_compute_package|bool
- step|int == 2
- remove_nova_compute_package|bool
fast_forward_upgrade_tasks: fast_forward_upgrade_tasks:
- name: Check if nova-compute is deployed - name: Check if nova-compute is deployed
command: systemctl is-enabled --quiet openstack-nova-compute command: systemctl is-enabled --quiet openstack-nova-compute

View File

@@ -140,39 +140,40 @@ outputs:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
host_prep_tasks: {get_attr: [NovaLogging, host_prep_tasks]} host_prep_tasks: {get_attr: [NovaLogging, host_prep_tasks]}
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if nova_conductor is deployed - name: Check if nova_conductor is deployed
command: systemctl is-enabled --quiet openstack-nova-conductor command: systemctl is-enabled --quiet openstack-nova-conductor
tags: common
ignore_errors: True ignore_errors: True
register: nova_conductor_enabled register: nova_conductor_enabled_result
- name: Set fact nova_conductor_enabled
set_fact:
nova_conductor_enabled: "{{ nova_conductor_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service openstack-nova-conductor is running"
command: systemctl is-active --quiet openstack-nova-conductor
tags: validation
when: nova_conductor_enabled|bool
- when: step|int == 1
block:
- name: Set compute upgrade level to auto - name: Set compute upgrade level to auto
when: step|int == 1
ini_file: ini_file:
str_replace: str_replace:
template: "dest=/etc/nova/nova.conf section=upgrade_levels option=compute value=LEVEL" template: "dest=/etc/nova/nova.conf section=upgrade_levels option=compute value=LEVEL"
params: params:
LEVEL: {get_param: UpgradeLevelNovaCompute} LEVEL: {get_param: UpgradeLevelNovaCompute}
- name: "PreUpgrade step0,validation: Check service openstack-nova-conductor is running" - when: step|int == 2
command: systemctl is-active --quiet openstack-nova-conductor block:
tags: validation
when:
- step|int == 0
- nova_conductor_enabled.rc == 0
- name: Stop and disable nova_conductor service - name: Stop and disable nova_conductor service
when: when: nova_conductor_enabled|bool
- step|int == 2
- nova_conductor_enabled.rc == 0
service: name=openstack-nova-conductor state=stopped enabled=no service: name=openstack-nova-conductor state=stopped enabled=no
- name: Set fact for removal of openstack-nova-conductor package - name: Set fact for removal of openstack-nova-conductor package
when: step|int == 2
set_fact: set_fact:
remove_nova_conductor_package: {get_param: UpgradeRemoveUnusedPackages} remove_nova_conductor_package: {get_param: UpgradeRemoveUnusedPackages}
- name: Remove openstack-nova-conductor package if operator requests it - name: Remove openstack-nova-conductor package if operator requests it
yum: name=openstack-nova-conductor state=removed yum: name=openstack-nova-conductor state=removed
ignore_errors: True ignore_errors: True
when: when: remove_nova_conductor_package|bool
- step|int == 2
- remove_nova_conductor_package|bool
fast_forward_upgrade_tasks: fast_forward_upgrade_tasks:
- name: Check if nova_conductor is deployed - name: Check if nova_conductor is deployed
command: systemctl is-enabled --quiet openstack-nova-conductor command: systemctl is-enabled --quiet openstack-nova-conductor

View File

@@ -135,32 +135,32 @@ outputs:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
host_prep_tasks: {get_attr: [NovaLogging, host_prep_tasks]} host_prep_tasks: {get_attr: [NovaLogging, host_prep_tasks]}
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if nova_consoleauth is deployed - name: Check if nova_consoleauth is deployed
command: systemctl is-enabled --quiet openstack-nova-consoleauth command: systemctl is-enabled --quiet openstack-nova-consoleauth
tags: common
ignore_errors: True ignore_errors: True
register: nova_consoleauth_enabled register: nova_consoleauth_enabled_result
- name: Set fact nova_consoleauth_enabled
set_fact:
nova_consoleauth_enabled: "{{ nova_consoleauth_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service openstack-nova-consoleauth is running" - name: "PreUpgrade step0,validation: Check service openstack-nova-consoleauth is running"
command: systemctl is-active --quiet openstack-nova-consoleauth command: systemctl is-active --quiet openstack-nova-consoleauth
tags: validation tags: validation
when: when: nova_consoleauth_enabled|bool
- step|int == 0 - when: step|int == 2
- nova_consoleauth_enabled.rc == 0 block:
- name: Stop and disable nova_consoleauth service - name: Stop and disable nova_consoleauth service
when: when: nova_consoleauth_enabled|bool
- step|int == 2
- nova_consoleauth_enabled.rc == 0
service: name=openstack-nova-consoleauth state=stopped enabled=no service: name=openstack-nova-consoleauth state=stopped enabled=no
- name: Set fact for removal of openstack-nova-console package - name: Set fact for removal of openstack-nova-console package
when: step|int == 2
set_fact: set_fact:
remove_nova_console_package: {get_param: UpgradeRemoveUnusedPackages} remove_nova_console_package: {get_param: UpgradeRemoveUnusedPackages}
- name: Remove openstack-nova-console package if operator requests it - name: Remove openstack-nova-console package if operator requests it
yum: name=openstack-nova-console state=removed yum: name=openstack-nova-console state=removed
ignore_errors: True ignore_errors: True
when: when: remove_nova_console_package|bool
- step|int == 2
- remove_nova_console_package|bool
fast_forward_upgrade_tasks: fast_forward_upgrade_tasks:
- name: Check if nova_consoleauth is deployed - name: Check if nova_consoleauth is deployed
command: systemctl is-active --quiet openstack-nova-consoleauth command: systemctl is-active --quiet openstack-nova-consoleauth

View File

@@ -135,32 +135,34 @@ outputs:
/var/log/containers/nova and /var/log/containers/httpd/nova-*. /var/log/containers/nova and /var/log/containers/httpd/nova-*.
ignore_errors: true ignore_errors: true
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if nova ironic is deployed - name: Check if nova ironic is deployed
command: systemctl is-enabled --quiet openstack-nova-compute command: systemctl is-enabled --quiet openstack-nova-compute
tags: common
ignore_errors: True ignore_errors: True
register: nova_ironic_enabled register: nova_ironic_enabled_result
- name: Set fact nova_ironic_enabled
set_fact:
nova_ironic_enabled: "{{ nova_ironic_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service openstack-nova-compute is running" - name: "PreUpgrade step0,validation: Check service openstack-nova-compute is running"
command: systemctl is-active --quiet openstack-nova-compute command: systemctl is-active --quiet openstack-nova-compute
tags: validation tags: validation
when: when: nova_ironic_enabled|bool
- step|int == 0 - when: step|int == 2
- nova_ironic_enabled.rc == 0 block:
- name: Stop and disable nova-compute service - name: Stop and disable nova-compute service
when: when: nova_ironic_enabled|bool
- step|int == 2
- nova_ironic_enabled.rc == 0
service: name=openstack-nova-compute state=stopped enabled=no service: name=openstack-nova-compute state=stopped enabled=no
- when: step|int == 3
block:
- name: Set fact for removal of openstack-nova-compute package - name: Set fact for removal of openstack-nova-compute package
when: step|int == 3
set_fact: set_fact:
remove_nova_compute_package: {get_param: UpgradeRemoveUnusedPackages} remove_nova_compute_package: {get_param: UpgradeRemoveUnusedPackages}
- name: Remove openstack-nova-compute package if operator requests it - name: Remove openstack-nova-compute package if operator requests it
yum: name=openstack-nova-compute state=removed yum: name=openstack-nova-compute state=removed
ignore_errors: True ignore_errors: True
when: when: remove_nova_compute_package|bool
- step|int == 3
- remove_nova_compute_package|bool
fast_forward_upgrade_tasks: fast_forward_upgrade_tasks:
- name: Check if nova ironic is deployed - name: Check if nova ironic is deployed
command: systemctl is-enabled --quiet openstack-nova-compute command: systemctl is-enabled --quiet openstack-nova-compute

View File

@@ -444,19 +444,22 @@ outputs:
metadata_settings: metadata_settings:
get_attr: [NovaLibvirtBase, role_data, metadata_settings] get_attr: [NovaLibvirtBase, role_data, metadata_settings]
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if nova_libvirt is deployed - name: Check if nova_libvirt is deployed
command: systemctl is-enabled --quiet libvirtd command: systemctl is-enabled --quiet libvirtd
tags: common
ignore_errors: True ignore_errors: True
register: nova_libvirt_enabled register: nova_libvirt_enabled_result
- name: Set fact nova_libvirt_enabled
set_fact:
nova_libvirt_enabled: "{{ nova_libvirt_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service libvirtd is running" - name: "PreUpgrade step0,validation: Check service libvirtd is running"
command: systemctl is-active --quiet libvirtd command: systemctl is-active --quiet libvirtd
tags: validation tags: validation
when: when: nova_libvirt_enabled|bool
- step|int == 0 - when: step|int == 2
- nova_libvirt_enabled.rc == 0 block:
- name: Stop and disable libvirtd service - name: Stop and disable libvirtd service
when: when: nova_libvirt_enabled|bool
- step|int == 2
- nova_libvirt_enabled.rc == 0
service: name=libvirtd state=stopped enabled=no service: name=libvirtd state=stopped enabled=no

View File

@@ -131,21 +131,24 @@ outputs:
get_attr: [NovaMetadataBase, role_data, metadata_settings] get_attr: [NovaMetadataBase, role_data, metadata_settings]
host_prep_tasks: {get_attr: [NovaLogging, host_prep_tasks]} host_prep_tasks: {get_attr: [NovaLogging, host_prep_tasks]}
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if nova_api_metadata is deployed - name: Check if nova_api_metadata is deployed
command: systemctl is-enabled --quiet openstack-nova-api command: systemctl is-enabled --quiet openstack-nova-api
tags: common
ignore_errors: True ignore_errors: True
register: nova_metadata_enabled register: nova_metadata_enabled_result
- name: Set fact nova_metadata_enabled
set_fact:
nova_metadata_enabled: "{{ nova_metadata_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service openstack-nova-api is running" - name: "PreUpgrade step0,validation: Check service openstack-nova-api is running"
command: systemctl is-active --quiet openstack-nova-api command: systemctl is-active --quiet openstack-nova-api
tags: validation tags: validation
when: when: nova_metadata_enabled|bool
- step|int == 0 - when: step|int == 2
- nova_metadata_enabled.rc == 0 block:
- name: Stop and disable nova_api service - name: Stop and disable nova_api service
when: when: nova_metadata_enabled|bool
- step|int == 2
- nova_metadata_enabled.rc == 0
service: name=openstack-nova-api state=stopped enabled=no service: name=openstack-nova-api state=stopped enabled=no
fast_forward_upgrade_tasks: fast_forward_upgrade_tasks:
- name: Check if nova_api_metadata is deployed - name: Check if nova_api_metadata is deployed

View File

@@ -136,32 +136,32 @@ outputs:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
host_prep_tasks: {get_attr: [NovaLogging, host_prep_tasks]} host_prep_tasks: {get_attr: [NovaLogging, host_prep_tasks]}
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if nova_scheduler is deployed - name: Check if nova_scheduler is deployed
command: systemctl is-enabled --quiet openstack-nova-scheduler command: systemctl is-enabled --quiet openstack-nova-scheduler
tags: common
ignore_errors: True ignore_errors: True
register: nova_scheduler_enabled register: nova_scheduler_enabled_result
- name: Set fact nova_scheduler_enabled
set_fact:
nova_scheduler_enabled: "{{ nova_scheduler_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service openstack-nova-scheduler is running" - name: "PreUpgrade step0,validation: Check service openstack-nova-scheduler is running"
command: systemctl is-active --quiet openstack-nova-scheduler command: systemctl is-active --quiet openstack-nova-scheduler
tags: validation tags: validation
when: when: nova_scheduler_enabled|bool
- step|int == 0 - when: step|int == 2
- nova_scheduler_enabled.rc == 0 block:
- name: Stop and disable nova_scheduler service - name: Stop and disable nova_scheduler service
when: when: nova_scheduler_enabled|bool
- step|int == 2
- nova_scheduler_enabled.rc == 0
service: name=openstack-nova-scheduler state=stopped enabled=no service: name=openstack-nova-scheduler state=stopped enabled=no
- name: Set fact for removal of openstack-nova-scheduler package - name: Set fact for removal of openstack-nova-scheduler package
when: step|int == 2
set_fact: set_fact:
remove_nova_scheduler_package: {get_param: UpgradeRemoveUnusedPackages} remove_nova_scheduler_package: {get_param: UpgradeRemoveUnusedPackages}
- name: Remove openstack-nova-scheduler package if operator requests it - name: Remove openstack-nova-scheduler package if operator requests it
yum: name=openstack-nova-scheduler state=removed yum: name=openstack-nova-scheduler state=removed
ignore_errors: True ignore_errors: True
when: when: remove_nova_scheduler_package|bool
- step|int == 2
- remove_nova_scheduler_package|bool
fast_forward_upgrade_tasks: fast_forward_upgrade_tasks:
- name: Check if nova_scheduler is deployed - name: Check if nova_scheduler is deployed
command: systemctl is-enabled --quiet openstack-nova-scheduler command: systemctl is-enabled --quiet openstack-nova-scheduler

View File

@@ -192,32 +192,32 @@ outputs:
get_attr: [NovaVncProxyPuppetBase, role_data, metadata_settings] get_attr: [NovaVncProxyPuppetBase, role_data, metadata_settings]
host_prep_tasks: {get_attr: [NovaLogging, host_prep_tasks]} host_prep_tasks: {get_attr: [NovaLogging, host_prep_tasks]}
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if nova vncproxy is deployed - name: Check if nova vncproxy is deployed
command: systemctl is-enabled --quiet openstack-nova-novncproxy command: systemctl is-enabled --quiet openstack-nova-novncproxy
tags: common
ignore_errors: True ignore_errors: True
register: nova_vncproxy_enabled register: nova_vncproxy_enabled_result
- name: Set fact nova_vncproxy_enabled
set_fact:
nova_vncproxy_enabled: "{{ nova_vncproxy_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service openstack-nova-novncproxy is running" - name: "PreUpgrade step0,validation: Check service openstack-nova-novncproxy is running"
command: systemctl is-active --quiet openstack-nova-novncproxy command: systemctl is-active --quiet openstack-nova-novncproxy
tags: validation tags: validation
when: when: nova_vncproxy_enabled|bool
- step|int == 0 - when: step|int == 2
- nova_vncproxy_enabled.rc == 0 block:
- name: Stop and disable nova_vnc_proxy service - name: Stop and disable nova_vnc_proxy service
when: when: nova_vncproxy_enabled|bool
- step|int == 2
- nova_vncproxy_enabled.rc == 0
service: name=openstack-nova-novncproxy state=stopped enabled=no service: name=openstack-nova-novncproxy state=stopped enabled=no
- name: Set fact for removal of openstack-nova-novncproxy package - name: Set fact for removal of openstack-nova-novncproxy package
when: step|int == 2
set_fact: set_fact:
remove_nova_novncproxy_package: {get_param: UpgradeRemoveUnusedPackages} remove_nova_novncproxy_package: {get_param: UpgradeRemoveUnusedPackages}
- name: Remove openstack-nova-novncproxy package if operator requests it - name: Remove openstack-nova-novncproxy package if operator requests it
yum: name=openstack-nova-novncproxy state=removed yum: name=openstack-nova-novncproxy state=removed
ignore_errors: True ignore_errors: True
when: when: remove_nova_novncproxy_package|bool
- step|int == 2
- remove_nova_novncproxy_package|bool
fast_forward_upgrade_tasks: fast_forward_upgrade_tasks:
- name: Check if nova vncproxy is deployed - name: Check if nova vncproxy is deployed
command: systemctl is-enabled --quiet openstack-nova-novncproxy command: systemctl is-enabled --quiet openstack-nova-novncproxy

View File

@@ -137,29 +137,29 @@ outputs:
/var/log/containers/octavia and /var/log/containers/httpd/octavia-api. /var/log/containers/octavia and /var/log/containers/httpd/octavia-api.
ignore_errors: true ignore_errors: true
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if octavia_health_manager is deployed - name: Check if octavia_health_manager is deployed
common: systemctl is-enabled --quiet openstack-octavia-health-manager common: systemctl is-enabled --quiet openstack-octavia-health-manager
tags: common
ignore_errors: True ignore_errors: True
register: octavia_health_enabled register: octavia_health_enabled_result
- name: Set fact octavia_health_enabled
set_fact:
octavia_health_enabled: "{{ octavia_health_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service openstack-octavia-health-manager is running" - name: "PreUpgrade step0,validation: Check service openstack-octavia-health-manager is running"
command: systemctl is-active --quiet openstack-octavia-health-manager command: systemctl is-active --quiet openstack-octavia-health-manager
tags: validation tags: validation
when: when: octavia_health_enabled|bool
- step|int == 0 - when: step|int == 2
- octavia_health_enabled.rc == 0 block:
- name: Stop and disable octavia_health_manager service - name: Stop and disable octavia_health_manager service
when: when: octavia_health_enabled|bool
- step|int == 2
- octavia_health_enabled.rc == 0
service: name=openstack-octavia-health-manager state=stopped enabled=no service: name=openstack-octavia-health-manager state=stopped enabled=no
- name: Set fact for removal of openstack-octavia-health-manager package - name: Set fact for removal of openstack-octavia-health-manager package
when: step|int == 2
set_fact: set_fact:
remove_octavia_health_manager_package: {get_param: UpgradeRemoveUnusedPackages} remove_octavia_health_manager_package: {get_param: UpgradeRemoveUnusedPackages}
- name: Remove openstack-octavia-health-manager package if operator requests it - name: Remove openstack-octavia-health-manager package if operator requests it
yum: name=openstack-octavia-health-manager state=removed yum: name=openstack-octavia-health-manager state=removed
ignore_errors: True ignore_errors: True
when: when: remove_octavia_health_manager_package|bool
- step|int == 2
- remove_octavia_health_manager_package|bool

View File

@@ -133,19 +133,22 @@ outputs:
/var/log/containers/octavia and /var/log/containers/httpd/octavia-api. /var/log/containers/octavia and /var/log/containers/httpd/octavia-api.
ignore_errors: true ignore_errors: true
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if octavia_housekeeping is deployed - name: Check if octavia_housekeeping is deployed
common: systemctl is-enabled --quiet openstack-octavia-housekeeping common: systemctl is-enabled --quiet openstack-octavia-housekeeping
tags: common
ignore_errors: True ignore_errors: True
register: octavia_housekeeping_enabled register: octavia_housekeeping_enabled_result
- name: Set fact octavia_housekeeping_enabled
set_fact:
octavia_housekeeping_enabled: "{{ octavia_housekeeping_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service openstack-octavia-housekeeping is running" - name: "PreUpgrade step0,validation: Check service openstack-octavia-housekeeping is running"
command: systemctl is-active --quiet openstack-octavia-housekeeping command: systemctl is-active --quiet openstack-octavia-housekeeping
when: when: octavia_housekeeping_enabled|bool
- step|int == 0
- octavia_housekeeping_enabled.rc == 0
tags: validation tags: validation
- when: step|int == 2
block:
- name: Stop and disable octavia_housekeeping service - name: Stop and disable octavia_housekeeping service
when: when: octavia_housekeeping_enabled|bool
- step|int == 2
- octavia_housekeeping_enabled.rc == 0
service: name=openstack-octavia-housekeeping state=stopped enabled=no service: name=openstack-octavia-housekeeping state=stopped enabled=no

View File

@@ -156,19 +156,22 @@ outputs:
- openssl - openssl
when: {get_param: EnablePackageInstall} when: {get_param: EnablePackageInstall}
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if octavia_worker is deployed - name: Check if octavia_worker is deployed
common: systemctl is-enabled --quiet openstack-octavia-worker common: systemctl is-enabled --quiet openstack-octavia-worker
tags: common
ignore_errors: True ignore_errors: True
register: octavia_worker_enabled register: octavia_worker_enabled_result
- name: Set fact octavia_worker_enabled
set_fact:
octavia_worker_enabled: "{{ octavia_worker_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service openstack-octavia-worker is running" - name: "PreUpgrade step0,validation: Check service openstack-octavia-worker is running"
command: systemctl is-active --quiet openstack-octavia-worker command: systemctl is-active --quiet openstack-octavia-worker
when: when: octavia_worker_enabled|bool
- step|int == 0
- octavia_worker_enabled.rc == 0
tags: validation tags: validation
- when: step|int == 2
block:
- name: Stop and disable octavia_worker service - name: Stop and disable octavia_worker service
when: when: octavia_worker_enabled|bool
- step|int == 2
- octavia_worker_enabled.rc == 0
service: name=openstack-octavia-worker state=stopped enabled=no service: name=openstack-octavia-worker state=stopped enabled=no

View File

@@ -162,21 +162,24 @@ outputs:
Logs from opendaylight container can be found by running "sudo docker logs opendaylight_api" and are also available in /var/log/containers/opendaylight/karaf.log Logs from opendaylight container can be found by running "sudo docker logs opendaylight_api" and are also available in /var/log/containers/opendaylight/karaf.log
ignore_errors: true ignore_errors: true
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if opendaylight is deployed - name: Check if opendaylight is deployed
command: systemctl is-enabled --quiet opendaylight command: systemctl is-enabled --quiet opendaylight
tags: common
ignore_errors: True ignore_errors: True
register: opendaylight_enabled register: opendaylight_enabled_result
- name: Set fact opendaylight_enabled
set_fact:
opendaylight_enabled: "{{ opendaylight_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service opendaylight is running" - name: "PreUpgrade step0,validation: Check service opendaylight is running"
command: systemctl is-active --quiet opendaylight command: systemctl is-active --quiet opendaylight
when: when: opendaylight_enabled|bool
- step|int == 0
- opendaylight_enabled.rc == 0
tags: validation tags: validation
- when: step|int == 2
block:
- name: Stop and disable opendaylight_api service - name: Stop and disable opendaylight_api service
when: when: opendaylight_enabled|bool
- step|int == 2
- opendaylight_enabled.rc == 0
service: name=opendaylight state=stopped enabled=no service: name=opendaylight state=stopped enabled=no
# Containerized deployment upgrade steps # Containerized deployment upgrade steps
- name: ODL container L2 update and upgrade tasks - name: ODL container L2 update and upgrade tasks

View File

@@ -131,19 +131,22 @@ outputs:
/var/log/containers/openvswitch. /var/log/containers/openvswitch.
ignore_errors: true ignore_errors: true
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if ovn_controller is deployed - name: Check if ovn_controller is deployed
command: systemctl is-enabled --quiet ovn-controller command: systemctl is-enabled --quiet ovn-controller
tags: common
ignore_errors: True ignore_errors: True
register: ovn_controller_enabled register: ovn_controller_enabled_result
- name: Set fact ovn_controller_enabled
set_fact:
ovn_controller_enabled: "{{ ovn_controller_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service ovn_controller is running" - name: "PreUpgrade step0,validation: Check service ovn_controller is running"
command: systemctl is-active --quiet ovn-controller command: systemctl is-active --quiet ovn-controller
when: when: ovn_controller_enabled|bool
- step|int == 0
- ovn_controller_enabled.rc == 0
tags: validation tags: validation
- when: step|int == 2
block:
- name: Stop and disable ovn-controller service - name: Stop and disable ovn-controller service
when: when: ovn_controller_enabled|bool
- step|int == 2
- ovn_controller_enabled.rc == 0
service: name=ovn-controller state=stopped enabled=no service: name=ovn-controller state=stopped enabled=no

View File

@@ -205,19 +205,22 @@ outputs:
/var/log/containers/openvswitch. /var/log/containers/openvswitch.
ignore_errors: true ignore_errors: true
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if ovn_northd is deployed - name: Check if ovn_northd is deployed
command: systemctl is-enabled --quiet ovn-northd command: systemctl is-enabled --quiet ovn-northd
tags: common
ignore_errors: True ignore_errors: True
register: ovn_northd_enabled register: ovn_northd_enabled_result
- name: Set fact ovn_northd_enabled
set_fact:
ovn_northd_enabled: "{{ ovn_northd_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service ovn_northd is running" - name: "PreUpgrade step0,validation: Check service ovn_northd is running"
command: systemctl is-active --quiet ovn-northd command: systemctl is-active --quiet ovn-northd
when: when: ovn_northd_enabled|bool
- step|int == 0
- ovn_northd_enabled.rc == 0
tags: validation tags: validation
- when: step|int == 2
block:
- name: Stop and disable ovn-northd service - name: Stop and disable ovn-northd service
when: when: ovn_northd_enabled|bool
- step|int == 2
- ovn_northd_enabled.rc == 0
service: name=ovn-northd state=stopped enabled=no service: name=ovn-northd state=stopped enabled=no

View File

@@ -153,19 +153,22 @@ outputs:
path: /var/lib/neutron path: /var/lib/neutron
state: directory state: directory
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if ovn_metadata_agent is deployed - name: Check if ovn_metadata_agent is deployed
command: systemctl is-enabled --quiet networking-ovn-metadata-agent command: systemctl is-enabled --quiet networking-ovn-metadata-agent
tags: common
ignore_errors: True ignore_errors: True
register: networking_ovn_metadata_agent_enabled register: networking_ovn_metadata_agent_enabled_result
- name: Set fact networking_ovn_metadata_agent_enabled
set_fact:
networking_ovn_metadata_agent_enabled: "{{ networking_ovn_metadata_agent_enabled.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service networking-ovn-metadata-agent is running" - name: "PreUpgrade step0,validation: Check service networking-ovn-metadata-agent is running"
command: systemctl is-active --quiet networking-ovn-metadata-agent command: systemctl is-active --quiet networking-ovn-metadata-agent
when: when: networking_ovn_metadata_agent_enabled|bool
- step|int == 0
- networking_ovn_metadata_agent_enabled.rc == 0
tags: validation tags: validation
- when: step|int == 2
block:
- name: Stop and disable networking_ovn_metadata service - name: Stop and disable networking_ovn_metadata service
when: when: networking_ovn_metadata_agent_enabled|bool
- step|int == 2
- networking_ovn_metadata_agent_enabled.rc == 0
service: name=networking-ovn-metadata-agent state=stopped enabled=no service: name=networking-ovn-metadata-agent state=stopped enabled=no

View File

@@ -240,6 +240,9 @@ outputs:
# Got to check that pacemaker_is_active is working fine with bundle. # Got to check that pacemaker_is_active is working fine with bundle.
# TODO: pacemaker_is_active resource doesn't support bundle. # TODO: pacemaker_is_active resource doesn't support bundle.
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Get docker Cinder-Backup image - name: Get docker Cinder-Backup image
set_fact: set_fact:
cinder_backup_docker_image_latest: *cinder_backup_image_pcmklatest cinder_backup_docker_image_latest: *cinder_backup_image_pcmklatest
@@ -251,6 +254,25 @@ outputs:
- name: Check if Cinder-Backup is already containerized - name: Check if Cinder-Backup is already containerized
set_fact: set_fact:
cinder_backup_containerized: "{{cinder_backup_kolla_config|succeeded}}" cinder_backup_containerized: "{{cinder_backup_kolla_config|succeeded}}"
- name: Prepare the switch to new cinder_backup container image name in pacemaker
when: cinder_backup_containerized|bool
block:
- name: Get cinder_backup image id currently used by pacemaker
shell: "docker images | awk '/cinder-backup.* pcmklatest/{print $3}' | uniq"
register: cinder_backup_current_pcmklatest_id
- name: Temporarily tag the current cinder_backup image id with the upgraded image name
shell: "docker tag {{cinder_backup_current_pcmklatest_id.stdout}} {{cinder_backup_docker_image_latest}}"
when: cinder_backup_current_pcmklatest_id.stdout != ''
- name: Check openstack-cinder-backup cluster resource status
pacemaker_resource:
resource: openstack-cinder-backup
state: show
check_mode: false
ignore_errors: true
register: cinder_backup_pcs_res_result
- name: Set fact cinder_backup_pcs_res
set_fact:
cinder_backup_pcs_res: "{{cinder_backup_pcs_res_result|succeeded}}"
- name: Cinder-Backup baremetal to container upgrade tasks - name: Cinder-Backup baremetal to container upgrade tasks
when: when:
- step|int == 1 - step|int == 1
@@ -290,30 +312,12 @@ outputs:
until: output.rc == 0 until: output.rc == 0
- name: Disable cinder_backup service - name: Disable cinder_backup service
service: name=openstack-cinder-backup enabled=no service: name=openstack-cinder-backup enabled=no
- name: Prepare the switch to new cinder_backup container image name in pacemaker
when:
- step|int == 0
- cinder_backup_containerized|bool
block:
- name: Get cinder_backup image id currently used by pacemaker
shell: "docker images | awk '/cinder-backup.* pcmklatest/{print $3}' | uniq"
register: cinder_backup_current_pcmklatest_id
- name: Temporarily tag the current cinder_backup image id with the upgraded image name
shell: "docker tag {{cinder_backup_current_pcmklatest_id.stdout}} {{cinder_backup_docker_image_latest}}"
when: cinder_backup_current_pcmklatest_id.stdout != ''
- name: Check openstack-cinder-backup cluster resource status
pacemaker_resource:
resource: openstack-cinder-backup
state: show
check_mode: false
ignore_errors: true
register: cinder_backup_pcs_res
- name: Update cinder_backup pcs resource bundle for new container image - name: Update cinder_backup pcs resource bundle for new container image
when: when:
- step|int == 1 - step|int == 1
- cinder_backup_containerized|bool - cinder_backup_containerized|bool
- is_bootstrap_node - is_bootstrap_node
- cinder_backup_pcs_res|succeeded - cinder_backup_pcs_res|bool
block: block:
- name: Disable the cinder_backup cluster resource before container upgrade - name: Disable the cinder_backup cluster resource before container upgrade
pacemaker_resource: pacemaker_resource:

View File

@@ -265,6 +265,9 @@ outputs:
# Got to check that pacemaker_is_active is working fine with bundle. # Got to check that pacemaker_is_active is working fine with bundle.
# TODO: pacemaker_is_active resource doesn't support bundle. # TODO: pacemaker_is_active resource doesn't support bundle.
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Get docker Cinder-Volume image - name: Get docker Cinder-Volume image
set_fact: set_fact:
cinder_volume_docker_image_latest: *cinder_volume_image_pcmklatest cinder_volume_docker_image_latest: *cinder_volume_image_pcmklatest
@@ -276,6 +279,25 @@ outputs:
- name: Check if Cinder-Volume is already containerized - name: Check if Cinder-Volume is already containerized
set_fact: set_fact:
cinder_volume_containerized: "{{cinder_volume_kolla_config|succeeded}}" cinder_volume_containerized: "{{cinder_volume_kolla_config|succeeded}}"
- name: Prepare the switch to new cinder_volume container image name in pacemaker
when: cinder_volume_containerized|bool
block:
- name: Get cinder_volume image id currently used by pacemaker
shell: "docker images | awk '/cinder-volume.* pcmklatest/{print $3}' | uniq"
register: cinder_volume_current_pcmklatest_id
- name: Temporarily tag the current cinder_volume image id with the upgraded image name
shell: "docker tag {{cinder_volume_current_pcmklatest_id.stdout}} {{cinder_volume_docker_image_latest}}"
when: cinder_volume_current_pcmklatest_id.stdout != ''
- name: Check openstack-cinder-volume cluster resource status
pacemaker_resource:
resource: openstack-cinder-volume
state: show
check_mode: false
ignore_errors: true
register: cinder_volume_pcs_res_result
- name: Set fact cinder_volume_pcs_res
set_fact:
cinder_volume_pcs_res: "{{cinder_volume_pcs_res_result|succeeded}}"
- name: Cinder-Volume baremetal to container upgrade tasks - name: Cinder-Volume baremetal to container upgrade tasks
when: when:
- step|int == 1 - step|int == 1
@@ -315,30 +337,12 @@ outputs:
until: output.rc == 0 until: output.rc == 0
- name: Disable cinder_volume service from boot - name: Disable cinder_volume service from boot
service: name=openstack-cinder-volume enabled=no service: name=openstack-cinder-volume enabled=no
- name: Prepare the switch to new cinder_volume container image name in pacemaker
when:
- step|int == 0
- cinder_volume_containerized|bool
block:
- name: Get cinder_volume image id currently used by pacemaker
shell: "docker images | awk '/cinder-volume.* pcmklatest/{print $3}' | uniq"
register: cinder_volume_current_pcmklatest_id
- name: Temporarily tag the current cinder_volume image id with the upgraded image name
shell: "docker tag {{cinder_volume_current_pcmklatest_id.stdout}} {{cinder_volume_docker_image_latest}}"
when: cinder_volume_current_pcmklatest_id.stdout != ''
- name: Check openstack-cinder-volume cluster resource status
pacemaker_resource:
resource: openstack-cinder-volume
state: show
check_mode: false
ignore_errors: true
register: cinder_volume_pcs_res
- name: Update cinder_volume pcs resource bundle for new container image - name: Update cinder_volume pcs resource bundle for new container image
when: when:
- step|int == 1 - step|int == 1
- cinder_volume_containerized|bool - cinder_volume_containerized|bool
- is_bootstrap_node - is_bootstrap_node
- cinder_volume_pcs_res|succeeded - cinder_volume_pcs_res|bool
block: block:
- name: Disable the cinder_volume cluster resource before container upgrade - name: Disable the cinder_volume cluster resource before container upgrade
pacemaker_resource: pacemaker_resource:

View File

@@ -323,6 +323,9 @@ outputs:
# Got to check that pacemaker_is_active is working fine with bundle. # Got to check that pacemaker_is_active is working fine with bundle.
# TODO: pacemaker_is_active resource doesn't support bundle. # TODO: pacemaker_is_active resource doesn't support bundle.
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Get docker Mysql image - name: Get docker Mysql image
set_fact: set_fact:
mysql_docker_image_latest: *mysql_image_pcmklatest mysql_docker_image_latest: *mysql_image_pcmklatest
@@ -334,12 +337,29 @@ outputs:
set_fact: set_fact:
mysql_containerized: "{{mysql_kolla_config.stat.isdir | default(false)}}" mysql_containerized: "{{mysql_kolla_config.stat.isdir | default(false)}}"
- name: get bootstrap nodeid - name: get bootstrap nodeid
tags: common
command: hiera -c /etc/puppet/hiera.yaml bootstrap_nodeid command: hiera -c /etc/puppet/hiera.yaml bootstrap_nodeid
register: bootstrap_node register: bootstrap_node
- name: set is_bootstrap_node fact - name: set is_bootstrap_node fact
tags: common
set_fact: is_bootstrap_node={{bootstrap_node.stdout|lower == ansible_hostname|lower}} set_fact: is_bootstrap_node={{bootstrap_node.stdout|lower == ansible_hostname|lower}}
- name: Prepare the switch to new galera container image name in pacemaker
when: mysql_containerized|bool
block:
- name: Get galera image id currently used by pacemaker
shell: "docker images | awk '/mariadb.* pcmklatest/{print $3}' | uniq"
register: galera_current_pcmklatest_id
- name: Temporarily tag the current galera image id with the upgraded image name
shell: "docker tag {{galera_current_pcmklatest_id.stdout}} {{mysql_docker_image_latest}}"
when: galera_current_pcmklatest_id.stdout != ''
- name: Check galera cluster resource status
pacemaker_resource:
resource: galera
state: show
check_mode: false
ignore_errors: true
register: galera_pcs_res_result
- name: Set fact galera_pcs_res
set_fact:
galera_pcs_res: "{{galera_pcs_res_result|succeeded}}"
- name: Mysql baremetal to container upgrade tasks - name: Mysql baremetal to container upgrade tasks
when: when:
- step|int == 1 - step|int == 1
@@ -376,30 +396,12 @@ outputs:
file: state=absent path=/etc/xinetd.d/galera-monitor file: state=absent path=/etc/xinetd.d/galera-monitor
- name: Restart xinetd service after clustercheck removal - name: Restart xinetd service after clustercheck removal
service: name=xinetd state=restarted service: name=xinetd state=restarted
- name: Prepare the switch to new galera container image name in pacemaker
when:
- step|int == 0
- mysql_containerized|bool
block:
- name: Get galera image id currently used by pacemaker
shell: "docker images | awk '/mariadb.* pcmklatest/{print $3}' | uniq"
register: galera_current_pcmklatest_id
- name: Temporarily tag the current galera image id with the upgraded image name
shell: "docker tag {{galera_current_pcmklatest_id.stdout}} {{mysql_docker_image_latest}}"
when: galera_current_pcmklatest_id.stdout != ''
- name: Check galera cluster resource status
pacemaker_resource:
resource: galera
state: show
check_mode: false
ignore_errors: true
register: galera_pcs_res
- name: Update galera pcs resource bundle for new container image - name: Update galera pcs resource bundle for new container image
when: when:
- step|int == 1 - step|int == 1
- mysql_containerized|bool - mysql_containerized|bool
- is_bootstrap_node - is_bootstrap_node
- galera_pcs_res|succeeded - galera_pcs_res|bool
block: block:
- name: Disable the galera cluster resource before container upgrade - name: Disable the galera cluster resource before container upgrade
pacemaker_resource: pacemaker_resource:

View File

@@ -290,6 +290,9 @@ outputs:
# Got to check that pacemaker_is_active is working fine with bundle. # Got to check that pacemaker_is_active is working fine with bundle.
# TODO: pacemaker_is_active resource doesn't support bundle. # TODO: pacemaker_is_active resource doesn't support bundle.
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Get docker redis image - name: Get docker redis image
set_fact: set_fact:
redis_docker_image_latest: *redis_image_pcmklatest redis_docker_image_latest: *redis_image_pcmklatest
@@ -301,12 +304,28 @@ outputs:
set_fact: set_fact:
redis_containerized: "{{redis_kolla_config.stat.isdir | default(false)}}" redis_containerized: "{{redis_kolla_config.stat.isdir | default(false)}}"
- name: get bootstrap nodeid - name: get bootstrap nodeid
tags: common
command: hiera -c /etc/puppet/hiera.yaml bootstrap_nodeid command: hiera -c /etc/puppet/hiera.yaml bootstrap_nodeid
register: bootstrap_node register: bootstrap_node
- name: set is_bootstrap_node fact - name: set is_bootstrap_node fact
tags: common
set_fact: is_bootstrap_node={{bootstrap_node.stdout|lower == ansible_hostname|lower}} set_fact: is_bootstrap_node={{bootstrap_node.stdout|lower == ansible_hostname|lower}}
- name: Prepare the switch to new redis container image name in pacemaker
when: redis_containerized|bool
block:
- name: Get redis image id currently used by pacemaker
shell: "docker images | awk '/redis.* pcmklatest/{print $3}' | uniq"
register: redis_current_pcmklatest_id
- name: Temporarily tag the current redis image id with the upgraded image name
shell: "docker tag {{redis_current_pcmklatest_id.stdout}} {{redis_docker_image_latest}}"
when: redis_current_pcmklatest_id.stdout != ''
- name: Check redis-bundle cluster resource status
pacemaker_resource:
resource: redis-bundle
state: show
check_mode: false
ignore_errors: true
register: redis_pcs_res_result
- name: Set fact redis_pcs_res
set_fact: "{{redis_pcs_res_result|succeeded}}"
- name: redis baremetal to container upgrade tasks - name: redis baremetal to container upgrade tasks
when: when:
- step|int == 1 - step|int == 1
@@ -339,30 +358,12 @@ outputs:
until: output.rc == 0 until: output.rc == 0
- name: Disable redis service - name: Disable redis service
service: name=redis enabled=no service: name=redis enabled=no
- name: Prepare the switch to new redis container image name in pacemaker
when:
- step|int == 0
- redis_containerized|bool
block:
- name: Get redis image id currently used by pacemaker
shell: "docker images | awk '/redis.* pcmklatest/{print $3}' | uniq"
register: redis_current_pcmklatest_id
- name: Temporarily tag the current redis image id with the upgraded image name
shell: "docker tag {{redis_current_pcmklatest_id.stdout}} {{redis_docker_image_latest}}"
when: redis_current_pcmklatest_id.stdout != ''
- name: Check redis-bundle cluster resource status
pacemaker_resource:
resource: redis-bundle
state: show
check_mode: false
ignore_errors: true
register: redis_pcs_res
- name: Update redis-bundle pcs resource bundle for new container image - name: Update redis-bundle pcs resource bundle for new container image
when: when:
- step|int == 1 - step|int == 1
- redis_containerized|bool - redis_containerized|bool
- is_bootstrap_node - is_bootstrap_node
- redis_pcs_res|succeeded - redis_pcs_res|bool
block: block:
- name: Disable the redis cluster resource before container upgrade - name: Disable the redis cluster resource before container upgrade
pacemaker_resource: pacemaker_resource:

View File

@@ -337,11 +337,32 @@ outputs:
# Got to check that pacemaker_is_active is working fine with bundle. # Got to check that pacemaker_is_active is working fine with bundle.
# TODO: pacemaker_is_active resource doesn't support bundle. # TODO: pacemaker_is_active resource doesn't support bundle.
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Get docker haproxy image - name: Get docker haproxy image
set_fact: set_fact:
haproxy_docker_image_latest: *haproxy_image_pcmklatest haproxy_docker_image_latest: *haproxy_image_pcmklatest
- name: Set HAProxy upgrade facts - name: Set HAProxy upgrade facts
block: *haproxy_update_upgrade_facts block: *haproxy_update_upgrade_facts
- name: Prepare the switch to new haproxy container image name in pacemaker
when: haproxy_containerized|bool
block:
- name: Get haproxy image id currently used by pacemaker
shell: "docker images | awk '/haproxy.* pcmklatest/{print $3}' | uniq"
register: haproxy_current_pcmklatest_id
- name: Temporarily tag the current haproxy image id with the upgraded image name
shell: "docker tag {{haproxy_current_pcmklatest_id.stdout}} {{haproxy_docker_image_latest}}"
when: haproxy_current_pcmklatest_id.stdout != ''
- name: Check haproxy-bundle cluster resource status
pacemaker_resource:
resource: haproxy-bundle
state: show
check_mode: false
ignore_errors: true
register: haproxy_pcs_res_result
- name: Set fact haproxy_pcs_res
set_fact: "{{haproxy_pcs_res_result|succeeded}}"
- name: haproxy baremetal to container upgrade tasks - name: haproxy baremetal to container upgrade tasks
when: when:
- step|int == 1 - step|int == 1
@@ -372,30 +393,12 @@ outputs:
register: output register: output
retries: 5 retries: 5
until: output.rc == 0 until: output.rc == 0
- name: Prepare the switch to new haproxy container image name in pacemaker
when:
- step|int == 0
- haproxy_containerized|bool
block:
- name: Get haproxy image id currently used by pacemaker
shell: "docker images | awk '/haproxy.* pcmklatest/{print $3}' | uniq"
register: haproxy_current_pcmklatest_id
- name: Temporarily tag the current haproxy image id with the upgraded image name
shell: "docker tag {{haproxy_current_pcmklatest_id.stdout}} {{haproxy_docker_image_latest}}"
when: haproxy_current_pcmklatest_id.stdout != ''
- name: Check haproxy-bundle cluster resource status
pacemaker_resource:
resource: haproxy-bundle
state: show
check_mode: false
ignore_errors: true
register: haproxy_pcs_res
- name: Update haproxy pcs resource bundle for new container image - name: Update haproxy pcs resource bundle for new container image
when: when:
- step|int == 1 - step|int == 1
- haproxy_containerized|bool - haproxy_containerized|bool
- is_bootstrap_node - is_bootstrap_node
- haproxy_pcs_res|succeeded - haproxy_pcs_res|bool
block: block:
- name: Disable the haproxy cluster resource before container upgrade - name: Disable the haproxy cluster resource before container upgrade
pacemaker_resource: pacemaker_resource:

View File

@@ -206,6 +206,9 @@ outputs:
# Got to check that pacemaker_is_active is working fine with bundle. # Got to check that pacemaker_is_active is working fine with bundle.
# TODO: pacemaker_is_active resource doesn't support bundle. # TODO: pacemaker_is_active resource doesn't support bundle.
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Get docker Manila-Share image - name: Get docker Manila-Share image
set_fact: set_fact:
manila_share_docker_image_latest: *manila_share_image_pcmklatest manila_share_docker_image_latest: *manila_share_image_pcmklatest
@@ -216,17 +219,8 @@ outputs:
- name: Check if Manila-Share is already containerized - name: Check if Manila-Share is already containerized
set_fact: set_fact:
manila_share_containerized: "{{manila_share_kolla_config.stat.isdir | default(false)}}" manila_share_containerized: "{{manila_share_kolla_config.stat.isdir | default(false)}}"
- name: Manila-Share baremetal to container upgrade tasks
when:
- step|int == 1
- not manila_share_containerized|bool
block:
- name: Stop and disable manila_share service
service: name=openstack-manila-share state=stopped enabled=no
- name: Prepare the switch to new Manila-Share container image name in pacemaker - name: Prepare the switch to new Manila-Share container image name in pacemaker
when: when: manila_share_containerized|bool
- step|int == 0
- manila_share_containerized|bool
block: block:
- name: Get Manila-Share image id currently used by pacemaker - name: Get Manila-Share image id currently used by pacemaker
shell: "docker images | awk '/manila-share.* pcmklatest/{print $3}' | uniq" shell: "docker images | awk '/manila-share.* pcmklatest/{print $3}' | uniq"
@@ -240,13 +234,22 @@ outputs:
state: show state: show
check_mode: false check_mode: false
ignore_errors: true ignore_errors: true
register: manila_share_pcs_res register: manila_share_pcs_res_result
- name: Set fact manila_share_pcs_res
set_fact: "{{manila_share_pcs_res_result|succeeded}}"
- name: Manila-Share baremetal to container upgrade tasks
when:
- step|int == 1
- not manila_share_containerized|bool
block:
- name: Stop and disable manila_share service
service: name=openstack-manila-share state=stopped enabled=no
- name: Update openstack-manila-share pcs resource bundle for new container image - name: Update openstack-manila-share pcs resource bundle for new container image
when: when:
- step|int == 1 - step|int == 1
- manila_share_containerized|bool - manila_share_containerized|bool
- is_bootstrap_node - is_bootstrap_node
- manila_share_pcs_res|succeeded - manila_share_pcs_res|bool
block: block:
- name: Disable the Manila-Share cluster resource before container upgrade - name: Disable the Manila-Share cluster resource before container upgrade
pacemaker_resource: pacemaker_resource:

View File

@@ -260,6 +260,9 @@ outputs:
# Got to check that pacemaker_is_active is working fine with bundle. # Got to check that pacemaker_is_active is working fine with bundle.
# TODO: pacemaker_is_active resource doesn't support bundle. # TODO: pacemaker_is_active resource doesn't support bundle.
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Get docker Rabbitmq image - name: Get docker Rabbitmq image
set_fact: set_fact:
docker_image_latest: *rabbitmq_image_pcmklatest docker_image_latest: *rabbitmq_image_pcmklatest

View File

@@ -225,22 +225,26 @@ outputs:
/var/log/containers/rabbitmq. /var/log/containers/rabbitmq.
ignore_errors: true ignore_errors: true
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if rabbitmq server is deployed - name: Check if rabbitmq server is deployed
command: systemctl is-enabled --quiet rabbitmq-server command: systemctl is-enabled --quiet rabbitmq-server
tags: common
ignore_errors: True ignore_errors: True
register: rabbitmq_enabled register: rabbitmq_enabled_result
- name: Set fact rabbitmq_enabled
set_fact:
rabbitmq_enabled: "{{ rabbitmq_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service rabbitmq server is running" - name: "PreUpgrade step0,validation: Check service rabbitmq server is running"
command: systemctl is-active --quiet rabbitmq-server command: systemctl is-active --quiet rabbitmq-server
when: when: rabbitmq_enabled|bool
- step|int == 0
- rabbitmq_enabled.rc == 0
tags: validation tags: validation
- when: step|int == 2
block:
- name: Stop and disable rabbitmq service - name: Stop and disable rabbitmq service
when: when: rabbitmq_enabled|bool
- step|int == 2
- rabbitmq_enabled.rc == 0
service: name=rabbitmq-server state=stopped enabled=no service: name=rabbitmq-server state=stopped enabled=no
# TODO: Removal of package
update_tasks: update_tasks:
# TODO: Are we sure we want to support this. Rolling update # TODO: Are we sure we want to support this. Rolling update
# without pacemaker may fail. Do we test this ? In any case, # without pacemaker may fail. Do we test this ? In any case,

View File

@@ -157,29 +157,29 @@ outputs:
/var/log/containers/sahara. /var/log/containers/sahara.
ignore_errors: true ignore_errors: true
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if sahara_api is deployed - name: Check if sahara_api is deployed
command: systemctl is-enabled --quiet openstack-sahara-api command: systemctl is-enabled --quiet openstack-sahara-api
tags: common
ignore_errors: True ignore_errors: True
register: sahara_api_enabled register: sahara_api_enabled_result
- name: Set fact sahara_api_enabled
set_fact:
sahara_api_enabled: "{{ sahara_api_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service openstack-sahara-api is running" - name: "PreUpgrade step0,validation: Check service openstack-sahara-api is running"
command: systemctl is-active --quiet openstack-sahara-api command: systemctl is-active --quiet openstack-sahara-api
when: when: sahara_api_enabled|bool
- step|int == 0
- sahara_api_enabled.rc == 0
tags: validation tags: validation
- when: step|int == 2
block:
- name: Stop and disable sahara_api service - name: Stop and disable sahara_api service
when: when: sahara_api_enabled|bool
- step|int == 2
- sahara_api_enabled.rc == 0
service: name=openstack-sahara-api state=stopped enabled=no service: name=openstack-sahara-api state=stopped enabled=no
- name: Set fact for removal of openstack-sahara-api package - name: Set fact for removal of openstack-sahara-api package
when: step|int == 2
set_fact: set_fact:
remove_sahara_api_package: {get_param: UpgradeRemoveUnusedPackages} remove_sahara_api_package: {get_param: UpgradeRemoveUnusedPackages}
- name: Remove openstack-sahara-api package if operator requests it - name: Remove openstack-sahara-api package if operator requests it
yum: name=openstack-sahara-api state=removed yum: name=openstack-sahara-api state=removed
ignore_errors: True ignore_errors: True
when: when: remove_sahara_api_package|bool
- step|int == 2
- remove_sahara_api_package|bool

View File

@@ -142,29 +142,29 @@ outputs:
/var/log/containers/sahara. /var/log/containers/sahara.
ignore_errors: true ignore_errors: true
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if sahara_engine is deployed - name: Check if sahara_engine is deployed
command: systemctl is-enabled --quiet openstack-sahara-engine command: systemctl is-enabled --quiet openstack-sahara-engine
tags: common
ignore_errors: True ignore_errors: True
register: sahara_engine_enabled register: sahara_engine_enabled_result
- name: Set fact sahara_engine_enabled
set_fact:
sahara_engine_enabled: "{{ sahara_engine_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check service openstack-sahara-engine is running" - name: "PreUpgrade step0,validation: Check service openstack-sahara-engine is running"
command: systemctl is-active --quiet openstack-sahara-engine command: systemctl is-active --quiet openstack-sahara-engine
when: when: sahara_engine_enabled|bool
- step|int == 0
- sahara_engine_enabled.rc == 0
tags: validation tags: validation
- when: step|int == 2
block:
- name: Stop and disable sahara_engine service - name: Stop and disable sahara_engine service
when: when: sahara_engine_enabled|bool
- step|int == 2
- sahara_engine_enabled.rc == 0
service: name=openstack-sahara-engine state=stopped enabled=no service: name=openstack-sahara-engine state=stopped enabled=no
- name: Set fact for removal of openstack-sahara-engine package - name: Set fact for removal of openstack-sahara-engine package
when: step|int == 2
set_fact: set_fact:
remove_sahara_engine_package: {get_param: UpgradeRemoveUnusedPackages} remove_sahara_engine_package: {get_param: UpgradeRemoveUnusedPackages}
- name: Remove openstack-sahara-engine package if operator requests it - name: Remove openstack-sahara-engine package if operator requests it
yum: name=openstack-sahara-engine state=removed yum: name=openstack-sahara-engine state=removed
ignore_errors: True ignore_errors: True
when: when: remove_sahara_engine_package|bool
- step|int == 2
- remove_sahara_engine_package|bool

View File

@@ -163,22 +163,26 @@ outputs:
/var/log/containers/sensu. /var/log/containers/sensu.
ignore_errors: true ignore_errors: true
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if sensu client is deployed - name: Check if sensu client is deployed
command: systemctl is-enabled --quiet sensu-client command: systemctl is-enabled --quiet sensu-client
tags: common
ignore_errors: True ignore_errors: True
register: sensu_enabled register: sensu_enabled_result
- name: Set fact sensu_enabled
set_fact:
sensu_enabled: "{{ sensu_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check if sensu client is running" - name: "PreUpgrade step0,validation: Check if sensu client is running"
command: systemctl is-active --quiet sensu-client command: systemctl is-active --quiet sensu-client
when: when: sensu_enabled|bool
- step|int == 0
- sensu_enabled.rc == 0
tags: validation tags: validation
- when: step|int == 2
block:
- name: Stop and disable sensu-client service - name: Stop and disable sensu-client service
when: when: sensu_enabled|bool
- step|int == 2
- sensu_enabled.rc == 0
service: name=sensu-client state=stopped enabled=no service: name=sensu-client state=stopped enabled=no
#TODO: Removal of package
fast_forward_upgrade_tasks: fast_forward_upgrade_tasks:
- name: Check if sensu client is deployed - name: Check if sensu client is deployed
command: systemctl is-enabled --quiet sensu-client command: systemctl is-enabled --quiet sensu-client

View File

@@ -254,37 +254,37 @@ outputs:
dest: /var/log/containers/swift dest: /var/log/containers/swift
state: link state: link
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if swift-proxy or swift-object-expirer are deployed - name: Check if swift-proxy or swift-object-expirer are deployed
command: systemctl is-enabled --quiet "{{ item }}" command: systemctl is-enabled --quiet "{{ item }}"
tags: common
ignore_errors: True ignore_errors: True
register: swift_proxy_services_enabled register: swift_proxy_services_enabled_result
with_items: with_items:
- openstack-swift-proxy - openstack-swift-proxy
- openstack-swift-object-expirer - openstack-swift-object-expirer
- name: Set fact swift_proxy_services_enabled
set_fact:
swift_proxy_services_enabled: "{{ swift_proxy_services_enabled_result }}"
- name: "PreUpgrade step0,validation: Check service openstack-swift-proxy and openstack-swift-object-expirer are running" - name: "PreUpgrade step0,validation: Check service openstack-swift-proxy and openstack-swift-object-expirer are running"
command: systemctl is-active --quiet "{{ item.item }}" command: systemctl is-active --quiet "{{ item.item }}"
when: when: item.rc == 0
- step|int == 0
- item.rc == 0
tags: validation tags: validation
with_items: "{{ swift_proxy_services_enabled.results }}" with_items: "{{ swift_proxy_services_enabled.results }}"
- when: step|int == 2
block:
- name: Stop and disable swift-proxy and swift-object-expirer services - name: Stop and disable swift-proxy and swift-object-expirer services
when: when: item.rc == 0
- step|int == 2
- item.rc == 0
service: name={{ item.item }} state=stopped enabled=no service: name={{ item.item }} state=stopped enabled=no
with_items: "{{ swift_proxy_services_enabled.results }}" with_items: "{{ swift_proxy_services_enabled.results }}"
- name: Set fact for removal of openstack-swift-proxy package - name: Set fact for removal of openstack-swift-proxy package
when: step|int == 2
set_fact: set_fact:
remove_swift_proxy_package: {get_param: UpgradeRemoveUnusedPackages} remove_swift_proxy_package: {get_param: UpgradeRemoveUnusedPackages}
- name: Remove openstack-swift-proxy package if operator requests it - name: Remove openstack-swift-proxy package if operator requests it
yum: name=openstack-swift-proxy state=removed yum: name=openstack-swift-proxy state=removed
ignore_errors: True ignore_errors: True
when: when: remove_swift_proxy_package|bool
- step|int == 2
- remove_swift_proxy_package|bool
metadata_settings: metadata_settings:
get_attr: [SwiftProxyBase, role_data, metadata_settings] get_attr: [SwiftProxyBase, role_data, metadata_settings]
fast_forward_upgrade_tasks: fast_forward_upgrade_tasks:

View File

@@ -482,10 +482,12 @@ outputs:
for_each: for_each:
DEVICE: {get_param: SwiftRawDisks} DEVICE: {get_param: SwiftRawDisks}
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if swift storage services are deployed - name: Check if swift storage services are deployed
command: systemctl is-enabled --quiet "{{ item }}" command: systemctl is-enabled --quiet "{{ item }}"
tags: common register: swift_services_enabled_result
register: swift_services_enabled
ignore_errors: true ignore_errors: true
with_items: with_items:
- openstack-swift-account-auditor - openstack-swift-account-auditor
@@ -500,29 +502,27 @@ outputs:
- openstack-swift-object-replicator - openstack-swift-object-replicator
- openstack-swift-object-updater - openstack-swift-object-updater
- openstack-swift-object - openstack-swift-object
- name: Set fact swift_services_enabled
set_fact:
swift_services_enabled: "{{ swift_services_enabled_result }}"
- name: "PreUpgrade step0,validation: Check swift storage services are running" - name: "PreUpgrade step0,validation: Check swift storage services are running"
command: systemctl is-active --quiet "{{ item.item }}" command: systemctl is-active --quiet "{{ item.item }}"
tags: validation tags: validation
with_items: "{{ swift_services_enabled.results }}" with_items: "{{ swift_services_enabled.results }}"
when: when: item.rc == 0
- step|int == 0 - when: step|int == 2
- item.rc == 0 block:
- name: Stop and disable swift storage services - name: Stop and disable swift storage services
service: name={{ item.item }} state=stopped enabled=no service: name={{ item.item }} state=stopped enabled=no
with_items: "{{ swift_services_enabled.results }}" with_items: "{{ swift_services_enabled.results }}"
when: when: item.rc == 0
- step|int == 2
- item.rc == 0
- name: Set fact for removal of openstack-swift-container,object,account package - name: Set fact for removal of openstack-swift-container,object,account package
when: step|int == 2
set_fact: set_fact:
remove_swift_package: {get_param: UpgradeRemoveUnusedPackages} remove_swift_package: {get_param: UpgradeRemoveUnusedPackages}
- name: Remove openstack-swift-container,object,account packages if operator requests it - name: Remove openstack-swift-container,object,account packages if operator requests it
yum: name={{ item }} state=removed yum: name={{ item }} state=removed
ignore_errors: True ignore_errors: True
when: when: remove_swift_package|bool
- step|int == 2
- remove_swift_package|bool
with_items: with_items:
- openstack-swift-container - openstack-swift-container
- openstack-swift-object - openstack-swift-object
@@ -530,12 +530,9 @@ outputs:
- name: Remove rsync service from xinetd - name: Remove rsync service from xinetd
file: state=absent path=/etc/xinetd.d/rsync file: state=absent path=/etc/xinetd.d/rsync
register: rsync_service_removed register: rsync_service_removed
when: step|int == 2
- name: Restart xinetd service after rsync removal - name: Restart xinetd service after rsync removal
service: name=xinetd state=restarted service: name=xinetd state=restarted
when: when: rsync_service_removed|changed
- step|int == 2
- rsync_service_removed|changed
update_tasks: update_tasks:
- name: Ensure rsyncd pid file is absent - name: Ensure rsyncd pid file is absent
file: file:

View File

@@ -145,19 +145,23 @@ outputs:
/var/log/containers/tacker. /var/log/containers/tacker.
ignore_errors: true ignore_errors: true
upgrade_tasks: upgrade_tasks:
- when: step|int == 0
tags: common
block:
- name: Check if tacker is deployed - name: Check if tacker is deployed
command: systemctl is-enabled --quiet openstack-tacker-server command: systemctl is-enabled --quiet openstack-tacker-server
tags: common
ignore_errors: True ignore_errors: True
register: tacker_enabled register: tacker_enabled_result
- name: Set fact tacker_enabled
set_fact:
tacker_enabled: "{{ tacker_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check if tacker is running" - name: "PreUpgrade step0,validation: Check if tacker is running"
command: systemctl is-active --quiet openstack-tacker-server command: systemctl is-active --quiet openstack-tacker-server
when: when: tacker_enabled|bool
- step|int == 0
- tacker_enabled.rc == 0
tags: validation tags: validation
- when: step|int == 2
block:
- name: Stop and disable tacker-server service - name: Stop and disable tacker-server service
when: when: tacker_enabled|bool
- step|int == 2
- tacker_enabled.rc == 0
service: name=openstack-tacker-server state=stopped enabled=no service: name=openstack-tacker-server state=stopped enabled=no
#TODO: Removal of package