Always evaluate step first in conditional

If we use variables defined in later step in conditional before
checking which step are we on we will fail.

Resolves: rhbz#1535457
Closes-Bug: #1743764
Change-Id: Ic21f6eb5c4101f230fa894cd0829a11e2f0ef39b
This commit is contained in:
Lukas Bezdicka 2018-01-31 11:06:53 +01:00
parent a1c479f93c
commit 0cb5c847f3
131 changed files with 998 additions and 322 deletions

View File

@ -180,9 +180,15 @@ outputs:
- name: "PreUpgrade step0,validation: Check if aodh api is running" - name: "PreUpgrade step0,validation: Check if aodh api is running"
shell: systemctl status 'httpd' | grep -q aodh shell: systemctl status 'httpd' | grep -q aodh
tags: validation tags: validation
when: (httpd_enabled.rc == 0) and (httpd_running.rc == 0) and (step|int == 0) when:
- step|int == 0
- httpd_enabled.rc == 0
- httpd_running.rc == 0
- name: Stop and disable aodh service (running under httpd) - name: Stop and disable aodh service (running under httpd)
when: (httpd_enabled.rc == 0) and (httpd_running.rc == 0) and (step|int == 2) when:
- step|int == 2
- httpd_enabled.rc == 0
- httpd_running.rc == 0
service: name=httpd state=stopped enabled=no service: name=httpd state=stopped enabled=no
- name: Set fact for removal of openstack-aodh-api package - name: Set fact for removal of openstack-aodh-api package
when: step|int == 2 when: step|int == 2
@ -191,6 +197,8 @@ outputs:
- name: Remove openstack-aodh-api package if operator requests it - name: Remove openstack-aodh-api package if operator requests it
yum: name=openstack-aodh-api state=removed yum: name=openstack-aodh-api state=removed
ignore_errors: True ignore_errors: True
when: (remove_aodh_api_package|bool) and (step|int == 2) when:
- step|int == 2
- remove_aodh_api_package|bool
metadata_settings: metadata_settings:
get_attr: [AodhApiPuppetBase, role_data, metadata_settings] get_attr: [AodhApiPuppetBase, role_data, metadata_settings]

View File

@ -130,10 +130,14 @@ outputs:
register: aodh_evaluator_enabled register: aodh_evaluator_enabled
- 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: (aodh_evaluator_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- aodh_evaluator_enabled.rc == 0
tags: validation tags: validation
- name: Stop and disable openstack-aodh-evaluator service - name: Stop and disable openstack-aodh-evaluator service
when: (aodh_evaluator_enabled.rc == 0) and (step|int == 2) when:
- 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 when: step|int == 2
@ -142,4 +146,6 @@ outputs:
- 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: (remove_aodh_evaluator_package|bool) and (step|int == 2) when:
- step|int == 2
- remove_aodh_evaluator_package|bool

View File

@ -130,10 +130,14 @@ outputs:
register: aodh_listener_enabled register: aodh_listener_enabled
- 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: (aodh_listener_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- aodh_listener_enabled.rc == 0
tags: validation tags: validation
- name: Stop and disable openstack-aodh-listener service - name: Stop and disable openstack-aodh-listener service
when: (aodh_listener_enabled.rc == 0) and (step|int == 2) when:
- 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 when: step|int == 2
@ -142,4 +146,6 @@ outputs:
- 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: (remove_aodh_listener_package|bool) and (step|int == 2) when:
- step|int == 2
- remove_aodh_listener_package|bool

View File

@ -130,10 +130,14 @@ outputs:
register: aodh_notifier_enabled register: aodh_notifier_enabled
- 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: (aodh_notifier_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- aodh_notifier_enabled.rc == 0
tags: validation tags: validation
- name: Stop and disable openstack-aodh-notifier service - name: Stop and disable openstack-aodh-notifier service
when: (aodh_notifier_enabled.rc == 0) and (step|int == 2) when:
- 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 when: step|int == 2
@ -142,4 +146,6 @@ outputs:
- 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: (remove_aodh_notifier_package|bool) and (step|int == 2) when:
- step|int == 2
- remove_aodh_notifier_package|bool

View File

@ -214,9 +214,13 @@ outputs:
register: barbican_enabled register: barbican_enabled
- 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: (barbican_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- barbican_enabled.rc == 0
- name: Stop and disable barbican_api service - name: Stop and disable barbican_api service
when: (barbican_enabled.rc == 0) and (step|int == 2) when:
- 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 when: step|int == 2
@ -225,6 +229,8 @@ outputs:
- 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: (remove_barbican_api_package|bool) and (step|int == 2) when:
- 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

@ -144,11 +144,15 @@ outputs:
register: ceilometer_agent_central_enabled register: ceilometer_agent_central_enabled
- 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: (ceilometer_agent_central_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- ceilometer_agent_central_enabled.rc == 0
tags: validation tags: validation
- 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: (ceilometer_agent_central_enabled.rc == 0) and (step|int == 2) when:
- 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 when: step|int == 2
set_fact: set_fact:
@ -156,4 +160,6 @@ outputs:
- 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: (remove_ceilometer_central_package|bool) and (step|int == 2) when:
- step|int == 2
- remove_ceilometer_central_package|bool

View File

@ -122,18 +122,26 @@ outputs:
register: openstack_ceilometer_polling_enabled register: openstack_ceilometer_polling_enabled
- 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: (openstack_ceilometer_compute_enabled.rc == 0) and (step|int == 0) when:
- 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: (openstack_ceilometer_polling_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- openstack_ceilometer_polling_enabled.rc == 0
tags: validation tags: validation
- 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: (openstack_ceilometer_compute_enabled.rc|default('') == 0) and (step|int == 2) when:
- 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: (openstack_ceilometer_polling_enabled.rc|default('') == 0) and (step|int == 2) when:
- 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 when: step|int == 2
set_fact: set_fact:
@ -141,8 +149,12 @@ outputs:
- 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: (remove_ceilometer_compute_polling_package|bool) and (step|int == 2) when:
- 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: (remove_ceilometer_compute_polling_package|bool) and (step|int == 2) when:
- step|int == 2
- remove_ceilometer_compute_polling_package|bool

View File

@ -125,11 +125,15 @@ outputs:
register: ceilometer_ipmi_enabled register: ceilometer_ipmi_enabled
- 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: (ceilometer_ipmi_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- ceilometer_ipmi_enabled.rc == 0
tags: validation tags: validation
- 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: (ceilometer_ipmi_enabled.rc == 0) and (step|int == 2) when:
- 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 when: step|int == 2
set_fact: set_fact:
@ -137,4 +141,6 @@ outputs:
- 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: (remove_ceilometer_ipmi_package|bool) and (step|int == 2) when:
- step|int == 2
- remove_ceilometer_ipmi_package|bool

View File

@ -135,11 +135,15 @@ outputs:
register: ceilometer_agent_notification_enabled register: ceilometer_agent_notification_enabled
- 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: (ceilometer_agent_notification_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- ceilometer_agent_notification_enabled.rc == 0
tags: validation tags: validation
- 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: (ceilometer_agent_notification_enabled.rc == 0) and (step|int == 2) when:
- 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 when: step|int == 2
set_fact: set_fact:
@ -147,4 +151,6 @@ outputs:
- 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: (remove_ceilometer_notification_package|bool) and (step|int == 2) when:
- step|int == 2
- remove_ceilometer_notification_package|bool

View File

@ -208,11 +208,15 @@ outputs:
register: cinder_api_enabled register: cinder_api_enabled
- 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: (cinder_api_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- cinder_api_enabled.rc == 0
tags: validation tags: validation
- 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: (cinder_api_enabled.rc == 0) and (step|int == 2) when:
- 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
@ -220,7 +224,9 @@ outputs:
when: step|int == 2 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: (cinder_api_apache.rc == 0) and (step|int == 2) when:
- step|int == 2
- cinder_api_apache.rc == 0
- name: remove old cinder cron jobs - name: remove old cinder cron jobs
when: step|int == 2 when: step|int == 2
file: file:
@ -233,4 +239,6 @@ outputs:
- 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: (remove_httpd_package|bool) and (step|int == 2) when:
- step|int == 2
- remove_httpd_package|bool

View File

@ -175,4 +175,6 @@ outputs:
- 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: (remove_cinder_package|bool) and (step|int == 2) when:
- step|int == 2
- remove_cinder_package|bool

View File

@ -138,10 +138,14 @@ outputs:
register: cinder_scheduler_enabled register: cinder_scheduler_enabled
- 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: (cinder_scheduler_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- cinder_scheduler_enabled.rc == 0
tags: validation tags: validation
- name: Stop and disable cinder_scheduler service - name: Stop and disable cinder_scheduler service
when: (cinder_scheduler_enabled.rc == 0) and (step|int == 2) when:
- 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 when: step|int == 2
@ -150,4 +154,6 @@ outputs:
- 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: (remove_cinder_package|bool) and (step|int == 2) when:
- step|int == 2
- remove_cinder_package|bool

View File

@ -226,10 +226,14 @@ outputs:
register: cinder_volume_enabled register: cinder_volume_enabled
- 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: (cinder_volume_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- cinder_volume_enabled.rc == 0
tags: validation tags: validation
- name: Stop and disable cinder_volume service - name: Stop and disable cinder_volume service
when: (cinder_volume_enabled.rc == 0) and (step|int == 2) when:
- 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 when: step|int == 2
@ -238,4 +242,6 @@ outputs:
- 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: (remove_cinder_package|bool) and (step|int == 2) when:
- step|int == 2
- remove_cinder_package|bool

View File

@ -126,10 +126,14 @@ outputs:
register: collectd_enabled register: collectd_enabled
- 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: (collectd_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- collectd_enabled.rc == 0
tags: validation tags: validation
- name: Stop and disable collectd service - name: Stop and disable collectd service
when: (collectd_enabled.rc == 0) and (step|int == 2) when:
- 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 when: step|int == 2
@ -138,4 +142,6 @@ outputs:
- 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: (remove_collectd_package|bool) and (step|int == 2) when:
- step|int == 2
- remove_collectd_package|bool

View File

@ -155,10 +155,14 @@ outputs:
register: congress_enabled register: congress_enabled
- 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: (congress_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- congress_enabled.rc == 0
tags: validation tags: validation
- name: Stop and disable congress_api service - name: Stop and disable congress_api service
when: (congress_enabled.rc == 0) and (step|int == 2) when:
- 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 when: step|int == 2
@ -167,4 +171,6 @@ outputs:
- 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: (remove_congress_package|bool) and (step|int == 2) when:
- step|int == 2
- remove_congress_package|bool

View File

@ -172,8 +172,12 @@ outputs:
register: mongod_enabled register: mongod_enabled
- 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: (mongod_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- mongod_enabled.rc == 0
tags: validation tags: validation
- name: Stop and disable mongodb service - name: Stop and disable mongodb service
when: (mongod_enabled.rc == 0) and (step|int == 2) when:
- step|int == 2
- mongod_enabled.rc == 0
service: name=mongod state=stopped enabled=no service: name=mongod state=stopped enabled=no

View File

@ -241,8 +241,12 @@ outputs:
register: mariadb_enabled register: mariadb_enabled
- 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: (mariadb_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- mariadb_enabled.rc == 0
tags: validation tags: validation
- name: Stop and disable mysql service - name: Stop and disable mysql service
when: (mariadb_enabled.rc == 0) and (step|int == 2) when:
- step|int == 2
- mariadb_enabled.rc == 0
service: name=mariadb state=stopped enabled=no service: name=mariadb state=stopped enabled=no

View File

@ -131,8 +131,12 @@ outputs:
register: redis_enabled register: redis_enabled
- 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: (redis_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- redis_enabled.rc == 0
tags: validation tags: validation
- name: Stop and disable redis service - name: Stop and disable redis service
when: (redis_enabled.rc == 0) and (step|int == 2) when:
- step|int == 2
- redis_enabled.rc == 0
service: name=redis state=stopped enabled=no service: name=redis state=stopped enabled=no

View File

@ -217,17 +217,25 @@ outputs:
register: ec2_api_metadata_enabled register: ec2_api_metadata_enabled
- 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: (ec2_api_enabled.rc == 0) and (step|int == 0) when:
- 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: (ec2_api_metadata_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- ec2_api_metadata_enabled.rc == 0
tags: validation tags: validation
- name: Stop and disable EC2-API service - name: Stop and disable EC2-API service
when: (ec2_api_enabled.rc == 0) and (step|int == 2) when:
- 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: (ec2_api_metadata_enabled.rc == 0) and (step|int == 2) when:
- 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

@ -122,8 +122,12 @@ outputs:
register: etcd_enabled register: etcd_enabled
- 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: (etcd_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- etcd_enabled.rc == 0
tags: validation tags: validation
- name: Stop and disable etcd service - name: Stop and disable etcd service
when: (etcd_enabled.rc == 0) and (step|int == 2) when:
- step|int == 2
- etcd_enabled.rc == 0
service: name=etcd state=stopped enabled=no service: name=etcd state=stopped enabled=no

View File

@ -241,9 +241,13 @@ outputs:
- 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: (glance_api_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- glance_api_enabled.rc == 0
- name: Stop and disable glance_api service - name: Stop and disable glance_api service
when: (glance_api_enabled.rc == 0) and (step|int == 2) when:
- 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 when: step|int == 2
@ -252,6 +256,8 @@ outputs:
- 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: (remove_glance_package|bool) and (step|int == 2) when:
- 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]

View File

@ -202,11 +202,17 @@ outputs:
register: httpd_enabled register: httpd_enabled
- name: "PreUpgrade step0,validation: Check service openstack-gnocchi-api is running" - name: "PreUpgrade step0,validation: Check service openstack-gnocchi-api is running"
command: systemctl is-active --quiet openstack-gnocchi-api command: systemctl is-active --quiet openstack-gnocchi-api
when: (gnocchi_api_enabled.rc == 0) and (httpd_enabled.rc != 0) and (step|int == 0) when:
- step|int == 0
- gnocchi_api_enabled.rc == 0
- httpd_enabled.rc != 0
tags: validation tags: validation
- name: Stop and disable gnocchi_api service - name: Stop and disable gnocchi_api service
service: name=openstack-gnocchi-api state=stopped enabled=no service: name=openstack-gnocchi-api state=stopped enabled=no
when: (gnocchi_api_enabled.rc == 0) and (httpd_enabled.rc != 0) and (step|int == 2) when:
- step|int == 2
- gnocchi_api_enabled.rc == 0
- httpd_enabled.rc != 0
- name: Check if httpd service is running - name: Check if httpd service is running
command: systemctl is-active --quiet httpd command: systemctl is-active --quiet httpd
tags: common tags: common
@ -215,9 +221,15 @@ outputs:
- name: "PreUpgrade step0,validation: Check if gnocchi_api_wsgi is running" - name: "PreUpgrade step0,validation: Check if gnocchi_api_wsgi is running"
shell: systemctl status 'httpd' | grep -q gnocchi shell: systemctl status 'httpd' | grep -q gnocchi
tags: validation tags: validation
when: (httpd_enabled.rc == 0) and (httpd_running.rc == 0) and (step|int == 0) when:
- step|int == 0
- httpd_enabled.rc == 0
- httpd_running.rc == 0
- name: Stop and disable httpd service - name: Stop and disable httpd service
when: (httpd_enabled.rc == 0) and (httpd_running.rc == 0) and (step|int == 2) when:
- step|int == 2
- httpd_enabled.rc == 0
- httpd_running.rc == 0
service: name=httpd state=stopped enabled=no service: name=httpd state=stopped enabled=no
metadata_settings: metadata_settings:
get_attr: [GnocchiApiPuppetBase, role_data, metadata_settings] get_attr: [GnocchiApiPuppetBase, role_data, metadata_settings]

View File

@ -141,8 +141,12 @@ outputs:
register: gnocchi_metricd_enabled register: gnocchi_metricd_enabled
- 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: (gnocchi_metricd_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- gnocchi_metricd_enabled.rc == 0
tags: validation tags: validation
- name: Stop and disable openstack-gnocchi-metricd service - name: Stop and disable openstack-gnocchi-metricd service
when: (gnocchi_metricd_enabled.rc == 0) and (step|int == 2) when:
- 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

View File

@ -141,8 +141,12 @@ outputs:
register: gnocchi_statsd_enabled register: gnocchi_statsd_enabled
- 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: (gnocchi_statsd_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- gnocchi_statsd_enabled.rc == 0
tags: validation tags: validation
- name: Stop and disable openstack-gnocchi-statsd service - name: Stop and disable openstack-gnocchi-statsd service
when: (gnocchi_statsd_enabled.rc == 0) and (step|int == 2) when:
- 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

View File

@ -142,11 +142,17 @@ outputs:
register: httpd_enabled register: httpd_enabled
- name: "PreUpgrade step0,validation: Check service openstack-heat-api-cfn is running" - name: "PreUpgrade step0,validation: Check service openstack-heat-api-cfn is running"
command: systemctl is-active --quiet openstack-heat-api-cfn command: systemctl is-active --quiet openstack-heat-api-cfn
when: (heat_api_cfn_enabled.rc == 0) and (httpd_enabled.rc != 0) and (step|int == 0) when:
- step|int == 0
- heat_api_cfn_enabled.rc == 0
- httpd_enabled.rc != 0
tags: validation tags: validation
- name: Stop and disable heat_api_cfn service (pre-upgrade not under httpd) - name: Stop and disable heat_api_cfn service (pre-upgrade not under httpd)
service: name=openstack-heat-api-cfn state=stopped enabled=no service: name=openstack-heat-api-cfn state=stopped enabled=no
when: (heat_api_cfn_enabled.rc == 0) and (httpd_enabled.rc != 0) and (step|int == 2) when:
- step|int == 2
- heat_api_cfn_enabled.rc == 0
- httpd_enabled.rc != 0
- name: Check if httpd service is running - name: Check if httpd service is running
command: systemctl is-active --quiet httpd command: systemctl is-active --quiet httpd
tags: common tags: common
@ -155,9 +161,15 @@ outputs:
- name: "PreUpgrade step0,validation: Check if heat_api_cfn_wsgi is running" - name: "PreUpgrade step0,validation: Check if heat_api_cfn_wsgi is running"
tags: validation tags: validation
shell: systemctl status 'httpd' | grep -q heat_api_cfn_wsgi shell: systemctl status 'httpd' | grep -q heat_api_cfn_wsgi
when: (httpd_enabled.rc == 0) and (httpd_running.rc == 0) and (step|int == 0) when:
- step|int == 0
- httpd_enabled.rc == 0
- httpd_running.rc == 0
- name: Stop heat_api_cfn service (running under httpd) - name: Stop heat_api_cfn service (running under httpd)
service: name=httpd state=stopped service: name=httpd state=stopped
when: (httpd_enabled.rc == 0) and (httpd_running.rc == 0) and (step|int == 2) when:
- step|int == 2
- httpd_enabled.rc == 0
- httpd_running.rc == 0
metadata_settings: metadata_settings:
get_attr: [HeatBase, role_data, metadata_settings] get_attr: [HeatBase, role_data, metadata_settings]

View File

@ -180,11 +180,17 @@ outputs:
register: httpd_enabled register: httpd_enabled
- name: "PreUpgrade step0,validation: Check service openstack-heat-api is running" - name: "PreUpgrade step0,validation: Check service openstack-heat-api is running"
command: systemctl is-active --quiet openstack-heat-api command: systemctl is-active --quiet openstack-heat-api
when: (heat_api_enabled.rc == 0) and (httpd_enabled.rc != 0) and (step|int == 0) when:
- step|int == 0
- heat_api_enabled.rc == 0
- httpd_enabled.rc != 0
tags: validation tags: validation
- name: Stop and disable heat_api service (pre-upgrade not under httpd) - name: Stop and disable heat_api service (pre-upgrade not under httpd)
service: name=openstack-heat-api state=stopped enabled=no service: name=openstack-heat-api state=stopped enabled=no
when: (heat_api_enabled.rc == 0) and (httpd_enabled.rc != 0) and (step|int == 2) when:
- step|int == 2
- heat_api_enabled.rc == 0
- httpd_enabled.rc != 0
- name: Check if httpd is running - name: Check if httpd is running
tags: common tags: common
command: systemctl is-active --quiet httpd command: systemctl is-active --quiet httpd
@ -193,10 +199,16 @@ outputs:
- name: "PreUpgrade step0,validation: Check if heat_api_wsgi is running" - name: "PreUpgrade step0,validation: Check if heat_api_wsgi is running"
shell: systemctl status 'httpd' | grep -q heat_api_wsgi shell: systemctl status 'httpd' | grep -q heat_api_wsgi
tags: validation tags: validation
when: (httpd_enabled.rc == 0) and (httpd_running.rc == 0) and (step|int == 0) when:
- step|int == 0
- httpd_enabled.rc == 0
- httpd_running.rc == 0
- name: Stop heat_api service (running under httpd) - name: Stop heat_api service (running under httpd)
service: name=httpd state=stopped service: name=httpd state=stopped
when: (httpd_enabled.rc == 0) and (httpd_running.rc == 0) and (step|int == 2) when:
- step|int == 2
- httpd_enabled.rc == 0
- httpd_running.rc == 0
- name: remove old heat cron jobs - name: remove old heat cron jobs
when: step|int == 2 when: step|int == 2
file: file:

View File

@ -141,8 +141,12 @@ outputs:
register: heat_engine_enabled register: heat_engine_enabled
- 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: (heat_engine_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- heat_engine_enabled.rc == 0
tags: validation tags: validation
- name: Stop and disable heat_engine service - name: Stop and disable heat_engine service
when: (heat_engine_enabled.rc == 0) and (step|int == 2) when:
- 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

View File

@ -194,10 +194,14 @@ outputs:
register: httpd_enabled register: httpd_enabled
- name: "PreUpgrade step0,validation: Check if horizon is running" - name: "PreUpgrade step0,validation: Check if horizon is running"
shell: systemctl is-active --quiet httpd shell: systemctl is-active --quiet httpd
when: (httpd_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- httpd_enabled.rc == 0
tags: validation tags: validation
- name: Stop and disable horizon service (running under httpd) - name: Stop and disable horizon service (running under httpd)
when: (httpd_enabled.rc == 0) and (step|int == 2) when:
- step|int == 2
- httpd_enabled.rc == 0
service: name=httpd state=stopped enabled=no service: name=httpd state=stopped enabled=no
metadata_settings: metadata_settings:
get_attr: [HorizonBase, role_data, metadata_settings] get_attr: [HorizonBase, role_data, metadata_settings]

View File

@ -163,10 +163,16 @@ outputs:
register: httpd_enabled register: httpd_enabled
- name: "PreUpgrade step0,validation: Check service openstack-ironic-api is running" - name: "PreUpgrade step0,validation: Check service openstack-ironic-api is running"
command: systemctl is-active --quiet openstack-ironic-api command: systemctl is-active --quiet openstack-ironic-api
when: (ironic_api_enabled.rc == 0) and (httpd_enabled.rc != 0) and (step|int == 0) when:
- step|int == 0
- ironic_api_enabled.rc == 0
- httpd_enabled.rc != 0
tags: validation tags: validation
- name: Stop and disable ironic_api service - name: Stop and disable ironic_api service
when: (ironic_api_enabled.rc == 0) and (httpd_enabled.rc != 0) and (step|int == 2) when:
- step|int == 2
- ironic_api_enabled.rc == 0
- httpd_enabled.rc != 0
service: name=openstack-ironic-api state=stopped enabled=no service: name=openstack-ironic-api state=stopped enabled=no
- name: Check if httpd service is running - name: Check if httpd service is running
command: systemctl is-active --quiet httpd command: systemctl is-active --quiet httpd
@ -176,7 +182,13 @@ outputs:
- name: "PreUpgrade step0,validation: Check if ironic_api_wsgi is running" - name: "PreUpgrade step0,validation: Check if ironic_api_wsgi is running"
shell: systemctl status 'httpd' | grep -q ironic shell: systemctl status 'httpd' | grep -q ironic
tags: validation tags: validation
when: (httpd_enabled.rc == 0) and (httpd_running.rc == 0) and (step|int == 0) when:
- step|int == 0
- httpd_enabled.rc == 0
- httpd_running.rc == 0
- name: Stop ironic_api service (running under httpd) - name: Stop ironic_api service (running under httpd)
when: (httpd_enabled.rc == 0) and (httpd_running.rc == 0) and (step|int == 2) when:
- step|int == 2
- httpd_enabled.rc == 0
- httpd_running.rc == 0
service: name=httpd state=stopped enabled=no service: name=httpd state=stopped enabled=no

View File

@ -175,7 +175,11 @@ outputs:
- 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: (ironic_conductor_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- ironic_conductor_enabled.rc == 0
- name: Stop and disable ironic_conductor service - name: Stop and disable ironic_conductor service
when: (ironic_conductor_enabled.rc == 0) and (step|int == 2) when:
- 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

View File

@ -117,10 +117,14 @@ outputs:
register: iscsid_enabled register: iscsid_enabled
- 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: (iscsid_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- iscsid_enabled.rc == 0
tags: validation tags: validation
- name: Stop and disable iscsid service - name: Stop and disable iscsid service
when: (iscsid_enabled.rc == 0) and (step|int == 2) when:
- step|int == 2
- iscsid_enabled.rc == 0
service: name=iscsid state=stopped enabled=no 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 tags: common
@ -129,8 +133,12 @@ outputs:
register: iscsid_socket_enabled register: iscsid_socket_enabled
- 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: (iscsid_socket_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- iscsid_socket_enabled.rc == 0
tags: validation tags: validation
- name: Stop and disable iscsid.socket service - name: Stop and disable iscsid.socket service
when: (iscsid_socket_enabled.rc == 0) and (step|int == 2) when:
- 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

@ -121,8 +121,12 @@ outputs:
register: keepalived_enabled register: keepalived_enabled
- 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: (keepalived_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- keepalived_enabled.rc == 0
tags: validation tags: validation
- name: Stop and disable keepalived service - name: Stop and disable keepalived service
when: (keepalived_enabled.rc == 0) and (step|int == 2) when:
- step|int == 2
- keepalived_enabled.rc == 0
service: name=keepalived state=stopped enabled=no service: name=keepalived state=stopped enabled=no

View File

@ -210,9 +210,15 @@ outputs:
- name: "PreUpgrade step0,validation: Check if keystone_wsgi is running under httpd" - name: "PreUpgrade step0,validation: Check if keystone_wsgi is running under httpd"
shell: systemctl status 'httpd' | grep -q keystone shell: systemctl status 'httpd' | grep -q keystone
tags: validation tags: validation
when: (httpd_enabled.rc == 0) and (httpd_running.rc == 0) and (step|int == 0) when:
- step|int == 0
- httpd_enabled.rc == 0
- httpd_running.rc == 0
- name: Stop and disable keystone service (running under httpd) - name: Stop and disable keystone service (running under httpd)
when: (httpd_enabled.rc == 0) and (httpd_running.rc == 0) and (step|int == 2) when:
- step|int == 2
- httpd_enabled.rc == 0
- httpd_running.rc == 0
service: name=httpd state=stopped enabled=no service: name=httpd state=stopped enabled=no
- name: remove old keystone cron jobs - name: remove old keystone cron jobs
when: step|int == 2 when: step|int == 2

View File

@ -145,8 +145,12 @@ outputs:
register: manila_api_enabled register: manila_api_enabled
- 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: (manila_api_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- manila_api_enabled.rc == 0
tags: validation tags: validation
- name: Stop and disable manila_api service - name: Stop and disable manila_api service
when: (manila_api_enabled.rc == 0) and (step|int == 2) when:
- 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

@ -121,8 +121,12 @@ outputs:
register: manila_scheduler_enabled register: manila_scheduler_enabled
- 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: (manila_scheduler_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- manila_scheduler_enabled.rc == 0
tags: validation tags: validation
- name: Stop and disable manila_scheduler service - name: Stop and disable manila_scheduler service
when: (manila_scheduler_enabled.rc == 0) and (step|int == 2) when:
- 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

@ -143,8 +143,12 @@ outputs:
register: manila_share_enabled register: manila_share_enabled
- 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: (manila_share_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- manila_share_enabled.rc == 0
tags: validation tags: validation
- name: Stop and disable manila_share service - name: Stop and disable manila_share service
when: (manila_share_enabled.rc == 0) and (step|int == 2) when:
- 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

@ -122,8 +122,12 @@ outputs:
register: memcached_enabled register: memcached_enabled
- 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: (memcached_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- memcached_enabled.rc == 0
tags: validation tags: validation
- name: Stop and disable memcached service - name: Stop and disable memcached service
when: (memcached_enabled.rc == 0) and (step|int == 2) when:
- step|int == 2
- memcached_enabled.rc == 0
service: name=memcached state=stopped enabled=no service: name=memcached state=stopped enabled=no

View File

@ -205,10 +205,16 @@ outputs:
register: httpd_enabled register: httpd_enabled
- name: "PreUpgrade step0,validation: Check if openstack-mistral-api is running" - name: "PreUpgrade step0,validation: Check if openstack-mistral-api is running"
command: systemctl is-active --quiet openstack-mistral-api command: systemctl is-active --quiet openstack-mistral-api
when: (mistral_api_enabled.rc == 0) and (httpd_enabled.rc != 0) and (step|int == 0) when:
- step|int == 0
- mistral_api_enabled.rc == 0
- httpd_enabled.rc != 0
tags: validation tags: validation
- name: Stop and disable mistral_api service (pre-upgrade not under httpd) - name: Stop and disable mistral_api service (pre-upgrade not under httpd)
when: (mistral_api_enabled.rc == 0) and (httpd_enabled.rc != 0) and (step|int == 2) when:
- step|int == 2
- mistral_api_enabled.rc == 0
- httpd_enabled.rc != 0
service: name=openstack-mistral-api state=stopped enabled=no service: name=openstack-mistral-api state=stopped enabled=no
- name: Check if httpd service is running - name: Check if httpd service is running
command: systemctl is-active --quiet httpd command: systemctl is-active --quiet httpd
@ -218,7 +224,13 @@ outputs:
- name: "PreUpgrade step0,validation: Check if mistral_api_wsgi is running" - name: "PreUpgrade step0,validation: Check if mistral_api_wsgi is running"
shell: systemctl status 'httpd' | grep -q mistral shell: systemctl status 'httpd' | grep -q mistral
tags: validation tags: validation
when: (httpd_enabled.rc == 0) and (httpd_running.rc == 0) and (step|int == 0) when:
- step|int == 0
- httpd_enabled.rc == 0
- httpd_running.rc == 0
- name: Stop mistral_api service (running under httpd) - name: Stop mistral_api service (running under httpd)
service: name=httpd state=stopped enabled=no service: name=httpd state=stopped enabled=no
when: (httpd_enabled.rc == 0) and (httpd_running.rc == 0) and (step|int == 2) when:
- step|int == 2
- httpd_enabled.rc == 0
- httpd_running.rc == 0

View File

@ -128,8 +128,12 @@ outputs:
register: mistral_engine_enabled register: mistral_engine_enabled
- 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: (mistral_engine_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- mistral_engine_enabled.rc == 0
tags: validation tags: validation
- name: Stop and disable mistral_engine service - name: Stop and disable mistral_engine service
when: (mistral_engine_enabled.rc == 0) and (step|int == 2) when:
- 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

@ -126,8 +126,12 @@ outputs:
register: mistral_event_engine_enabled register: mistral_event_engine_enabled
- 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: (mistral_event_engine_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- mistral_event_engine_enabled.rc == 0
tags: validation tags: validation
- name: Stop and disable mistral_event_engine service - name: Stop and disable mistral_event_engine service
when: (mistral_event_engine_enabled.rc == 0) and (step|int == 2) when:
- 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

@ -132,8 +132,12 @@ outputs:
register: mistral_executor_enabled register: mistral_executor_enabled
- 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: (mistral_executor_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- mistral_executor_enabled.rc == 0
tags: validation tags: validation
- name: Stop and disable mistral_executor service - name: Stop and disable mistral_executor service
when: (mistral_executor_enabled.rc == 0) and (step|int == 2) when:
- 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

@ -93,8 +93,12 @@ outputs:
register: multipathd_enabled register: multipathd_enabled
- 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: (multipathd_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- multipathd_enabled.rc == 0
tags: validation tags: validation
- name: Stop and disable multipathd service - name: Stop and disable multipathd service
when: (multipathd_enabled.rc == 0) and (step|int == 2) when:
- step|int == 2
- multipathd_enabled.rc == 0
service: name=multipathd state=stopped enabled=no service: name=multipathd state=stopped enabled=no

View File

@ -188,10 +188,14 @@ outputs:
register: neutron_server_enabled register: neutron_server_enabled
- 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: (neutron_server_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- neutron_server_enabled.rc == 0
tags: validation tags: validation
- name: Stop and disable neutron_api service - name: Stop and disable neutron_api service
when: (neutron_server_enabled.rc == 0) and (step|int == 2) when:
- 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 when: step|int == 2
@ -200,6 +204,8 @@ outputs:
- 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: (remove_neutron_package|bool) and (step|int == 2) when:
- 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]

View File

@ -127,8 +127,12 @@ outputs:
register: neutron_dhcp_agent_enabled register: neutron_dhcp_agent_enabled
- 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: (neutron_dhcp_agent_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- neutron_dhcp_agent_enabled.rc == 0
tags: validation tags: validation
- name: Stop and disable neutron_dhcp service - name: Stop and disable neutron_dhcp service
when: (neutron_dhcp_agent_enabled.rc == 0) and (step|int == 2) when:
- 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

View File

@ -125,8 +125,12 @@ outputs:
register: neutron_l3_agent_enabled register: neutron_l3_agent_enabled
- 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: (neutron_l3_agent_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- neutron_l3_agent_enabled.rc == 0
tags: validation tags: validation
- name: Stop and disable neutron_l3 service - name: Stop and disable neutron_l3 service
when: (neutron_l3_agent_enabled.rc == 0) and (step|int == 2) when:
- 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

View File

@ -124,8 +124,12 @@ outputs:
register: neutron_metadata_agent_enabled register: neutron_metadata_agent_enabled
- 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: (neutron_metadata_agent_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- neutron_metadata_agent_enabled.rc == 0
tags: validation tags: validation
- name: Stop and disable neutron_metadata service - name: Stop and disable neutron_metadata service
when: (neutron_metadata_agent_enabled.rc == 0) and (step|int == 2) when:
- 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

View File

@ -112,8 +112,12 @@ outputs:
register: neutron_sriov_nic_agent_enabled register: neutron_sriov_nic_agent_enabled
- 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: (neutron_sriov_nic_agent_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- neutron_sriov_nic_agent_enabled.rc == 0
tags: validation tags: validation
- name: Stop and disable neutron_sriov_agent service - name: Stop and disable neutron_sriov_agent service
when: (neutron_sriov_nic_agent_enabled.rc == 0) and (step|int == 2) when:
- 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

@ -319,9 +319,15 @@ outputs:
- 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: (nova_api_enabled.rc == 0) and (httpd_enabled.rc != 0) and (step|int == 0) when:
- step|int == 0
- nova_api_enabled.rc == 0
- httpd_enabled.rc != 0
- name: Stop and disable nova_api service - name: Stop and disable nova_api service
when: (nova_api_enabled.rc == 0) and (httpd_enabled.rc != 0) and (step|int == 2) when:
- step|int == 2
- nova_api_enabled.rc == 0
- httpd_enabled.rc != 0
service: name=openstack-nova-api state=stopped enabled=no service: name=openstack-nova-api state=stopped enabled=no
- name: Check if httpd service is running - name: Check if httpd service is running
command: systemctl is-active --quiet httpd command: systemctl is-active --quiet httpd
@ -331,9 +337,15 @@ outputs:
- name: "PreUpgrade step0,validation: Check if nova_wsgi is running" - name: "PreUpgrade step0,validation: Check if nova_wsgi is running"
tags: validation tags: validation
shell: systemctl status 'httpd' | grep -q 'nova' shell: systemctl status 'httpd' | grep -q 'nova'
when: (httpd_enabled.rc == 0) and (httpd_running.rc == 0) and (step|int == 0) when:
- step|int == 0
- httpd_enabled.rc == 0
- httpd_running.rc == 0
- name: Stop nova_api service (running under httpd) - name: Stop nova_api service (running under httpd)
when: (httpd_enabled.rc == 0) and (httpd_running.rc == 0) and (step|int == 2) when:
- step|int == 2
- httpd_enabled.rc == 0
- httpd_running.rc == 0
service: name=httpd state=stopped service: name=httpd state=stopped
- name: Set fact for removal of openstack-nova-api package - name: Set fact for removal of openstack-nova-api package
when: step|int == 2 when: step|int == 2
@ -342,7 +354,9 @@ outputs:
- name: Remove openstack-nova-api package if operator requests it - name: Remove openstack-nova-api package if operator requests it
yum: name=openstack-nova-api state=removed yum: name=openstack-nova-api state=removed
ignore_errors: True ignore_errors: True
when: (remove_nova_api_package|bool) and (step|int == 2) when:
- step|int == 2
- remove_nova_api_package|bool
- name: remove old nova cron jobs - name: remove old nova cron jobs
when: step|int == 2 when: step|int == 2
file: file:

View File

@ -203,9 +203,13 @@ outputs:
- 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: (nova_compute_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- nova_compute_enabled.rc == 0
- name: Stop and disable nova-compute service - name: Stop and disable nova-compute service
when: (nova_compute_enabled.rc == 0) and (step|int == 2) when:
- 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 when: step|int == 2
@ -214,4 +218,6 @@ outputs:
- 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: (remove_nova_compute_package|bool) and (step|int == 2) when:
- step|int == 2
- remove_nova_compute_package|bool

View File

@ -143,9 +143,13 @@ outputs:
- name: "PreUpgrade step0,validation: Check service openstack-nova-conductor is running" - name: "PreUpgrade step0,validation: Check service openstack-nova-conductor is running"
command: systemctl is-active --quiet openstack-nova-conductor command: systemctl is-active --quiet openstack-nova-conductor
tags: validation tags: validation
when: (nova_conductor_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- nova_conductor_enabled.rc == 0
- name: Stop and disable nova_conductor service - name: Stop and disable nova_conductor service
when: (nova_conductor_enabled.rc == 0) and (step|int == 2) when:
- 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 when: step|int == 2
@ -154,4 +158,6 @@ outputs:
- 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: (remove_nova_conductor_package|bool) and (step|int == 2) when:
- step|int == 2
- remove_nova_conductor_package|bool

View File

@ -131,9 +131,13 @@ outputs:
- 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: (nova_consoleauth_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- nova_consoleauth_enabled.rc == 0
- name: Stop and disable nova_consoleauth service - name: Stop and disable nova_consoleauth service
when: (nova_consoleauth_enabled.rc == 0) and (step|int == 2) when:
- 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 when: step|int == 2
@ -142,4 +146,6 @@ outputs:
- 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: (remove_nova_console_package|bool) and (step|int == 2) when:
- step|int == 2
- remove_nova_console_package|bool

View File

@ -138,7 +138,11 @@ outputs:
- 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: (nova_ironic_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- nova_ironic_enabled.rc == 0
- name: Stop and disable nova-compute service - name: Stop and disable nova-compute service
when: (nova_ironic_enabled.rc == 0) and (step|int == 2) when:
- 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

View File

@ -318,7 +318,11 @@ outputs:
- 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: (nova_libvirt_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- nova_libvirt_enabled.rc == 0
- name: Stop and disable libvirtd service - name: Stop and disable libvirtd service
when: (nova_libvirt_enabled.rc == 0) and (step|int == 2) when:
- step|int == 2
- nova_libvirt_enabled.rc == 0
service: name=libvirtd state=stopped enabled=no service: name=libvirtd state=stopped enabled=no

View File

@ -125,7 +125,11 @@ outputs:
- 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: (nova_metadata_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- nova_metadata_enabled.rc == 0
- name: Stop and disable nova_api service - name: Stop and disable nova_api service
when: (nova_metadata_enabled.rc == 0) and (step|int == 2) when:
- 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

View File

@ -151,9 +151,15 @@ outputs:
- name: "PreUpgrade step0,validation: Check if placement_wsgi is running" - name: "PreUpgrade step0,validation: Check if placement_wsgi is running"
shell: systemctl status 'httpd' | grep -q placement_wsgi shell: systemctl status 'httpd' | grep -q placement_wsgi
tags: validation tags: validation
when: (httpd_enabled.rc == 0) and (httpd_running.rc == 0) and (step|int == 0) when:
- step|int == 0
- httpd_enabled.rc == 0
- httpd_running.rc == 0
- name: Stop and disable nova_placement service (running under httpd) - name: Stop and disable nova_placement service (running under httpd)
when: (httpd_enabled.rc == 0) and (httpd_running.rc == 0) and (step|int == 2) when:
- step|int == 2
- httpd_enabled.rc == 0
- httpd_running.rc == 0
service: name=httpd state=stopped enabled=no service: name=httpd state=stopped enabled=no
- name: Set fact for removal of httpd package - name: Set fact for removal of httpd package
when: step|int == 2 when: step|int == 2
@ -162,5 +168,7 @@ outputs:
- 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: (remove_httpd_package|bool) and (step|int == 2) when:
- step|int == 2
- remove_httpd_package|bool

View File

@ -132,9 +132,13 @@ outputs:
- 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: (nova_scheduler_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- nova_scheduler_enabled.rc == 0
- name: Stop and disable nova_scheduler service - name: Stop and disable nova_scheduler service
when: (nova_scheduler_enabled.rc == 0) and (step|int == 2) when:
- 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 when: step|int == 2
@ -143,4 +147,6 @@ outputs:
- 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: (remove_nova_scheduler_package|bool) and (step|int == 2) when:
- step|int == 2
- remove_nova_scheduler_package|bool

View File

@ -131,9 +131,13 @@ outputs:
- 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: (nova_vncproxy_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- nova_vncproxy_enabled.rc == 0
- name: Stop and disable nova_vnc_proxy service - name: Stop and disable nova_vnc_proxy service
when: (nova_vncproxy_enabled.rc == 0) and (step|int == 2) when:
- 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 when: step|int == 2
@ -142,4 +146,6 @@ outputs:
- 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: (remove_nova_novncproxy_package|bool) and (step|int == 2) when:
- step|int == 2
- remove_nova_novncproxy_package|bool

View File

@ -135,4 +135,6 @@ outputs:
- 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: (remove_octavia_health_manager_package|bool) and (step|int == 2) when:
- step|int == 2
- remove_octavia_health_manager_package|bool

View File

@ -150,10 +150,14 @@ outputs:
register: opendaylight_enabled register: opendaylight_enabled
- 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: (opendaylight_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- opendaylight_enabled.rc == 0
tags: validation tags: validation
- name: Stop and disable opendaylight_api service - name: Stop and disable opendaylight_api service
when: (opendaylight_enabled.rc == 0) and (step|int == 2) when:
- step|int == 2
- opendaylight_enabled.rc == 0
service: name=opendaylight state=stopped enabled=no service: name=opendaylight state=stopped enabled=no
# Containarised deployment upgrade steps # Containarised deployment upgrade steps
- name: remove journal and snapshots - name: remove journal and snapshots

View File

@ -135,8 +135,12 @@ outputs:
register: ovn_controller_enabled register: ovn_controller_enabled
- 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: (ovn_controller_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- ovn_controller_enabled.rc == 0
tags: validation tags: validation
- name: Stop and disable ovn-controller service - name: Stop and disable ovn-controller service
when: (ovn_controller_enabled.rc == 0) and (step|int == 2) when:
- 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

@ -212,8 +212,12 @@ outputs:
register: ovn_northd_enabled register: ovn_northd_enabled
- 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: (ovn_northd_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- ovn_northd_enabled.rc == 0
tags: validation tags: validation
- name: Stop and disable ovn-northd service - name: Stop and disable ovn-northd service
when: (ovn_northd_enabled.rc == 0) and (step|int == 2) when:
- 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

@ -146,8 +146,12 @@ outputs:
register: networking_ovn_metadata_agent_enabled register: networking_ovn_metadata_agent_enabled
- 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: (networking_ovn_metadata_agent_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- networking_ovn_metadata_agent_enabled.rc == 0
tags: validation tags: validation
- name: Stop and disable networking_ovn_metadata service - name: Stop and disable networking_ovn_metadata service
when: (networking_ovn_metadata_agent_enabled.rc == 0) and (step|int == 2) when:
- 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

@ -213,7 +213,9 @@ outputs:
- name: set is_bootstrap_node fact - name: set is_bootstrap_node fact
tags: common 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}}
- when: (is_bootstrap_node) and (step|int == 2) - when:
- step|int == 2
- is_bootstrap_node|bool
block: block:
- name: Disable the openstack-cinder-backup cluster resource - name: Disable the openstack-cinder-backup cluster resource
pacemaker_resource: pacemaker_resource:

View File

@ -238,7 +238,9 @@ outputs:
- name: set is_bootstrap_node fact - name: set is_bootstrap_node fact
tags: common 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}}
- when: (is_bootstrap_node) and (step|int == 2) - when:
- step|int == 2
- is_bootstrap_node|bool
block: block:
- name: Disable the openstack-cinder-volume cluster resource - name: Disable the openstack-cinder-volume cluster resource
pacemaker_resource: pacemaker_resource:

View File

@ -282,7 +282,10 @@ outputs:
check_mode: true check_mode: true
ignore_errors: true ignore_errors: true
register: galera_res register: galera_res
- when: (is_bootstrap_node) and (galera_res|succeeded) and (step|int == 2) - when:
- step|int == 2
- is_bootstrap_node|bool
- galera_res|succeeded
block: block:
- name: Disable the galera cluster resource - name: Disable the galera cluster resource
pacemaker_resource: pacemaker_resource:

View File

@ -197,7 +197,10 @@ outputs:
check_mode: true check_mode: true
ignore_errors: true ignore_errors: true
register: redis_res register: redis_res
- when: (is_bootstrap_node) and (redis_res|succeeded) and (step|int == 2) - when:
- step|int == 2
- is_bootstrap_node|bool
- redis_res|succeeded
block: block:
- name: Disable the redis cluster resource - name: Disable the redis cluster resource
pacemaker_resource: pacemaker_resource:

View File

@ -234,7 +234,10 @@ outputs:
check_mode: true check_mode: true
ignore_errors: true ignore_errors: true
register: haproxy_res register: haproxy_res
- when: (is_bootstrap_node) and (haproxy_res|succeeded) and (step|int == 2) - when:
- step|int == 2
- is_bootstrap_node|bool
- haproxy_res|succeeded
block: block:
- name: Disable the haproxy cluster resource. - name: Disable the haproxy cluster resource.
pacemaker_resource: pacemaker_resource:

View File

@ -235,7 +235,10 @@ outputs:
check_mode: true check_mode: true
ignore_errors: true ignore_errors: true
register: rabbitmq_res register: rabbitmq_res
- when: (is_bootstrap_node) and (rabbitmq_res|succeeded) and (step|int == 2) - when:
- step|int == 2
- is_bootstrap_node|bool
- rabbitmq_res|succeeded
block: block:
- name: Disable the rabbitmq cluster resource. - name: Disable the rabbitmq cluster resource.
pacemaker_resource: pacemaker_resource:

View File

@ -232,10 +232,14 @@ outputs:
register: rabbitmq_enabled register: rabbitmq_enabled
- 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: (rabbitmq_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- rabbitmq_enabled.rc == 0
tags: validation tags: validation
- name: Stop and disable rabbitmq service - name: Stop and disable rabbitmq service
when: (rabbitmq_enabled.rc == 0) and (step|int == 2) when:
- 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

@ -152,10 +152,14 @@ outputs:
register: sahara_api_enabled register: sahara_api_enabled
- 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: (sahara_api_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- sahara_api_enabled.rc == 0
tags: validation tags: validation
- name: Stop and disable sahara_api service - name: Stop and disable sahara_api service
when: (sahara_api_enabled.rc == 0) and (step|int == 2) when:
- 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 when: step|int == 2
@ -164,4 +168,6 @@ outputs:
- 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: (remove_sahara_api_package|bool) and (step|int == 2) when:
- step|int == 2
- remove_sahara_api_package|bool

View File

@ -137,10 +137,14 @@ outputs:
register: sahara_engine_enabled register: sahara_engine_enabled
- 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: (sahara_engine_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- sahara_engine_enabled.rc == 0
tags: validation tags: validation
- name: Stop and disable sahara_engine service - name: Stop and disable sahara_engine service
when: (sahara_engine_enabled.rc == 0) and (step|int == 2) when:
- 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 when: step|int == 2
@ -149,4 +153,6 @@ outputs:
- 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: (remove_sahara_engine_package|bool) and (step|int == 2) when:
- step|int == 2
- remove_sahara_engine_package|bool

View File

@ -160,8 +160,12 @@ outputs:
register: sensu_enabled register: sensu_enabled
- 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: (sensu_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- sensu_enabled.rc == 0
tags: validation tags: validation
- name: Stop and disable sensu-client service - name: Stop and disable sensu-client service
when: (sensu_enabled.rc == 0) and (step|int == 2) when:
- step|int == 2
- sensu_enabled.rc == 0
service: name=sensu-client state=stopped enabled=no service: name=sensu-client state=stopped enabled=no

View File

@ -157,11 +157,15 @@ outputs:
- openstack-swift-object-expirer - openstack-swift-object-expirer
- 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: (item.rc == 0) and (step|int == 0) when:
- step|int == 0
- item.rc == 0
tags: validation tags: validation
with_items: "{{ swift_proxy_services_enabled.results }}" with_items: "{{ swift_proxy_services_enabled.results }}"
- name: Stop and disable swift-proxy and swift-object-expirer services - name: Stop and disable swift-proxy and swift-object-expirer services
when: (item.rc == 0) and (step|int == 2) when:
- 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
@ -171,6 +175,8 @@ outputs:
- 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: (remove_swift_proxy_package|bool) and (step|int == 2) when:
- 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]

View File

@ -504,11 +504,15 @@ outputs:
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: (item.rc == 0) and (step|int == 0) when:
- step|int == 0
- item.rc == 0
- 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: (item.rc == 0) and (step|int == 2) when:
- 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 when: step|int == 2
set_fact: set_fact:
@ -516,7 +520,9 @@ outputs:
- 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: (remove_swift_package|bool) and (step|int == 2) when:
- step|int == 2
- remove_swift_package|bool
with_items: with_items:
- openstack-swift-container - openstack-swift-container
- openstack-swift-object - openstack-swift-object

View File

@ -150,8 +150,12 @@ outputs:
register: tacker_enabled register: tacker_enabled
- 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: (tacker_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- tacker_enabled.rc == 0
tags: validation tags: validation
- name: Stop and disable tacker-server service - name: Stop and disable tacker-server service
when: (tacker_enabled.rc == 0) and (step|int == 2) when:
- 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

View File

@ -208,9 +208,15 @@ outputs:
- name: "PreUpgrade step0,validation: Check if zaqar_wsgi is running" - name: "PreUpgrade step0,validation: Check if zaqar_wsgi is running"
shell: systemctl status 'httpd' | grep -q zaqar_wsgi shell: systemctl status 'httpd' | grep -q zaqar_wsgi
tags: validation tags: validation
when: (httpd_enabled.rc == 0) and (httpd_running.rc == 0) and (step|int == 0) when:
- step|int == 0
- httpd_enabled.rc == 0
- httpd_running.rc == 0
- name: Stop and disable zaqar service - name: Stop and disable zaqar service
when: (httpd_enabled.rc == 0) and (httpd_running.rc == 0) and (step|int == 2) when:
- step|int == 2
- httpd_enabled.rc == 0
- httpd_running.rc == 0
service: name=httpd state=stopped enabled=no service: name=httpd state=stopped enabled=no
metadata_settings: metadata_settings:
get_attr: [ZaqarBase, role_data, metadata_settings] get_attr: [ZaqarBase, role_data, metadata_settings]

View File

@ -63,8 +63,12 @@ outputs:
register: aodh_evaluator_enabled register: aodh_evaluator_enabled
- name: "PreUpgrade step0,validation: Check service openstack-aodh-evaluator is running" - name: "PreUpgrade step0,validation: Check service openstack-aodh-evaluator is running"
shell: /usr/bin/systemctl show 'openstack-aodh-evaluator' --property ActiveState | grep '\bactive\b' shell: /usr/bin/systemctl show 'openstack-aodh-evaluator' --property ActiveState | grep '\bactive\b'
when: (aodh_evaluator_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- aodh_evaluator_enabled.rc == 0
tags: validation tags: validation
- name: Stop aodh_evaluator service - name: Stop aodh_evaluator service
when: (aodh_evaluator_enabled.rc == 0) and (step|int == 1) when:
- step|int == 1
- aodh_evaluator_enabled.rc == 0
service: name=openstack-aodh-evaluator state=stopped service: name=openstack-aodh-evaluator state=stopped

View File

@ -63,8 +63,12 @@ outputs:
register: aodh_listener_enabled register: aodh_listener_enabled
- name: "PreUpgrade step0,validation: Check service openstack-aodh-listener is running" - name: "PreUpgrade step0,validation: Check service openstack-aodh-listener is running"
shell: /usr/bin/systemctl show 'openstack-aodh-listener' --property ActiveState | grep '\bactive\b' shell: /usr/bin/systemctl show 'openstack-aodh-listener' --property ActiveState | grep '\bactive\b'
when: (aodh_listener_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- aodh_listener_enabled.rc == 0
tags: validation tags: validation
- name: Stop aodh_listener service - name: Stop aodh_listener service
when: (aodh_listener_enabled.rc == 0) and (step|int == 1) when:
- step|int == 1
- aodh_listener_enabled.rc == 0
service: name=openstack-aodh-listener state=stopped service: name=openstack-aodh-listener state=stopped

View File

@ -63,8 +63,12 @@ outputs:
register: aodh_notifier_enabled register: aodh_notifier_enabled
- name: "PreUpgrade step0,validation: Check service openstack-aodh-notifier is running" - name: "PreUpgrade step0,validation: Check service openstack-aodh-notifier is running"
shell: /usr/bin/systemctl show 'openstack-aodh-notifier' --property ActiveState | grep '\bactive\b' shell: /usr/bin/systemctl show 'openstack-aodh-notifier' --property ActiveState | grep '\bactive\b'
when: (aodh_notifier_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- aodh_notifier_enabled.rc == 0
tags: validation tags: validation
- name: Stop aodh_notifier service - name: Stop aodh_notifier service
when: (aodh_notifier_enabled.rc == 0) and (step|int == 1) when:
- step|int == 1
- aodh_notifier_enabled.rc == 0
service: name=openstack-aodh-notifier state=stopped service: name=openstack-aodh-notifier state=stopped

View File

@ -132,7 +132,9 @@ outputs:
register: httpd_enabled register: httpd_enabled
- name: "PreUpgrade step0,validation: Check service httpd is running" - name: "PreUpgrade step0,validation: Check service httpd is running"
shell: /usr/bin/systemctl show 'httpd' --property ActiveState | grep '\bactive\b' shell: /usr/bin/systemctl show 'httpd' --property ActiveState | grep '\bactive\b'
when: (httpd_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- httpd_enabled.rc == 0
tags: validation tags: validation
- name: Ensure mod_ssl package is installed - name: Ensure mod_ssl package is installed
when: step|int == 3 when: step|int == 3

View File

@ -54,8 +54,12 @@ outputs:
shell: > shell: >
/usr/bin/systemctl show 'auditd' --property ActiveState | /usr/bin/systemctl show 'auditd' --property ActiveState |
grep '\bactive\b' grep '\bactive\b'
when: (auditd_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- auditd_enabled.rc == 0
tags: validation tags: validation
- name: Stop auditd service - name: Stop auditd service
when: (auditd_enabled.rc == 0) and (step|int == 2) when:
- step|int == 2
- auditd_enabled.rc == 0
service: name=auditd state=stopped service: name=auditd state=stopped

View File

@ -209,8 +209,12 @@ outputs:
register: barbican_api_enabled register: barbican_api_enabled
- name: "PreUpgrade step0,validation: Check service openstack-barbican-api is running" - name: "PreUpgrade step0,validation: Check service openstack-barbican-api is running"
shell: /usr/bin/systemctl show 'openstack-barbican-api' --property ActiveState | grep '\bactive\b' shell: /usr/bin/systemctl show 'openstack-barbican-api' --property ActiveState | grep '\bactive\b'
when: (barbican_api_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- barbican_api_enabled.rc == 0
tags: validation tags: validation
- name: Install openstack-barbican-api package if it was disabled - name: Install openstack-barbican-api package if it was disabled
yum: name=openstack-barbican-api state=latest yum: name=openstack-barbican-api state=latest
when: (barbican_api_enabled.rc != 0) and (step|int == 3) when:
- step|int == 3
- barbican_api_enabled.rc != 0

View File

@ -80,8 +80,12 @@ outputs:
register: ceilometer_agent_central_enabled register: ceilometer_agent_central_enabled
- name: "PreUpgrade step0,validation: Check service openstack-ceilometer-central is running" - name: "PreUpgrade step0,validation: Check service openstack-ceilometer-central is running"
shell: /usr/bin/systemctl show 'openstack-ceilometer-central' --property ActiveState | grep '\bactive\b' shell: /usr/bin/systemctl show 'openstack-ceilometer-central' --property ActiveState | grep '\bactive\b'
when: (ceilometer_agent_central_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- ceilometer_agent_central_enabled.rc == 0
tags: validation tags: validation
- name: Stop ceilometer_agent_central service - name: Stop ceilometer_agent_central service
when: (ceilometer_agent_central_enabled.rc == 0) and (step|int == 1) when:
- step|int == 1
- ceilometer_agent_central_enabled.rc == 0
service: name=openstack-ceilometer-central state=stopped service: name=openstack-ceilometer-central state=stopped

View File

@ -79,8 +79,12 @@ outputs:
register: ceilometer_agent_compute_enabled register: ceilometer_agent_compute_enabled
- name: "PreUpgrade step0,validation: Check service openstack-ceilometer-compute is running" - name: "PreUpgrade step0,validation: Check service openstack-ceilometer-compute is running"
shell: /usr/bin/systemctl show 'openstack-ceilometer-compute' --property ActiveState | grep '\bactive\b' shell: /usr/bin/systemctl show 'openstack-ceilometer-compute' --property ActiveState | grep '\bactive\b'
when: (ceilometer_agent_compute_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- ceilometer_agent_compute_enabled.rc == 0
tags: validation tags: validation
- name: Stop ceilometer_agent_compute service - name: Stop ceilometer_agent_compute service
when: (ceilometer_agent_compute_enabled.rc == 0) and (step|int == 1) when:
- step|int == 1
- ceilometer_agent_compute_enabled.rc == 0
service: name=openstack-ceilometer-compute state=stopped service: name=openstack-ceilometer-compute state=stopped

View File

@ -80,11 +80,17 @@ outputs:
shell: > shell: >
/usr/bin/systemctl show 'openstack-ceilometer-ipmi' --property ActiveState | /usr/bin/systemctl show 'openstack-ceilometer-ipmi' --property ActiveState |
grep '\bactive\b' grep '\bactive\b'
when: (ceilometer_ipmi_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- ceilometer_ipmi_enabled.rc == 0
tags: validation tags: validation
- name: Stop openstack-ceilometer-ipmi service - name: Stop openstack-ceilometer-ipmi service
when: (ceilometer_ipmi_enabled.rc == 0) and (step|int == 1) when:
- step|int == 1
- ceilometer_ipmi_enabled.rc == 0
service: name=openstack-ceilometer-ipmi state=stopped service: name=openstack-ceilometer-ipmi state=stopped
- name: Install openstack-ceilometer-ipmi package if it was disabled - name: Install openstack-ceilometer-ipmi package if it was disabled
yum: name=openstack-ceilometer-ipmi state=latest yum: name=openstack-ceilometer-ipmi state=latest
when: (ceilometer_ipmi_enabled.rc != 0) and (step|int == 3) when:
- step|int == 3
- ceilometer_ipmi_enabled.rc != 0

View File

@ -74,8 +74,12 @@ outputs:
register: ceilometer_agent_notification_enabled register: ceilometer_agent_notification_enabled
- name: "PreUpgrade step0,validation: Check service openstack-ceilometer-notification is running" - name: "PreUpgrade step0,validation: Check service openstack-ceilometer-notification is running"
shell: /usr/bin/systemctl show 'openstack-ceilometer-notification' --property ActiveState | grep '\bactive\b' shell: /usr/bin/systemctl show 'openstack-ceilometer-notification' --property ActiveState | grep '\bactive\b'
when: (ceilometer_agent_notification_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- ceilometer_agent_notification_enabled.rc == 0
tags: validation tags: validation
- name: Stop ceilometer_agent_notification service - name: Stop ceilometer_agent_notification service
when: (ceilometer_agent_notification_enabled.rc == 0) and (step|int == 1) when:
- step|int == 1
- ceilometer_agent_notification_enabled.rc == 0
service: name=openstack-ceilometer-notification state=stopped service: name=openstack-ceilometer-notification state=stopped

View File

@ -104,10 +104,14 @@ outputs:
register: ceph_rgw_enabled register: ceph_rgw_enabled
- name: Check status - name: Check status
shell: /usr/bin/systemctl show ceph-radosgw@{{rgw_id.stdout}} --property ActiveState | grep '\bactive\b' shell: /usr/bin/systemctl show ceph-radosgw@{{rgw_id.stdout}} --property ActiveState | grep '\bactive\b'
when: (ceph_rgw_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- ceph_rgw_enabled.rc == 0
tags: validation tags: validation
- name: Stop RGW instance - name: Stop RGW instance
when: (ceph_rgw_enabled.rc == 0) and (step|int == 1) when:
- step|int == 1
- ceph_rgw_enabled.rc == 0
service: service:
name: ceph-radosgw@{{rgw_id.stdout}} name: ceph-radosgw@{{rgw_id.stdout}}
state: stopped state: stopped

View File

@ -194,7 +194,9 @@ outputs:
register: cinder_api_enabled register: cinder_api_enabled
- name: "PreUpgrade step0,validation: Check service openstack-cinder-api is running" - name: "PreUpgrade step0,validation: Check service openstack-cinder-api is running"
shell: /usr/bin/systemctl show 'openstack-cinder-api' --property ActiveState | grep '\bactive\b' shell: /usr/bin/systemctl show 'openstack-cinder-api' --property ActiveState | grep '\bactive\b'
when: (cinder_api_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- cinder_api_enabled.rc == 0
tags: validation tags: validation
- name: check for cinder running under apache (post upgrade) - name: check for cinder running under apache (post upgrade)
when: step|int == 1 when: step|int == 1
@ -203,7 +205,11 @@ outputs:
ignore_errors: true ignore_errors: true
- name: Stop cinder_api service (running under httpd) - name: Stop cinder_api service (running under httpd)
service: name=httpd state=stopped service: name=httpd state=stopped
when: (cinder_apache.rc == 0) and (step|int == 1) when:
- step|int == 1
- cinder_apache.rc == 0
- name: Stop and disable cinder_api service (pre-upgrade not under httpd) - name: Stop and disable cinder_api service (pre-upgrade not under httpd)
when: (cinder_api_enabled.rc == 0) and (step|int == 1) when:
- step|int == 1
- cinder_api_enabled.rc == 0
service: name=openstack-cinder-api state=stopped enabled=no service: name=openstack-cinder-api state=stopped enabled=no

View File

@ -74,8 +74,12 @@ outputs:
register: cinder_scheduler_enabled register: cinder_scheduler_enabled
- name: "PreUpgrade step0,validation: Check service openstack-cinder-scheduler is running" - name: "PreUpgrade step0,validation: Check service openstack-cinder-scheduler is running"
shell: /usr/bin/systemctl show 'openstack-cinder-scheduler' --property ActiveState | grep '\bactive\b' shell: /usr/bin/systemctl show 'openstack-cinder-scheduler' --property ActiveState | grep '\bactive\b'
when: (cinder_scheduler_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- cinder_scheduler_enabled.rc == 0
tags: validation tags: validation
- name: Stop cinder_scheduler service - name: Stop cinder_scheduler service
when: (cinder_scheduler_enabled.rc == 0) and (step|int == 1) when:
- step|int == 1
- cinder_scheduler_enabled.rc == 0
service: name=openstack-cinder-scheduler state=stopped service: name=openstack-cinder-scheduler state=stopped

View File

@ -159,8 +159,12 @@ outputs:
register: cinder_volume_enabled register: cinder_volume_enabled
- name: "PreUpgrade step0,validation: Check service openstack-cinder-volume is running" - name: "PreUpgrade step0,validation: Check service openstack-cinder-volume is running"
shell: /usr/bin/systemctl show 'openstack-cinder-volume' --property ActiveState | grep '\bactive\b' shell: /usr/bin/systemctl show 'openstack-cinder-volume' --property ActiveState | grep '\bactive\b'
when: (cinder_volume_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- cinder_volume_enabled.rc == 0
tags: validation tags: validation
- name: Stop cinder_volume service - name: Stop cinder_volume service
when: (cinder_volume_enabled.rc == 0) and (step|int == 1) when:
- step|int == 1
- cinder_volume_enabled.rc == 0
service: name=openstack-cinder-volume state=stopped service: name=openstack-cinder-volume state=stopped

View File

@ -148,11 +148,17 @@ outputs:
register: congress_enabled register: congress_enabled
- name: "PreUpgrade step0,validation: Check service openstack-congress-server is running" - name: "PreUpgrade step0,validation: Check service openstack-congress-server is running"
shell: /usr/bin/systemctl show 'openstack-congress-server' --property ActiveState | grep '\bactive\b' shell: /usr/bin/systemctl show 'openstack-congress-server' --property ActiveState | grep '\bactive\b'
when: (congress_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- congress_enabled.rc == 0
tags: validation tags: validation
- name: Stop congress service - name: Stop congress service
when: (congress_enabled.rc == 0) and (step|int == 1) when:
- step|int == 1
- congress_enabled.rc == 0
service: name=openstack-congress-server state=stopped service: name=openstack-congress-server state=stopped
- name: Install openstack-congress package if it was disabled - name: Install openstack-congress package if it was disabled
yum: name=openstack-congress state=latest yum: name=openstack-congress state=latest
when: (congress_enabled.rc != 0) and (step|int == 3) when:
- step|int == 3
- congress_enabled.rc != 0

View File

@ -67,14 +67,20 @@ outputs:
shell: > shell: >
/usr/bin/systemctl show 'redis' --property ActiveState | /usr/bin/systemctl show 'redis' --property ActiveState |
grep '\bactive\b' grep '\bactive\b'
when: (redis_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- redis_enabled.rc == 0
tags: validation tags: validation
- name: Stop redis service - name: Stop redis service
when: (redis_enabled.rc == 0) and (step|int == 1) when:
- step|int == 1
- redis_enabled.rc == 0
service: name=redis state=stopped service: name=redis state=stopped
- name: Install redis package if it was disabled - name: Install redis package if it was disabled
yum: name=redis state=latest yum: name=redis state=latest
when: (redis_enabled.rc != 0) and (step|int == 3) when:
- step|int == 3
- redis_enabled.rc != 0
- name: Start redis service - name: Start redis service
when: step|int == 4 when: step|int == 4
service: name=redis state=started service: name=redis state=started

View File

@ -43,5 +43,7 @@ outputs:
ignore_errors: True ignore_errors: True
register: heat_api_cloudwatch_enabled register: heat_api_cloudwatch_enabled
- name: Stop and disable heat_api_cloudwatch service (pre-upgrade not under httpd) - name: Stop and disable heat_api_cloudwatch service (pre-upgrade not under httpd)
when: (heat_api_cloudwatch_enabled.rc == 0) and (step|int == 1) when:
- step|int == 1
- heat_api_cloudwatch_enabled.rc == 0
service: name=openstack-heat-api-cloudwatch state=stopped enabled=no service: name=openstack-heat-api-cloudwatch state=stopped enabled=no

View File

@ -43,4 +43,6 @@ outputs:
register: mongod_service register: mongod_service
- name: Stop and disable mongodb service on upgrade - name: Stop and disable mongodb service on upgrade
service: name=mongod state=stopped enabled=no service: name=mongod state=stopped enabled=no
when: (mongod_service.stat.exists) and (step|int == 1) when:
- step|int == 1
- mongod_service.stat.exists

View File

@ -204,13 +204,19 @@ outputs:
shell: > shell: >
/usr/bin/systemctl show 'openstack-ec2-api' --property ActiveState | /usr/bin/systemctl show 'openstack-ec2-api' --property ActiveState |
grep '\bactive\b' grep '\bactive\b'
when: (ec2_api_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- ec2_api_enabled.rc == 0
tags: validation tags: validation
- name: Stop openstack-ec2-api service - name: Stop openstack-ec2-api service
when: (ec2_api_enabled.rc == 0) and (step|int == 1) when:
- step|int == 1
- ec2_api_enabled.rc == 0
service: name=openstack-ec2-api state=stopped service: name=openstack-ec2-api state=stopped
- name: Install openstack-ec2-api package if it was disabled - name: Install openstack-ec2-api package if it was disabled
yum: name=openstack-ec2-api state=latest yum: name=openstack-ec2-api state=latest
when: (ec2_api_enabled.rc != 0) and (step|int == 3) when:
- step|int == 3
- ec2_api_enabled.rc != 0
metadata_settings: metadata_settings:
get_attr: [TLSProxyBase, role_data, metadata_settings] get_attr: [TLSProxyBase, role_data, metadata_settings]

View File

@ -106,7 +106,9 @@ outputs:
shell: > shell: >
/usr/bin/systemctl show 'etcd' --property ActiveState | /usr/bin/systemctl show 'etcd' --property ActiveState |
grep '\bactive\b' grep '\bactive\b'
when: (etcd_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- etcd_enabled.rc == 0
tags: validation tags: validation
- name: Stop etcd service - name: Stop etcd service
when: step|int == 2 when: step|int == 2

View File

@ -300,10 +300,16 @@ outputs:
- name: "PreUpgrade step0,validation: Check service openstack-glance-api is running" - name: "PreUpgrade step0,validation: Check service openstack-glance-api is running"
shell: /usr/bin/systemctl show 'openstack-glance-api' --property ActiveState | grep '\bactive\b' shell: /usr/bin/systemctl show 'openstack-glance-api' --property ActiveState | grep '\bactive\b'
tags: validation tags: validation
when: (glance_api_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- glance_api_enabled.rc == 0
- name: Stop glance_api service - name: Stop glance_api service
when: (glance_api_enabled.rc == 0) and (step|int == 1) when:
- step|int == 1
- glance_api_enabled.rc == 0
service: name=openstack-glance-api state=stopped service: name=openstack-glance-api state=stopped
- name: Stop and disable glance registry (removed for Ocata) - name: Stop and disable glance registry (removed for Ocata)
when: (glance_registry_enabled.rc == 0) and (step|int == 1) when:
- step|int == 1
- glance_registry_enabled.rc == 0
service: name=openstack-glance-registry state=stopped enabled=no service: name=openstack-glance-registry state=stopped enabled=no

View File

@ -171,4 +171,6 @@ outputs:
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: Setup gnocchi db during upgrade - name: Setup gnocchi db during upgrade
command: gnocchi-upgrade command: gnocchi-upgrade
when: (is_bootstrap_node) and (step|int == 5) when:
- step|int == 5
- is_bootstrap_node|bool

View File

@ -74,8 +74,12 @@ outputs:
register: gnocchi_metricd_enabled register: gnocchi_metricd_enabled
- name: "PreUpgrade step0,validation: Check service openstack-gnocchi-metricd is running" - name: "PreUpgrade step0,validation: Check service openstack-gnocchi-metricd is running"
shell: /usr/bin/systemctl show 'openstack-gnocchi-metricd' --property ActiveState | grep '\bactive\b' shell: /usr/bin/systemctl show 'openstack-gnocchi-metricd' --property ActiveState | grep '\bactive\b'
when: (gnocchi_metricd_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- gnocchi_metricd_enabled.rc == 0
tags: validation tags: validation
- name: Stop gnocchi_metricd service - name: Stop gnocchi_metricd service
when: (gnocchi_metricd_enabled.rc == 0) and (step|int == 1) when:
- step|int == 1
- gnocchi_metricd_enabled.rc == 0
service: name=openstack-gnocchi-metricd state=stopped service: name=openstack-gnocchi-metricd state=stopped

View File

@ -68,8 +68,12 @@ outputs:
register: gnocchi_statsd_enabled register: gnocchi_statsd_enabled
- name: "PreUpgrade step0,validation: Check service openstack-gnocchi-statsd is running" - name: "PreUpgrade step0,validation: Check service openstack-gnocchi-statsd is running"
shell: /usr/bin/systemctl show 'openstack-gnocchi-statsd' --property ActiveState | grep '\bactive\b' shell: /usr/bin/systemctl show 'openstack-gnocchi-statsd' --property ActiveState | grep '\bactive\b'
when: (gnocchi_statsd_enabled.rc == 0) and (step|int == 0) when:
- step|int == 0
- gnocchi_statsd_enabled.rc == 0
tags: validation tags: validation
- name: Stop gnocchi_statsd service - name: Stop gnocchi_statsd service
when: (gnocchi_statsd_enabled.rc == 0) and (step|int == 1) when:
- step|int == 1
- gnocchi_statsd_enabled.rc == 0
service: name=openstack-gnocchi-statsd state=stopped service: name=openstack-gnocchi-statsd state=stopped

Some files were not shown because too many files have changed in this diff Show More