Convert tags to when statements for Q major upgrade workflow
This converts "tags: stepN" to "when: step|int == N" for the direct
execution as an ansible playbook, with a loop variable 'step'.
The tasks all include the explicit cast |int.
This also adds a set_fact task for handling of the package removal
with the UpgradeRemovePackages parameter (no change to the interface)
The yaml-validate also now checks for duplicate 'when:' statements
Q upgrade spec @ Ibde21e6efae3a7d311bee526d63c5692c4e27b28
Related Blueprint: major-upgrade-workflow
[0]: 394a92f761/tripleo_common/utils/config.py (L141)
Change-Id: I6adc5619a28099f4e241351b63377f1e96933810
This commit is contained in:
parent
587cd86c54
commit
dec003def8
@ -179,16 +179,18 @@ outputs:
|
|||||||
register: httpd_running
|
register: httpd_running
|
||||||
- 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: step0,validation
|
tags: validation
|
||||||
when: httpd_enabled.rc == 0 and httpd_running.rc == 0
|
when: (httpd_enabled.rc == 0) and (httpd_running.rc == 0) and (step|int == 0)
|
||||||
- name: Stop and disable aodh service (running under httpd)
|
- name: Stop and disable aodh service (running under httpd)
|
||||||
tags: step2
|
when: (httpd_enabled.rc == 0) and (httpd_running.rc == 0) and (step|int == 2)
|
||||||
when: httpd_enabled.rc == 0 and 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
|
||||||
|
when: step|int == 2
|
||||||
|
set_fact:
|
||||||
|
remove_aodh_api_package: {get_param: UpgradeRemoveUnusedPackages}
|
||||||
- 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
|
||||||
tags: step2
|
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
when: {get_param: UpgradeRemoveUnusedPackages}
|
when: (remove_aodh_api_package|bool) and (step|int == 2)
|
||||||
metadata_settings:
|
metadata_settings:
|
||||||
get_attr: [AodhApiPuppetBase, role_data, metadata_settings]
|
get_attr: [AodhApiPuppetBase, role_data, metadata_settings]
|
||||||
|
@ -130,14 +130,16 @@ 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
|
when: (aodh_evaluator_enabled.rc == 0) and (step|int == 0)
|
||||||
tags: step0,validation
|
tags: validation
|
||||||
- name: Stop and disable openstack-aodh-evaluator service
|
- name: Stop and disable openstack-aodh-evaluator service
|
||||||
tags: step2
|
when: (aodh_evaluator_enabled.rc == 0) and (step|int == 2)
|
||||||
when: 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
|
||||||
|
when: step|int == 2
|
||||||
|
set_fact:
|
||||||
|
remove_aodh_evaluator_package: {get_param: UpgradeRemoveUnusedPackages}
|
||||||
- name: Remove openstack-aodh-evaluator package if operator requests it
|
- name: Remove openstack-aodh-evaluator package if operator requests it
|
||||||
yum: name=openstack-aodh-evaluator state=removed
|
yum: name=openstack-aodh-evaluator state=removed
|
||||||
tags: step2
|
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
when: {get_param: UpgradeRemoveUnusedPackages}
|
when: (remove_aodh_evaluator_package|bool) and (step|int == 2)
|
||||||
|
@ -130,14 +130,16 @@ 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
|
when: (aodh_listener_enabled.rc == 0) and (step|int == 0)
|
||||||
tags: step0,validation
|
tags: validation
|
||||||
- name: Stop and disable openstack-aodh-listener service
|
- name: Stop and disable openstack-aodh-listener service
|
||||||
tags: step2
|
when: (aodh_listener_enabled.rc == 0) and (step|int == 2)
|
||||||
when: 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
|
||||||
|
when: step|int == 2
|
||||||
|
set_fact:
|
||||||
|
remove_aodh_listener_package: {get_param: UpgradeRemoveUnusedPackages}
|
||||||
- name: Remove openstack-aodh-listener package if operator requests it
|
- name: Remove openstack-aodh-listener package if operator requests it
|
||||||
yum: name=openstack-aodh-listener state=removed
|
yum: name=openstack-aodh-listener state=removed
|
||||||
tags: step2
|
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
when: {get_param: UpgradeRemoveUnusedPackages}
|
when: (remove_aodh_listener_package|bool) and (step|int == 2)
|
||||||
|
@ -130,14 +130,16 @@ 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
|
when: (aodh_notifier_enabled.rc == 0) and (step|int == 0)
|
||||||
tags: step0,validation
|
tags: validation
|
||||||
- name: Stop and disable openstack-aodh-notifier service
|
- name: Stop and disable openstack-aodh-notifier service
|
||||||
tags: step2
|
when: (aodh_notifier_enabled.rc == 0) and (step|int == 2)
|
||||||
when: aodh_notifier_enabled.rc == 0
|
service: name=openstack-aodh-notifier.service state=stopped enabled=no
|
||||||
service: name=openstack-aodh-notifier state=stopped enabled=no
|
- name: Set fact for removal of openstack-aodh-notifier package
|
||||||
|
when: step|int == 2
|
||||||
|
set_fact:
|
||||||
|
remove_aodh_notifier_package: {get_param: UpgradeRemoveUnusedPackages}
|
||||||
- name: Remove openstack-aodh-notifier package if operator requests it
|
- name: Remove openstack-aodh-notifier package if operator requests it
|
||||||
yum: name=openstack-aodh-notifier state=removed
|
yum: name=openstack-aodh-notifier state=removed
|
||||||
tags: step2
|
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
when: {get_param: UpgradeRemoveUnusedPackages}
|
when: (remove_aodh_notifier_package|bool) and (step|int == 2)
|
||||||
|
@ -214,16 +214,17 @@ 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
|
when: (barbican_enabled.rc == 0) and (step|int == 0)
|
||||||
tags: step0,validation
|
|
||||||
- name: Stop and disable barbican_api service
|
- name: Stop and disable barbican_api service
|
||||||
tags: step2
|
when: (barbican_enabled.rc == 0) and (step|int == 2)
|
||||||
when: 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
|
||||||
|
when: step|int == 2
|
||||||
|
set_fact:
|
||||||
|
remove_barbican_api_package: {get_param: UpgradeRemoveUnusedPackages}
|
||||||
- name: Remove openstack-barbican-api package if operator requests it
|
- name: Remove openstack-barbican-api package if operator requests it
|
||||||
yum: name=openstack-barbican-api state=removed
|
yum: name=openstack-barbican-api state=removed
|
||||||
tags: step2
|
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
when: {get_param: UpgradeRemoveUnusedPackages}
|
when: (remove_barbican_api_package|bool) and (step|int == 2)
|
||||||
metadata_settings:
|
metadata_settings:
|
||||||
get_attr: [BarbicanApiBase, role_data, metadata_settings]
|
get_attr: [BarbicanApiBase, role_data, metadata_settings]
|
||||||
|
@ -143,14 +143,16 @@ 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
|
when: (ceilometer_agent_central_enabled.rc == 0) and (step|int == 0)
|
||||||
tags: step0,validation
|
tags: validation
|
||||||
- name: Stop and disable ceilometer agent central service
|
- name: Stop and disable ceilometer agent central service
|
||||||
tags: step2
|
|
||||||
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
|
when: (ceilometer_agent_central_enabled.rc == 0) and (step|int == 2)
|
||||||
|
- name: Set fact for removal of openstack-ceilometer-central package
|
||||||
|
when: step|int == 2
|
||||||
|
set_fact:
|
||||||
|
remove_ceilometer_central_package: {get_param: UpgradeRemoveUnusedPackages}
|
||||||
- name: Remove openstack-ceilometer-central package if operator requests it
|
- name: Remove openstack-ceilometer-central package if operator requests it
|
||||||
yum: name=openstack-ceilometer-central state=removed
|
yum: name=openstack-ceilometer-central state=removed
|
||||||
tags: step2
|
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
when: {get_param: UpgradeRemoveUnusedPackages}
|
when: (remove_ceilometer_central_package|bool) and (step|int == 2)
|
||||||
|
@ -122,27 +122,27 @@ 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
|
when: (openstack_ceilometer_compute_enabled.rc == 0) and (step|int == 0)
|
||||||
tags: step0,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
|
when: (openstack_ceilometer_polling_enabled.rc == 0) and (step|int == 0)
|
||||||
tags: step0,validation
|
tags: validation
|
||||||
- name: Stop and disable ceilometer compute agent
|
- name: Stop and disable ceilometer compute agent
|
||||||
tags: step2
|
|
||||||
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
|
when: (openstack_ceilometer_compute_enabled.rc|default('') == 0) and (step|int == 2)
|
||||||
- name: Stop and disable ceilometer polling agent
|
- name: Stop and disable ceilometer polling agent
|
||||||
tags: step2
|
|
||||||
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
|
when: (openstack_ceilometer_polling_enabled.rc|default('') == 0) and (step|int == 2)
|
||||||
|
- name: Set fact for removal of openstack-ceilometer-compute and polling package
|
||||||
|
when: step|int == 2
|
||||||
|
set_fact:
|
||||||
|
remove_ceilometer_compute_polling_package: {get_param: UpgradeRemoveUnusedPackages}
|
||||||
- name: Remove openstack-ceilometer-compute package if operator requests it
|
- name: Remove openstack-ceilometer-compute package if operator requests it
|
||||||
yum: name=openstack-ceilometer-compute state=removed
|
yum: name=openstack-ceilometer-compute state=removed
|
||||||
tags: step2
|
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
when: {get_param: UpgradeRemoveUnusedPackages}
|
when: (remove_ceilometer_compute_polling_package|bool) and (step|int == 2)
|
||||||
- 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
|
||||||
tags: step2
|
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
when: {get_param: UpgradeRemoveUnusedPackages}
|
when: (remove_ceilometer_compute_polling_package|bool) and (step|int == 2)
|
||||||
|
@ -125,14 +125,16 @@ 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
|
when: (ceilometer_ipmi_enabled.rc == 0) and (step|int == 0)
|
||||||
tags: step0,validation
|
tags: validation
|
||||||
- name: Stop and disable ceilometer agent ipmi service
|
- name: Stop and disable ceilometer agent ipmi service
|
||||||
tags: step2
|
|
||||||
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
|
when: (ceilometer_ipmi_enabled.rc == 0) and (step|int == 2)
|
||||||
|
- name: Set fact for removal of openstack-ceilometer-ipmi package
|
||||||
|
when: step|int == 2
|
||||||
|
set_fact:
|
||||||
|
remove_ceilometer_ipmi_package: {get_param: UpgradeRemoveUnusedPackages}
|
||||||
- name: Remove openstack-ceilometer-ipmi package if operator requests it
|
- name: Remove openstack-ceilometer-ipmi package if operator requests it
|
||||||
yum: name=openstack-ceilometer-ipmi state=removed
|
yum: name=openstack-ceilometer-ipmi state=removed
|
||||||
tags: step2
|
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
when: {get_param: UpgradeRemoveUnusedPackages}
|
when: (remove_ceilometer_ipmi_package|bool) and (step|int == 2)
|
||||||
|
@ -135,14 +135,16 @@ 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
|
when: (ceilometer_agent_notification_enabled.rc == 0) and (step|int == 0)
|
||||||
tags: step0,validation
|
tags: validation
|
||||||
- name: Stop and disable ceilometer agent notification service
|
- name: Stop and disable ceilometer agent notification service
|
||||||
tags: step2
|
|
||||||
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
|
when: (ceilometer_agent_notification_enabled.rc == 0) and (step|int == 2)
|
||||||
|
- name: Set fact for removal of openstack-ceilometer-notification package
|
||||||
|
when: step|int == 2
|
||||||
|
set_fact:
|
||||||
|
remove_ceilometer_notification_package: {get_param: UpgradeRemoveUnusedPackages}
|
||||||
- name: Remove openstack-ceilometer-notification package if operator requests it
|
- name: Remove openstack-ceilometer-notification package if operator requests it
|
||||||
yum: name=openstack-ceilometer-notification state=removed
|
yum: name=openstack-ceilometer-notification state=removed
|
||||||
tags: step2
|
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
when: {get_param: UpgradeRemoveUnusedPackages}
|
when: (remove_ceilometer_notification_package|bool) and (step|int == 2)
|
||||||
|
@ -207,28 +207,29 @@ 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
|
when: (cinder_api_enabled.rc == 0) and (step|int == 0)
|
||||||
tags: step0,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)
|
||||||
tags: step2
|
|
||||||
service: name=openstack-cinder-api state=stopped enabled=no
|
service: name=openstack-cinder-api state=stopped enabled=no
|
||||||
when: cinder_api_enabled.rc == 0
|
when: (cinder_api_enabled.rc == 0) and (step|int == 2)
|
||||||
- name: check for cinder_api running under apache (post upgrade)
|
- name: check for cinder_api running under apache (post upgrade)
|
||||||
tags: step2
|
|
||||||
shell: "httpd -t -D DUMP_VHOSTS | grep -q cinder"
|
shell: "httpd -t -D DUMP_VHOSTS | grep -q cinder"
|
||||||
register: cinder_api_apache
|
register: cinder_api_apache
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
when: step|int == 2
|
||||||
- name: Stop and disable cinder_api service
|
- name: Stop and disable cinder_api service
|
||||||
tags: step2
|
|
||||||
service: name=httpd state=stopped enabled=no
|
service: name=httpd state=stopped enabled=no
|
||||||
when: cinder_api_apache.rc == 0
|
when: (cinder_api_apache.rc == 0) and (step|int == 2)
|
||||||
- name: remove old cinder cron jobs
|
- name: remove old cinder cron jobs
|
||||||
tags: step2
|
when: step|int == 2
|
||||||
file:
|
file:
|
||||||
path: /var/spool/cron/cinder
|
path: /var/spool/cron/cinder
|
||||||
state: absent
|
state: absent
|
||||||
|
- name: Set fact for removal of httpd package
|
||||||
|
when: step|int == 2
|
||||||
|
set_fact:
|
||||||
|
remove_httpd_package: {get_param: UpgradeRemoveUnusedPackages}
|
||||||
- name: Remove httpd package if operator requests it
|
- name: Remove httpd package if operator requests it
|
||||||
yum: name=httpd state=removed
|
yum: name=httpd state=removed
|
||||||
tags: step2
|
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
when: {get_param: UpgradeRemoveUnusedPackages}
|
when: (remove_httpd_package|bool) and (step|int == 2)
|
||||||
|
@ -166,10 +166,13 @@ outputs:
|
|||||||
state: directory
|
state: directory
|
||||||
upgrade_tasks:
|
upgrade_tasks:
|
||||||
- name: Stop and disable cinder_backup service
|
- name: Stop and disable cinder_backup service
|
||||||
tags: step2
|
when: step|int == 2
|
||||||
service: name=openstack-cinder-backup state=stopped enabled=no
|
service: name=openstack-cinder-backup state=stopped enabled=no
|
||||||
|
- name: Set fact for removal of openstack-cinder package
|
||||||
|
when: step|int == 2
|
||||||
|
set_fact:
|
||||||
|
remove_cinder_package: {get_param: UpgradeRemoveUnusedPackages}
|
||||||
- name: Remove openstack-cinder package if operator requests it
|
- name: Remove openstack-cinder package if operator requests it
|
||||||
yum: name=openstack-cinder state=removed
|
yum: name=openstack-cinder state=removed
|
||||||
tags: step2
|
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
when: {get_param: UpgradeRemoveUnusedPackages}
|
when: (remove_cinder_package|bool) and (step|int == 2)
|
||||||
|
@ -138,14 +138,16 @@ 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
|
when: (cinder_scheduler_enabled.rc == 0) and (step|int == 0)
|
||||||
tags: step0,validation
|
tags: validation
|
||||||
- name: Stop and disable cinder_scheduler service
|
- name: Stop and disable cinder_scheduler service
|
||||||
tags: step2
|
when: (cinder_scheduler_enabled.rc == 0) and (step|int == 2)
|
||||||
when: 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
|
||||||
|
when: step|int == 2
|
||||||
|
set_fact:
|
||||||
|
remove_cinder_package: {get_param: UpgradeRemoveUnusedPackages}
|
||||||
- name: Remove openstack-cinder package if operator requests it
|
- name: Remove openstack-cinder package if operator requests it
|
||||||
yum: name=openstack-cinder state=removed
|
yum: name=openstack-cinder state=removed
|
||||||
tags: step2
|
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
when: {get_param: UpgradeRemoveUnusedPackages}
|
when: (remove_cinder_package|bool) and (step|int == 2)
|
||||||
|
@ -214,14 +214,16 @@ 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
|
when: (cinder_volume_enabled.rc == 0) and (step|int == 0)
|
||||||
tags: step0,validation
|
tags: validation
|
||||||
- name: Stop and disable cinder_volume service
|
- name: Stop and disable cinder_volume service
|
||||||
tags: step2
|
when: (cinder_volume_enabled.rc == 0) and (step|int == 2)
|
||||||
when: 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
|
||||||
|
when: step|int == 2
|
||||||
|
set_fact:
|
||||||
|
remove_cinder_package: {get_param: UpgradeRemoveUnusedPackages}
|
||||||
- name: Remove openstack-cinder package if operator requests it
|
- name: Remove openstack-cinder package if operator requests it
|
||||||
yum: name=openstack-cinder state=removed
|
yum: name=openstack-cinder state=removed
|
||||||
tags: step2
|
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
when: {get_param: UpgradeRemoveUnusedPackages}
|
when: (remove_cinder_package|bool) and (step|int == 2)
|
||||||
|
@ -126,14 +126,16 @@ 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
|
when: (collectd_enabled.rc == 0) and (step|int == 0)
|
||||||
tags: step0,validation
|
tags: validation
|
||||||
- name: Stop and disable collectd service
|
- name: Stop and disable collectd service
|
||||||
tags: step2
|
when: (collectd_enabled.rc == 0) and (step|int == 2)
|
||||||
when: 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
|
||||||
|
when: step|int == 2
|
||||||
|
set_fact:
|
||||||
|
remove_collectd_package: {get_param: UpgradeRemoveUnusedPackages}
|
||||||
- name: Remove collectd package if operator requests it
|
- name: Remove collectd package if operator requests it
|
||||||
yum: name=collectd state=removed
|
yum: name=collectd state=removed
|
||||||
tags: step2
|
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
when: {get_param: UpgradeRemoveUnusedPackages}
|
when: (remove_collectd_package|bool) and (step|int == 2)
|
||||||
|
@ -155,14 +155,16 @@ 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
|
when: (congress_enabled.rc == 0) and (step|int == 0)
|
||||||
tags: step0,validation
|
tags: validation
|
||||||
- name: Stop and disable congress_api service
|
- name: Stop and disable congress_api service
|
||||||
tags: step2
|
when: (congress_enabled.rc == 0) and (step|int == 2)
|
||||||
when: 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
|
||||||
|
when: step|int == 2
|
||||||
|
set_fact:
|
||||||
|
remove_congress_package: {get_param: UpgradeRemoveUnusedPackages}
|
||||||
- name: Remove openstack-congress package if operator requests it
|
- name: Remove openstack-congress package if operator requests it
|
||||||
yum: name=openstack-congress state=removed
|
yum: name=openstack-congress state=removed
|
||||||
tags: step2
|
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
when: {get_param: UpgradeRemoveUnusedPackages}
|
when: (remove_congress_package|bool) and (step|int == 2)
|
||||||
|
@ -172,9 +172,8 @@ 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
|
when: (mongod_enabled.rc == 0) and (step|int == 0)
|
||||||
tags: step0,validation
|
tags: validation
|
||||||
- name: Stop and disable mongodb service
|
- name: Stop and disable mongodb service
|
||||||
tags: step2
|
when: (mongod_enabled.rc == 0) and (step|int == 2)
|
||||||
when: mongod_enabled.rc == 0
|
|
||||||
service: name=mongod state=stopped enabled=no
|
service: name=mongod state=stopped enabled=no
|
||||||
|
@ -243,9 +243,8 @@ 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
|
when: (mariadb_enabled.rc == 0) and (step|int == 0)
|
||||||
tags: step0,validation
|
tags: validation
|
||||||
- name: Stop and disable mysql service
|
- name: Stop and disable mysql service
|
||||||
tags: step2
|
when: (mariadb_enabled.rc == 0) and (step|int == 2)
|
||||||
when: mariadb_enabled.rc == 0
|
|
||||||
service: name=mariadb state=stopped enabled=no
|
service: name=mariadb state=stopped enabled=no
|
||||||
|
@ -129,9 +129,8 @@ 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
|
when: (redis_enabled.rc == 0) and (step|int == 0)
|
||||||
tags: step0,validation
|
tags: validation
|
||||||
- name: Stop and disable redis service
|
- name: Stop and disable redis service
|
||||||
tags: step2
|
when: (redis_enabled.rc == 0) and (step|int == 2)
|
||||||
when: redis_enabled.rc == 0
|
|
||||||
service: name=redis state=stopped enabled=no
|
service: name=redis state=stopped enabled=no
|
||||||
|
@ -217,19 +217,17 @@ 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
|
when: (ec2_api_enabled.rc == 0) and (step|int == 0)
|
||||||
tags: step0,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
|
when: (ec2_api_metadata_enabled.rc == 0) and (step|int == 0)
|
||||||
tags: step0,validation
|
tags: validation
|
||||||
- name: Stop and disable EC2-API service
|
- name: Stop and disable EC2-API service
|
||||||
tags: step2
|
when: (ec2_api_enabled.rc == 0) and (step|int == 2)
|
||||||
when: 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
|
||||||
tags: step2
|
when: (ec2_api_metadata_enabled.rc == 0) and (step|int == 2)
|
||||||
when: 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]
|
||||||
|
@ -122,9 +122,8 @@ 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
|
when: (etcd_enabled.rc == 0) and (step|int == 0)
|
||||||
tags: step0,validation
|
tags: validation
|
||||||
- name: Stop and disable etcd service
|
- name: Stop and disable etcd service
|
||||||
tags: step2
|
when: (etcd_enabled.rc == 0) and (step|int == 2)
|
||||||
when: etcd_enabled.rc == 0
|
|
||||||
service: name=etcd state=stopped enabled=no
|
service: name=etcd state=stopped enabled=no
|
||||||
|
@ -122,6 +122,6 @@ outputs:
|
|||||||
state: directory
|
state: directory
|
||||||
upgrade_tasks:
|
upgrade_tasks:
|
||||||
- name: Stop and disable fluentd service
|
- name: Stop and disable fluentd service
|
||||||
tags: step2
|
when: step|int == 2
|
||||||
service: name=fluentd.service state=stopped enabled=no
|
service: name=fluentd.service state=stopped enabled=no
|
||||||
|
|
||||||
|
@ -240,16 +240,18 @@ outputs:
|
|||||||
register: glance_api_enabled
|
register: glance_api_enabled
|
||||||
- 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: step0,validation
|
tags: validation
|
||||||
when: glance_api_enabled.rc == 0
|
when: (glance_api_enabled.rc == 0) and (step|int == 0)
|
||||||
- name: Stop and disable glance_api service
|
- name: Stop and disable glance_api service
|
||||||
tags: step2
|
when: (glance_api_enabled.rc == 0) and (step|int == 2)
|
||||||
when: 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
|
||||||
|
when: step|int == 2
|
||||||
|
set_fact:
|
||||||
|
remove_glance_package: {get_param: UpgradeRemoveUnusedPackages}
|
||||||
- name: Remove openstack-glance package if operator requests it
|
- name: Remove openstack-glance package if operator requests it
|
||||||
yum: name=openstack-glance state=removed
|
yum: name=openstack-glance state=removed
|
||||||
tags: step2
|
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
when: {get_param: UpgradeRemoveUnusedPackages}
|
when: (remove_glance_package|bool) and (step|int == 2)
|
||||||
metadata_settings:
|
metadata_settings:
|
||||||
get_attr: [GlanceApiPuppetBase, role_data, metadata_settings]
|
get_attr: [GlanceApiPuppetBase, role_data, metadata_settings]
|
||||||
|
@ -202,12 +202,11 @@ 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
|
when: (gnocchi_api_enabled.rc == 0) and (httpd_enabled.rc != 0) and (step|int == 0)
|
||||||
tags: step0,validation
|
tags: validation
|
||||||
- name: Stop and disable gnocchi_api service
|
- name: Stop and disable gnocchi_api service
|
||||||
tags: step2
|
|
||||||
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
|
when: (gnocchi_api_enabled.rc == 0) and (httpd_enabled.rc != 0) and (step|int == 2)
|
||||||
- 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,11 +214,10 @@ outputs:
|
|||||||
register: httpd_running
|
register: httpd_running
|
||||||
- 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: step0,validation
|
tags: validation
|
||||||
when: httpd_enabled.rc == 0 and httpd_running.rc == 0
|
when: (httpd_enabled.rc == 0) and (httpd_running.rc == 0) and (step|int == 0)
|
||||||
- name: Stop and disable httpd service
|
- name: Stop and disable httpd service
|
||||||
tags: step2
|
when: (httpd_enabled.rc == 0) and (httpd_running.rc == 0) and (step|int == 2)
|
||||||
when: httpd_enabled.rc == 0 and 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]
|
||||||
|
@ -141,9 +141,8 @@ 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
|
when: (gnocchi_metricd_enabled.rc == 0) and (step|int == 0)
|
||||||
tags: step0,validation
|
tags: validation
|
||||||
- name: Stop and disable openstack-gnocchi-metricd service
|
- name: Stop and disable openstack-gnocchi-metricd service
|
||||||
tags: step2
|
when: (gnocchi_metricd_enabled.rc == 0) and (step|int == 2)
|
||||||
when: 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
|
||||||
|
@ -141,9 +141,8 @@ 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
|
when: (gnocchi_statsd_enabled.rc == 0) and (step|int == 0)
|
||||||
tags: step0,validation
|
tags: validation
|
||||||
- name: Stop and disable openstack-gnocchi-statsd service
|
- name: Stop and disable openstack-gnocchi-statsd service
|
||||||
tags: step2
|
when: (gnocchi_statsd_enabled.rc == 0) and (step|int == 2)
|
||||||
when: 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
|
||||||
|
@ -142,24 +142,22 @@ 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
|
when: (heat_api_cfn_enabled.rc == 0) and (httpd_enabled.rc != 0) and (step|int == 0)
|
||||||
tags: step0,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)
|
||||||
tags: step2
|
|
||||||
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
|
when: (heat_api_cfn_enabled.rc == 0) and (httpd_enabled.rc != 0) and (step|int == 2)
|
||||||
- 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
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
register: httpd_running
|
register: httpd_running
|
||||||
- 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: step0,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
|
when: (httpd_enabled.rc == 0) and (httpd_running.rc == 0) and (step|int == 0)
|
||||||
- name: Stop heat_api_cfn service (running under httpd)
|
- name: Stop heat_api_cfn service (running under httpd)
|
||||||
tags: step2
|
|
||||||
service: name=httpd state=stopped
|
service: name=httpd state=stopped
|
||||||
when: httpd_enabled.rc == 0 and httpd_running.rc == 0
|
when: (httpd_enabled.rc == 0) and (httpd_running.rc == 0) and (step|int == 2)
|
||||||
metadata_settings:
|
metadata_settings:
|
||||||
get_attr: [HeatBase, role_data, metadata_settings]
|
get_attr: [HeatBase, role_data, metadata_settings]
|
||||||
|
@ -168,12 +168,11 @@ 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
|
when: (heat_api_enabled.rc == 0) and (httpd_enabled.rc != 0) and (step|int == 0)
|
||||||
tags: step0,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)
|
||||||
tags: step2
|
|
||||||
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
|
when: (heat_api_enabled.rc == 0) and (httpd_enabled.rc != 0) and (step|int == 2)
|
||||||
- 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
|
||||||
@ -181,14 +180,13 @@ outputs:
|
|||||||
register: httpd_running
|
register: httpd_running
|
||||||
- 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: step0,validation
|
tags: validation
|
||||||
when: httpd_enabled.rc == 0 and httpd_running.rc == 0
|
when: (httpd_enabled.rc == 0) and (httpd_running.rc == 0) and (step|int == 0)
|
||||||
- name: Stop heat_api service (running under httpd)
|
- name: Stop heat_api service (running under httpd)
|
||||||
tags: step2
|
|
||||||
service: name=httpd state=stopped
|
service: name=httpd state=stopped
|
||||||
when: httpd_enabled.rc == 0 and httpd_running.rc == 0
|
when: (httpd_enabled.rc == 0) and (httpd_running.rc == 0) and (step|int == 2)
|
||||||
- name: remove old heat cron jobs
|
- name: remove old heat cron jobs
|
||||||
tags: step2
|
when: step|int == 2
|
||||||
file:
|
file:
|
||||||
path: /var/spool/cron/heat
|
path: /var/spool/cron/heat
|
||||||
state: absent
|
state: absent
|
||||||
|
@ -141,9 +141,8 @@ 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
|
when: (heat_engine_enabled.rc == 0) and (step|int == 0)
|
||||||
tags: step0,validation
|
tags: validation
|
||||||
- name: Stop and disable heat_engine service
|
- name: Stop and disable heat_engine service
|
||||||
tags: step2
|
when: (heat_engine_enabled.rc == 0) and (step|int == 2)
|
||||||
when: heat_engine_enabled.rc == 0
|
|
||||||
service: name=openstack-heat-engine state=stopped enabled=no
|
service: name=openstack-heat-engine state=stopped enabled=no
|
||||||
|
@ -194,11 +194,10 @@ 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
|
when: (httpd_enabled.rc == 0) and (step|int == 0)
|
||||||
tags: step0,validation
|
tags: validation
|
||||||
- name: Stop and disable horizon service (running under httpd)
|
- name: Stop and disable horizon service (running under httpd)
|
||||||
tags: step2
|
when: (httpd_enabled.rc == 0) and (step|int == 2)
|
||||||
when: 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]
|
||||||
|
@ -163,11 +163,10 @@ 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
|
when: (ironic_api_enabled.rc == 0) and (httpd_enabled.rc != 0) and (step|int == 0)
|
||||||
tags: step0,validation
|
tags: validation
|
||||||
- name: Stop and disable ironic_api service
|
- name: Stop and disable ironic_api service
|
||||||
tags: step2
|
when: (ironic_api_enabled.rc == 0) and (httpd_enabled.rc != 0) and (step|int == 2)
|
||||||
when: ironic_api_enabled.rc == 0 and 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,9 +175,8 @@ outputs:
|
|||||||
register: httpd_running
|
register: httpd_running
|
||||||
- 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: step0,validation
|
tags: validation
|
||||||
when: httpd_enabled.rc == 0 and httpd_running.rc == 0
|
when: (httpd_enabled.rc == 0) and (httpd_running.rc == 0) and (step|int == 0)
|
||||||
- name: Stop ironic_api service (running under httpd)
|
- name: Stop ironic_api service (running under httpd)
|
||||||
tags: step2
|
when: (httpd_enabled.rc == 0) and (httpd_running.rc == 0) and (step|int == 2)
|
||||||
when: httpd_enabled.rc == 0 and httpd_running.rc == 0
|
|
||||||
service: name=httpd state=stopped enabled=no
|
service: name=httpd state=stopped enabled=no
|
||||||
|
@ -174,9 +174,8 @@ outputs:
|
|||||||
register: ironic_conductor_enabled
|
register: ironic_conductor_enabled
|
||||||
- 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: step0,validation
|
tags: validation
|
||||||
when: ironic_conductor_enabled.rc == 0
|
when: (ironic_conductor_enabled.rc == 0) and (step|int == 0)
|
||||||
- name: Stop and disable ironic_conductor service
|
- name: Stop and disable ironic_conductor service
|
||||||
tags: step2
|
when: (ironic_conductor_enabled.rc == 0) and (step|int == 2)
|
||||||
when: ironic_conductor_enabled.rc == 0
|
|
||||||
service: name=openstack-ironic-conductor state=stopped enabled=no
|
service: name=openstack-ironic-conductor state=stopped enabled=no
|
||||||
|
@ -171,9 +171,9 @@ outputs:
|
|||||||
/var/log/containers/ironic-inspector.
|
/var/log/containers/ironic-inspector.
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
upgrade_tasks:
|
upgrade_tasks:
|
||||||
- name: Stop and disable ironic_inspector service
|
- when: step|int ==2
|
||||||
tags: step2
|
block:
|
||||||
service: name=openstack-ironic-inspector state=stopped enabled=no
|
- name: Stop and disable ironic_inspector service
|
||||||
- name: Stop and disable ironic_inspector dnsmasq service
|
service: name=openstack-ironic-inspector state=stopped enabled=no
|
||||||
tags: step2
|
- name: Stop and disable ironic_inspector dnsmasq service
|
||||||
service: name=openstack-ironic-inspector-dnsmasq state=stopped enabled=no
|
service: name=openstack-ironic-inspector-dnsmasq state=stopped enabled=no
|
||||||
|
@ -117,11 +117,10 @@ 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
|
when: (iscsid_enabled.rc == 0) and (step|int == 0)
|
||||||
tags: step0,validation
|
tags: validation
|
||||||
- name: Stop and disable iscsid service
|
- name: Stop and disable iscsid service
|
||||||
tags: step2
|
when: (iscsid_enabled.rc == 0) and (step|int == 2)
|
||||||
when: 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
|
||||||
@ -130,9 +129,8 @@ 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
|
when: (iscsid_socket_enabled.rc == 0) and (step|int == 0)
|
||||||
tags: step0,validation
|
tags: validation
|
||||||
- name: Stop and disable iscsid.socket service
|
- name: Stop and disable iscsid.socket service
|
||||||
tags: step2
|
when: (iscsid_socket_enabled.rc == 0) and (step|int == 2)
|
||||||
when: iscsid_socket_enabled.rc == 0
|
|
||||||
service: name=iscsid.socket state=stopped enabled=no
|
service: name=iscsid.socket state=stopped enabled=no
|
||||||
|
@ -209,14 +209,13 @@ outputs:
|
|||||||
register: httpd_running
|
register: httpd_running
|
||||||
- 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: step0,validation
|
tags: validation
|
||||||
when: httpd_enabled.rc == 0 and httpd_running.rc == 0
|
when: (httpd_enabled.rc == 0) and (httpd_running.rc == 0) and (step|int == 0)
|
||||||
- name: Stop and disable keystone service (running under httpd)
|
- name: Stop and disable keystone service (running under httpd)
|
||||||
tags: step2
|
when: (httpd_enabled.rc == 0) and (httpd_running.rc == 0) and (step|int == 2)
|
||||||
when: httpd_enabled.rc == 0 and 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
|
||||||
tags: step2
|
when: step|int == 2
|
||||||
file:
|
file:
|
||||||
path: /var/spool/cron/keystone
|
path: /var/spool/cron/keystone
|
||||||
state: absent
|
state: absent
|
||||||
|
@ -145,9 +145,8 @@ 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
|
when: (manila_api_enabled.rc == 0) and (step|int == 0)
|
||||||
tags: step0,validation
|
tags: validation
|
||||||
- name: Stop and disable manila_api service
|
- name: Stop and disable manila_api service
|
||||||
tags: step2
|
when: (manila_api_enabled.rc == 0) and (step|int == 2)
|
||||||
when: manila_api_enabled.rc == 0
|
|
||||||
service: name=openstack-manila-api state=stopped enabled=no
|
service: name=openstack-manila-api state=stopped enabled=no
|
||||||
|
@ -121,9 +121,8 @@ 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
|
when: (manila_scheduler_enabled.rc == 0) and (step|int == 0)
|
||||||
tags: step0,validation
|
tags: validation
|
||||||
- name: Stop and disable manila_scheduler service
|
- name: Stop and disable manila_scheduler service
|
||||||
tags: step2
|
when: (manila_scheduler_enabled.rc == 0) and (step|int == 2)
|
||||||
when: manila_scheduler_enabled.rc == 0
|
|
||||||
service: name=openstack-manila-scheduler state=stopped enabled=no
|
service: name=openstack-manila-scheduler state=stopped enabled=no
|
||||||
|
@ -140,9 +140,8 @@ 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
|
when: (manila_share_enabled.rc == 0) and (step|int == 0)
|
||||||
tags: step0,validation
|
tags: validation
|
||||||
- name: Stop and disable manila_share service
|
- name: Stop and disable manila_share service
|
||||||
tags: step2
|
when: (manila_share_enabled.rc == 0) and (step|int == 2)
|
||||||
when: manila_share_enabled.rc == 0
|
|
||||||
service: name=openstack-manila-share state=stopped enabled=no
|
service: name=openstack-manila-share state=stopped enabled=no
|
||||||
|
@ -122,9 +122,8 @@ 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
|
when: (memcached_enabled.rc == 0) and (step|int == 0)
|
||||||
tags: step0,validation
|
tags: validation
|
||||||
- name: Stop and disable memcached service
|
- name: Stop and disable memcached service
|
||||||
tags: step2
|
when: (memcached_enabled.rc == 0) and (step|int == 2)
|
||||||
when: memcached_enabled.rc == 0
|
|
||||||
service: name=memcached state=stopped enabled=no
|
service: name=memcached state=stopped enabled=no
|
||||||
|
@ -205,11 +205,10 @@ 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
|
when: (mistral_api_enabled.rc == 0) and (httpd_enabled.rc != 0) and (step|int == 0)
|
||||||
tags: step0,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)
|
||||||
tags: step2
|
when: (mistral_api_enabled.rc == 0) and (httpd_enabled.rc != 0) and (step|int == 2)
|
||||||
when: mistral_api_enabled.rc == 0 and 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,9 +217,8 @@ outputs:
|
|||||||
register: httpd_running
|
register: httpd_running
|
||||||
- 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: step0,validation
|
tags: validation
|
||||||
when: httpd_enabled.rc == 0 and httpd_running.rc == 0
|
when: (httpd_enabled.rc == 0) and (httpd_running.rc == 0) and (step|int == 0)
|
||||||
- name: Stop mistral_api service (running under httpd)
|
- name: Stop mistral_api service (running under httpd)
|
||||||
tags: step2
|
|
||||||
service: name=httpd state=stopped enabled=no
|
service: name=httpd state=stopped enabled=no
|
||||||
when: httpd_enabled.rc == 0 and httpd_running.rc == 0
|
when: (httpd_enabled.rc == 0) and (httpd_running.rc == 0) and (step|int == 2)
|
||||||
|
@ -128,9 +128,8 @@ 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
|
when: (mistral_engine_enabled.rc == 0) and (step|int == 0)
|
||||||
tags: step0,validation
|
tags: validation
|
||||||
- name: Stop and disable mistral_engine service
|
- name: Stop and disable mistral_engine service
|
||||||
tags: step2
|
when: (mistral_engine_enabled.rc == 0) and (step|int == 2)
|
||||||
when: mistral_engine_enabled.rc == 0
|
|
||||||
service: name=openstack-mistral-engine state=stopped enabled=no
|
service: name=openstack-mistral-engine state=stopped enabled=no
|
||||||
|
@ -126,9 +126,8 @@ 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
|
when: (mistral_event_engine_enabled.rc == 0) and (step|int == 0)
|
||||||
tags: step0,validation
|
tags: validation
|
||||||
- name: Stop and disable mistral_event_engine service
|
- name: Stop and disable mistral_event_engine service
|
||||||
tags: step2
|
when: (mistral_event_engine_enabled.rc == 0) and (step|int == 2)
|
||||||
when: 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
|
||||||
|
@ -132,9 +132,8 @@ 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
|
when: (mistral_executor_enabled.rc == 0) and (step|int == 0)
|
||||||
tags: step0,validation
|
tags: validation
|
||||||
- name: Stop and disable mistral_executor service
|
- name: Stop and disable mistral_executor service
|
||||||
tags: step2
|
when: (mistral_executor_enabled.rc == 0) and (step|int == 2)
|
||||||
when: mistral_executor_enabled.rc == 0
|
|
||||||
service: name=openstack-mistral-executor state=stopped enabled=no
|
service: name=openstack-mistral-executor state=stopped enabled=no
|
||||||
|
@ -93,9 +93,8 @@ 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
|
when: (multipathd_enabled.rc == 0) and (step|int == 0)
|
||||||
tags: step0,validation
|
tags: validation
|
||||||
- name: Stop and disable multipathd service
|
- name: Stop and disable multipathd service
|
||||||
tags: step2
|
when: (multipathd_enabled.rc == 0) and (step|int == 2)
|
||||||
when: multipathd_enabled.rc == 0
|
|
||||||
service: name=multipathd state=stopped enabled=no
|
service: name=multipathd state=stopped enabled=no
|
||||||
|
@ -176,16 +176,18 @@ 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
|
when: (neutron_server_enabled.rc == 0) and (step|int == 0)
|
||||||
tags: step0,validation
|
tags: validation
|
||||||
- name: Stop and disable neutron_api service
|
- name: Stop and disable neutron_api service
|
||||||
tags: step2
|
when: (neutron_server_enabled.rc == 0) and (step|int == 2)
|
||||||
when: 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
|
||||||
|
when: step|int == 2
|
||||||
|
set_fact:
|
||||||
|
remove_neutron_package: {get_param: UpgradeRemoveUnusedPackages}
|
||||||
- name: Remove openstack-neutron package if operator requests it
|
- name: Remove openstack-neutron package if operator requests it
|
||||||
yum: name=openstack-neutron state=removed
|
yum: name=openstack-neutron state=removed
|
||||||
tags: step2
|
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
when: {get_param: UpgradeRemoveUnusedPackages}
|
when: (remove_neutron_package|bool) and (step|int == 2)
|
||||||
metadata_settings:
|
metadata_settings:
|
||||||
get_attr: [NeutronBase, role_data, metadata_settings]
|
get_attr: [NeutronBase, role_data, metadata_settings]
|
||||||
|
@ -127,9 +127,8 @@ 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
|
when: (neutron_dhcp_agent_enabled.rc == 0) and (step|int == 0)
|
||||||
tags: step0,validation
|
tags: validation
|
||||||
- name: Stop and disable neutron_dhcp service
|
- name: Stop and disable neutron_dhcp service
|
||||||
tags: step2
|
when: (neutron_dhcp_agent_enabled.rc == 0) and (step|int == 2)
|
||||||
when: neutron_dhcp_agent_enabled.rc == 0
|
|
||||||
service: name=neutron-dhcp-agent state=stopped enabled=no
|
service: name=neutron-dhcp-agent state=stopped enabled=no
|
||||||
|
@ -125,9 +125,8 @@ 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
|
when: (neutron_l3_agent_enabled.rc == 0) and (step|int == 0)
|
||||||
tags: step0,validation
|
tags: validation
|
||||||
- name: Stop and disable neutron_l3 service
|
- name: Stop and disable neutron_l3 service
|
||||||
tags: step2
|
when: (neutron_l3_agent_enabled.rc == 0) and (step|int == 2)
|
||||||
when: neutron_l3_agent_enabled.rc == 0
|
|
||||||
service: name=neutron-l3-agent state=stopped enabled=no
|
service: name=neutron-l3-agent state=stopped enabled=no
|
||||||
|
@ -124,9 +124,8 @@ 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
|
when: (neutron_metadata_agent_enabled.rc == 0) and (step|int == 0)
|
||||||
tags: step0,validation
|
tags: validation
|
||||||
- name: Stop and disable neutron_metadata service
|
- name: Stop and disable neutron_metadata service
|
||||||
tags: step2
|
when: (neutron_metadata_agent_enabled.rc == 0) and (step|int == 2)
|
||||||
when: neutron_metadata_agent_enabled.rc == 0
|
|
||||||
service: name=neutron-metadata-agent state=stopped enabled=no
|
service: name=neutron-metadata-agent state=stopped enabled=no
|
||||||
|
@ -150,14 +150,16 @@ outputs:
|
|||||||
register: neutron_ovs_agent_enabled
|
register: neutron_ovs_agent_enabled
|
||||||
- name: "PreUpgrade step0,validation: Check service neutron-openvswitch-agent is running"
|
- name: "PreUpgrade step0,validation: Check service neutron-openvswitch-agent is running"
|
||||||
command: systemctl is-active --quiet neutron-openvswitch-agent
|
command: systemctl is-active --quiet neutron-openvswitch-agent
|
||||||
when: neutron_ovs_agent_enabled.rc == 0
|
when: (neutron_ovs_agent_enabled.rc == 0) and (step|int == 0)
|
||||||
tags: step0,validation
|
tags: validation
|
||||||
- name: Stop and disable neutron_ovs_agent service
|
- name: Stop and disable neutron_ovs_agent service
|
||||||
tags: step2
|
when: (neutron_ovs_agent_enabled.rc == 0) and (step|int == 2)
|
||||||
when: neutron_ovs_agent_enabled.rc == 0
|
|
||||||
service: name=neutron-openvswitch-agent state=stopped enabled=no
|
service: name=neutron-openvswitch-agent state=stopped enabled=no
|
||||||
|
- name: Set fact for removal of openstack-neutron-openvswitch package
|
||||||
|
when: step|int == 2
|
||||||
|
set_fact:
|
||||||
|
remove_neutron_openvswitch_package: {get_param: UpgradeRemoveUnusedPackages}
|
||||||
- name: Remove openstack-neutron-openvswitch package if operator requests it
|
- name: Remove openstack-neutron-openvswitch package if operator requests it
|
||||||
yum: name=openstack-neutron-openvswitch state=removed
|
yum: name=openstack-neutron-openvswitch state=removed
|
||||||
tags: step2
|
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
when: {get_param: UpgradeRemoveUnusedPackages}
|
when: (remove_neutron_openvswitch_package|bool) and (step|int == 2)
|
||||||
|
@ -112,9 +112,8 @@ 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
|
when: (neutron_sriov_nic_agent_enabled.rc == 0) and (step|int == 0)
|
||||||
tags: step0,validation
|
tags: validation
|
||||||
- name: Stop and disable neutron_sriov_agent service
|
- name: Stop and disable neutron_sriov_agent service
|
||||||
tags: step2
|
when: (neutron_sriov_nic_agent_enabled.rc == 0) and (step|int == 2)
|
||||||
when: 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
|
||||||
|
@ -318,11 +318,10 @@ outputs:
|
|||||||
register: httpd_enabled
|
register: httpd_enabled
|
||||||
- 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: step0,validation
|
tags: validation
|
||||||
when: nova_api_enabled.rc == 0 and httpd_enabled.rc != 0
|
when: (nova_api_enabled.rc == 0) and (httpd_enabled.rc != 0) and (step|int == 0)
|
||||||
- name: Stop and disable nova_api service
|
- name: Stop and disable nova_api service
|
||||||
tags: step2
|
when: (nova_api_enabled.rc == 0) and (httpd_enabled.rc != 0) and (step|int == 2)
|
||||||
when: nova_api_enabled.rc == 0 and 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
|
||||||
@ -330,20 +329,22 @@ outputs:
|
|||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
register: httpd_running
|
register: httpd_running
|
||||||
- name: "PreUpgrade step0,validation: Check if nova_wsgi is running"
|
- name: "PreUpgrade step0,validation: Check if nova_wsgi is running"
|
||||||
tags: step0,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
|
when: (httpd_enabled.rc == 0) and (httpd_running.rc == 0) and (step|int == 0)
|
||||||
- name: Stop nova_api service (running under httpd)
|
- name: Stop nova_api service (running under httpd)
|
||||||
tags: step2
|
when: (httpd_enabled.rc == 0) and (httpd_running.rc == 0) and (step|int == 2)
|
||||||
when: httpd_enabled.rc == 0 and httpd_running.rc == 0
|
|
||||||
service: name=httpd state=stopped
|
service: name=httpd state=stopped
|
||||||
|
- name: Set fact for removal of openstack-nova-api package
|
||||||
|
when: step|int == 2
|
||||||
|
set_fact:
|
||||||
|
remove_nova_api_package: {get_param: UpgradeRemoveUnusedPackages}
|
||||||
- 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
|
||||||
tags: step2
|
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
when: {get_param: UpgradeRemoveUnusedPackages}
|
when: (remove_nova_api_package|bool) and (step|int == 2)
|
||||||
- name: remove old nova cron jobs
|
- name: remove old nova cron jobs
|
||||||
tags: step2
|
when: step|int == 2
|
||||||
file:
|
file:
|
||||||
path: /var/spool/cron/nova
|
path: /var/spool/cron/nova
|
||||||
state: absent
|
state: absent
|
||||||
|
@ -182,7 +182,7 @@ outputs:
|
|||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
register: nova_compute_enabled
|
register: nova_compute_enabled
|
||||||
- name: Set compute upgrade level to auto
|
- name: Set compute upgrade level to auto
|
||||||
tags: step1
|
when: step|int == 1
|
||||||
ini_file:
|
ini_file:
|
||||||
str_replace:
|
str_replace:
|
||||||
template: "dest=/etc/nova/nova.conf section=upgrade_levels option=compute value=LEVEL"
|
template: "dest=/etc/nova/nova.conf section=upgrade_levels option=compute value=LEVEL"
|
||||||
@ -190,14 +190,16 @@ outputs:
|
|||||||
LEVEL: {get_param: UpgradeLevelNovaCompute}
|
LEVEL: {get_param: UpgradeLevelNovaCompute}
|
||||||
- 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: step0,validation
|
tags: validation
|
||||||
when: nova_compute_enabled.rc == 0
|
when: (nova_compute_enabled.rc == 0) and (step|int == 0)
|
||||||
- name: Stop and disable nova-compute service
|
- name: Stop and disable nova-compute service
|
||||||
tags: step2
|
when: (nova_compute_enabled.rc == 0) and (step|int == 2)
|
||||||
when: 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
|
||||||
|
when: step|int == 2
|
||||||
|
set_fact:
|
||||||
|
remove_nova_compute_package: {get_param: UpgradeRemoveUnusedPackages}
|
||||||
- name: Remove openstack-nova-compute package if operator requests it
|
- name: Remove openstack-nova-compute package if operator requests it
|
||||||
yum: name=openstack-nova-compute state=removed
|
yum: name=openstack-nova-compute state=removed
|
||||||
tags: step2
|
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
when: {get_param: UpgradeRemoveUnusedPackages}
|
when: (remove_nova_compute_package|bool) and (step|int == 2)
|
||||||
|
@ -134,7 +134,7 @@ outputs:
|
|||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
register: nova_conductor_enabled
|
register: nova_conductor_enabled
|
||||||
- name: Set compute upgrade level to auto
|
- name: Set compute upgrade level to auto
|
||||||
tags: step1
|
when: step|int == 1
|
||||||
ini_file:
|
ini_file:
|
||||||
str_replace:
|
str_replace:
|
||||||
template: "dest=/etc/nova/nova.conf section=upgrade_levels option=compute value=LEVEL"
|
template: "dest=/etc/nova/nova.conf section=upgrade_levels option=compute value=LEVEL"
|
||||||
@ -142,14 +142,16 @@ outputs:
|
|||||||
LEVEL: {get_param: UpgradeLevelNovaCompute}
|
LEVEL: {get_param: UpgradeLevelNovaCompute}
|
||||||
- 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: step0,validation
|
tags: validation
|
||||||
when: nova_conductor_enabled.rc == 0
|
when: (nova_conductor_enabled.rc == 0) and (step|int == 0)
|
||||||
- name: Stop and disable nova_conductor service
|
- name: Stop and disable nova_conductor service
|
||||||
tags: step2
|
when: (nova_conductor_enabled.rc == 0) and (step|int == 2)
|
||||||
when: 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
|
||||||
|
when: step|int == 2
|
||||||
|
set_fact:
|
||||||
|
remove_nova_conductor_package: {get_param: UpgradeRemoveUnusedPackages}
|
||||||
- name: Remove openstack-nova-conductor package if operator requests it
|
- name: Remove openstack-nova-conductor package if operator requests it
|
||||||
yum: name=openstack-nova-conductor state=removed
|
yum: name=openstack-nova-conductor state=removed
|
||||||
tags: step2
|
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
when: {get_param: UpgradeRemoveUnusedPackages}
|
when: (remove_nova_conductor_package|bool) and (step|int == 2)
|
||||||
|
@ -130,14 +130,16 @@ outputs:
|
|||||||
register: nova_consoleauth_enabled
|
register: nova_consoleauth_enabled
|
||||||
- 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: step0,validation
|
tags: validation
|
||||||
when: nova_consoleauth_enabled.rc == 0
|
when: (nova_consoleauth_enabled.rc == 0) and (step|int == 0)
|
||||||
- name: Stop and disable nova_consoleauth service
|
- name: Stop and disable nova_consoleauth service
|
||||||
tags: step2
|
when: (nova_consoleauth_enabled.rc == 0) and (step|int == 2)
|
||||||
when: 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
|
||||||
|
when: step|int == 2
|
||||||
|
set_fact:
|
||||||
|
remove_nova_console_package: {get_param: UpgradeRemoveUnusedPackages}
|
||||||
- name: Remove openstack-nova-console package if operator requests it
|
- name: Remove openstack-nova-console package if operator requests it
|
||||||
yum: name=openstack-nova-console state=removed
|
yum: name=openstack-nova-console state=removed
|
||||||
tags: step2
|
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
when: {get_param: UpgradeRemoveUnusedPackages}
|
when: (remove_nova_console_package|bool) and (step|int == 2)
|
||||||
|
@ -137,9 +137,8 @@ outputs:
|
|||||||
register: nova_ironic_enabled
|
register: nova_ironic_enabled
|
||||||
- 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: step0,validation
|
tags: validation
|
||||||
when: nova_ironic_enabled.rc == 0
|
when: (nova_ironic_enabled.rc == 0) and (step|int == 0)
|
||||||
- name: Stop and disable nova-compute service
|
- name: Stop and disable nova-compute service
|
||||||
tags: step2
|
when: (nova_ironic_enabled.rc == 0) and (step|int == 2)
|
||||||
when: nova_ironic_enabled.rc == 0
|
|
||||||
service: name=openstack-nova-compute state=stopped enabled=no
|
service: name=openstack-nova-compute state=stopped enabled=no
|
||||||
|
@ -317,9 +317,8 @@ outputs:
|
|||||||
register: nova_libvirt_enabled
|
register: nova_libvirt_enabled
|
||||||
- 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: step0,validation
|
tags: validation
|
||||||
when: nova_libvirt_enabled.rc == 0
|
when: (nova_libvirt_enabled.rc == 0) and (step|int == 0)
|
||||||
- name: Stop and disable libvirtd service
|
- name: Stop and disable libvirtd service
|
||||||
tags: step2
|
when: (nova_libvirt_enabled.rc == 0) and (step|int == 2)
|
||||||
when: nova_libvirt_enabled.rc == 0
|
|
||||||
service: name=libvirtd state=stopped enabled=no
|
service: name=libvirtd state=stopped enabled=no
|
||||||
|
@ -124,9 +124,8 @@ outputs:
|
|||||||
register: nova_metadata_enabled
|
register: nova_metadata_enabled
|
||||||
- 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: step0,validation
|
tags: validation
|
||||||
when: nova_metadata_enabled.rc == 0
|
when: (nova_metadata_enabled.rc == 0) and (step|int == 0)
|
||||||
- name: Stop and disable nova_api service
|
- name: Stop and disable nova_api service
|
||||||
tags: step2
|
when: (nova_metadata_enabled.rc == 0) and (step|int == 2)
|
||||||
when: nova_metadata_enabled.rc == 0
|
|
||||||
service: name=openstack-nova-api state=stopped enabled=no
|
service: name=openstack-nova-api state=stopped enabled=no
|
||||||
|
@ -150,15 +150,17 @@ outputs:
|
|||||||
register: httpd_running
|
register: httpd_running
|
||||||
- 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: step0,validation
|
tags: validation
|
||||||
when: httpd_enabled.rc == 0 and httpd_running.rc == 0
|
when: (httpd_enabled.rc == 0) and (httpd_running.rc == 0) and (step|int == 0)
|
||||||
- name: Stop and disable nova_placement service (running under httpd)
|
- name: Stop and disable nova_placement service (running under httpd)
|
||||||
tags: step2
|
when: (httpd_enabled.rc == 0) and (httpd_running.rc == 0) and (step|int == 2)
|
||||||
when: httpd_enabled.rc == 0 and 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
|
||||||
|
when: step|int == 2
|
||||||
|
set_fact:
|
||||||
|
remove_httpd_package: {get_param: UpgradeRemoveUnusedPackages}
|
||||||
- name: Remove httpd package if operator requests it
|
- name: Remove httpd package if operator requests it
|
||||||
yum: name=httpd state=removed
|
yum: name=httpd state=removed
|
||||||
tags: step2
|
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
when: {get_param: UpgradeRemoveUnusedPackages}
|
when: (remove_httpd_package|bool) and (step|int == 2)
|
||||||
|
|
||||||
|
@ -131,14 +131,16 @@ outputs:
|
|||||||
register: nova_scheduler_enabled
|
register: nova_scheduler_enabled
|
||||||
- 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: step0,validation
|
tags: validation
|
||||||
when: nova_scheduler_enabled.rc == 0
|
when: (nova_scheduler_enabled.rc == 0) and (step|int == 0)
|
||||||
- name: Stop and disable nova_scheduler service
|
- name: Stop and disable nova_scheduler service
|
||||||
tags: step2
|
when: (nova_scheduler_enabled.rc == 0) and (step|int == 2)
|
||||||
when: 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
|
||||||
|
when: step|int == 2
|
||||||
|
set_fact:
|
||||||
|
remove_nova_scheduler_package: {get_param: UpgradeRemoveUnusedPackages}
|
||||||
- name: Remove openstack-nova-scheduler package if operator requests it
|
- name: Remove openstack-nova-scheduler package if operator requests it
|
||||||
yum: name=openstack-nova-scheduler state=removed
|
yum: name=openstack-nova-scheduler state=removed
|
||||||
tags: step2
|
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
when: {get_param: UpgradeRemoveUnusedPackages}
|
when: (remove_nova_scheduler_package|bool) and (step|int == 2)
|
||||||
|
@ -130,14 +130,16 @@ outputs:
|
|||||||
register: nova_vncproxy_enabled
|
register: nova_vncproxy_enabled
|
||||||
- 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: step0,validation
|
tags: validation
|
||||||
when: nova_vncproxy_enabled.rc == 0
|
when: (nova_vncproxy_enabled.rc == 0) and (step|int == 0)
|
||||||
- name: Stop and disable nova_vnc_proxy service
|
- name: Stop and disable nova_vnc_proxy service
|
||||||
tags: step2
|
when: (nova_vncproxy_enabled.rc == 0) and (step|int == 2)
|
||||||
when: 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
|
||||||
|
when: step|int == 2
|
||||||
|
set_fact:
|
||||||
|
remove_nova_novncproxy_package: {get_param: UpgradeRemoveUnusedPackages}
|
||||||
- name: Remove openstack-nova-novncproxy package if operator requests it
|
- name: Remove openstack-nova-novncproxy package if operator requests it
|
||||||
yum: name=openstack-nova-novncproxy state=removed
|
yum: name=openstack-nova-novncproxy state=removed
|
||||||
tags: step2
|
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
when: {get_param: UpgradeRemoveUnusedPackages}
|
when: (remove_nova_novncproxy_package|bool) and (step|int == 2)
|
||||||
|
@ -184,5 +184,5 @@ outputs:
|
|||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
upgrade_tasks:
|
upgrade_tasks:
|
||||||
- name: Stop and disable octavia_api service
|
- name: Stop and disable octavia_api service
|
||||||
tags: step2
|
when: step|int == 2
|
||||||
service: name=openstack-octavia-api state=stopped enabled=no
|
service: name=openstack-octavia-api state=stopped enabled=no
|
||||||
|
@ -126,10 +126,13 @@ outputs:
|
|||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
upgrade_tasks:
|
upgrade_tasks:
|
||||||
- name: Stop and disable octavia_health_manager service
|
- name: Stop and disable octavia_health_manager service
|
||||||
tags: step2
|
when: step|int == 2
|
||||||
service: name=openstack-octavia-health-manager state=stopped enabled=no
|
service: name=openstack-octavia-health-manager state=stopped enabled=no
|
||||||
|
- name: Set fact for removal of openstack-octavia-health-manager package
|
||||||
|
when: step|int == 2
|
||||||
|
set_fact:
|
||||||
|
remove_octavia_health_manager_package: {get_param: UpgradeRemoveUnusedPackages}
|
||||||
- name: Remove openstack-octavia-health-manager package if operator requests it
|
- name: Remove openstack-octavia-health-manager package if operator requests it
|
||||||
yum: name=openstack-octavia-health-manager state=removed
|
yum: name=openstack-octavia-health-manager state=removed
|
||||||
tags: step2
|
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
when: {get_param: UpgradeRemoveUnusedPackages}
|
when: (remove_octavia_health_manager_package|bool) and (step|int == 2)
|
||||||
|
@ -122,5 +122,5 @@ outputs:
|
|||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
upgrade_tasks:
|
upgrade_tasks:
|
||||||
- name: Stop and disable octavia_housekeeping service
|
- name: Stop and disable octavia_housekeeping service
|
||||||
tags: step2
|
when: step|int == 2
|
||||||
service: name=openstack-octavia-housekeeping state=stopped enabled=no
|
service: name=openstack-octavia-housekeeping state=stopped enabled=no
|
||||||
|
@ -122,5 +122,5 @@ outputs:
|
|||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
upgrade_tasks:
|
upgrade_tasks:
|
||||||
- name: Stop and disable octavia_worker service
|
- name: Stop and disable octavia_worker service
|
||||||
tags: step2
|
when: step|int == 2
|
||||||
service: name=openstack-octavia-worker state=stopped enabled=no
|
service: name=openstack-octavia-worker state=stopped enabled=no
|
||||||
|
@ -129,9 +129,8 @@ 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
|
when: (opendaylight_enabled.rc == 0) and (step|int == 0)
|
||||||
tags: step0,validation
|
tags: validation
|
||||||
- name: Stop and disable opendaylight_api service
|
- name: Stop and disable opendaylight_api service
|
||||||
tags: step2
|
when: (opendaylight_enabled.rc == 0) and (step|int == 2)
|
||||||
when: opendaylight_enabled.rc == 0
|
|
||||||
service: name=opendaylight state=stopped enabled=no
|
service: name=opendaylight state=stopped enabled=no
|
||||||
|
@ -120,9 +120,8 @@ 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
|
when: (ovn_controller_enabled.rc == 0) and (step|int == 0)
|
||||||
tags: step0,validation
|
tags: validation
|
||||||
- name: Stop and disable ovn-controller service
|
- name: Stop and disable ovn-controller service
|
||||||
tags: step2
|
when: (ovn_controller_enabled.rc == 0) and (step|int == 2)
|
||||||
when: ovn_controller_enabled.rc == 0
|
|
||||||
service: name=ovn-controller state=stopped enabled=no
|
service: name=ovn-controller state=stopped enabled=no
|
||||||
|
@ -212,9 +212,8 @@ 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
|
when: (ovn_northd_enabled.rc == 0) and (step|int == 0)
|
||||||
tags: step0,validation
|
tags: validation
|
||||||
- name: Stop and disable ovn-northd service
|
- name: Stop and disable ovn-northd service
|
||||||
tags: step2
|
when: (ovn_northd_enabled.rc == 0) and (step|int == 2)
|
||||||
when: ovn_northd_enabled.rc == 0
|
|
||||||
service: name=ovn-northd state=stopped enabled=no
|
service: name=ovn-northd state=stopped enabled=no
|
||||||
|
@ -218,38 +218,36 @@ 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}}
|
||||||
- name: Disable the openstack-cinder-backup cluster resource
|
- when: (is_bootstrap_node) and (step|int == 2)
|
||||||
tags: step2
|
block:
|
||||||
pacemaker_resource:
|
- name: Disable the openstack-cinder-backup cluster resource
|
||||||
resource: openstack-cinder-backup
|
pacemaker_resource:
|
||||||
state: disable
|
resource: openstack-cinder-backup
|
||||||
wait_for_resource: true
|
state: disable
|
||||||
register: output
|
wait_for_resource: true
|
||||||
retries: 5
|
register: output
|
||||||
until: output.rc == 0
|
retries: 5
|
||||||
when: is_bootstrap_node
|
until: output.rc == 0
|
||||||
- name: Delete the stopped openstack-cinder-backup cluster resource.
|
- name: Delete the stopped openstack-cinder-backup cluster resource.
|
||||||
tags: step2
|
pacemaker_resource:
|
||||||
pacemaker_resource:
|
resource: openstack-cinder-backup
|
||||||
resource: openstack-cinder-backup
|
state: delete
|
||||||
state: delete
|
wait_for_resource: true
|
||||||
wait_for_resource: true
|
register: output
|
||||||
register: output
|
retries: 5
|
||||||
retries: 5
|
until: output.rc == 0
|
||||||
until: output.rc == 0
|
|
||||||
when: is_bootstrap_node
|
|
||||||
- name: Disable cinder_backup service
|
- name: Disable cinder_backup service
|
||||||
tags: step2
|
when: step|int == 2
|
||||||
service: name=openstack-cinder-backup enabled=no
|
service: name=openstack-cinder-backup enabled=no
|
||||||
update_tasks:
|
update_tasks:
|
||||||
- name: Get docker Cinder-Backup image
|
- name: Get docker Cinder-Backup image
|
||||||
set_fact:
|
set_fact:
|
||||||
docker_image: {get_param: DockerCinderBackupImage}
|
docker_image: {get_param: DockerCinderBackupImage}
|
||||||
docker_image_latest: *cinder_backup_image_pcmklatest
|
docker_image_latest: *cinder_backup_image_pcmklatest
|
||||||
when: step == '2'
|
when: step|int == 2
|
||||||
- name: Pull latest Cinder-Backup images
|
- name: Pull latest Cinder-Backup images
|
||||||
command: "docker pull {{docker_image}}"
|
command: "docker pull {{docker_image}}"
|
||||||
when: step == "2"
|
when: step|int == 2
|
||||||
- name: Get previous Cinder-Backup image id
|
- name: Get previous Cinder-Backup image id
|
||||||
shell: "docker images | awk '/cinder-backup.* pcmklatest/{print $3}'"
|
shell: "docker images | awk '/cinder-backup.* pcmklatest/{print $3}'"
|
||||||
register: cinder_backup_image_id
|
register: cinder_backup_image_id
|
||||||
@ -264,10 +262,10 @@ outputs:
|
|||||||
- name: Remove previous Cinder-Backup images
|
- name: Remove previous Cinder-Backup images
|
||||||
shell: "docker rmi -f {{cinder_backup_image_id.stdout}}"
|
shell: "docker rmi -f {{cinder_backup_image_id.stdout}}"
|
||||||
when:
|
when:
|
||||||
- step == '2'
|
- step|int == 2
|
||||||
- cinder_backup_image_id.stdout != ''
|
- cinder_backup_image_id.stdout != ''
|
||||||
- name: Retag pcmklatest to latest Cinder-Backup image
|
- name: Retag pcmklatest to latest Cinder-Backup image
|
||||||
shell: "docker tag {{docker_image}} {{docker_image_latest}}"
|
shell: "docker tag {{docker_image}} {{docker_image_latest}}"
|
||||||
when: step == "2"
|
when: step|int == 2
|
||||||
# Got to check that pacemaker_is_active is working fine with bundle.
|
# Got to check that pacemaker_is_active is working fine with bundle.
|
||||||
# TODO: pacemaker_is_active resource doesn't support bundle.
|
# TODO: pacemaker_is_active resource doesn't support bundle.
|
||||||
|
@ -243,35 +243,33 @@ 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}}
|
||||||
- name: Disable the openstack-cinder-volume cluster resource
|
- when: (is_bootstrap_node) and (step|int == 2)
|
||||||
tags: step2
|
block:
|
||||||
pacemaker_resource:
|
- name: Disable the openstack-cinder-volume cluster resource
|
||||||
resource: openstack-cinder-volume
|
pacemaker_resource:
|
||||||
state: disable
|
resource: openstack-cinder-volume
|
||||||
wait_for_resource: true
|
state: disable
|
||||||
register: output
|
wait_for_resource: true
|
||||||
retries: 5
|
register: output
|
||||||
until: output.rc == 0
|
retries: 5
|
||||||
when: is_bootstrap_node
|
until: output.rc == 0
|
||||||
- name: Delete the stopped openstack-cinder-volume cluster resource.
|
- name: Delete the stopped openstack-cinder-volume cluster resource.
|
||||||
tags: step2
|
pacemaker_resource:
|
||||||
pacemaker_resource:
|
resource: openstack-cinder-volume
|
||||||
resource: openstack-cinder-volume
|
state: delete
|
||||||
state: delete
|
wait_for_resource: true
|
||||||
wait_for_resource: true
|
register: output
|
||||||
register: output
|
retries: 5
|
||||||
retries: 5
|
until: output.rc == 0
|
||||||
until: output.rc == 0
|
|
||||||
when: is_bootstrap_node
|
|
||||||
- name: Disable cinder_volume service from boot
|
- name: Disable cinder_volume service from boot
|
||||||
tags: step2
|
when: step|int == 2
|
||||||
service: name=openstack-cinder-volume enabled=no
|
service: name=openstack-cinder-volume enabled=no
|
||||||
update_tasks:
|
update_tasks:
|
||||||
- name: Get docker Cinder-Volume image
|
- name: Get docker Cinder-Volume image
|
||||||
set_fact:
|
set_fact:
|
||||||
docker_image: {get_param: DockerCinderVolumeImage}
|
docker_image: {get_param: DockerCinderVolumeImage}
|
||||||
docker_image_latest: *cinder_volume_image_pcmklatest
|
docker_image_latest: *cinder_volume_image_pcmklatest
|
||||||
when: step == '2'
|
when: step|int == 2
|
||||||
- name: Get previous Cinder-Volume image id
|
- name: Get previous Cinder-Volume image id
|
||||||
shell: "docker images | awk '/cinder-volume.* pcmklatest/{print $3}'"
|
shell: "docker images | awk '/cinder-volume.* pcmklatest/{print $3}'"
|
||||||
register: cinder_volume_image_id
|
register: cinder_volume_image_id
|
||||||
@ -286,13 +284,13 @@ outputs:
|
|||||||
- name: Remove previous Cinder-Volume images
|
- name: Remove previous Cinder-Volume images
|
||||||
shell: "docker rmi -f {{cinder_volume_image_id.stdout}}"
|
shell: "docker rmi -f {{cinder_volume_image_id.stdout}}"
|
||||||
when:
|
when:
|
||||||
- step == '2'
|
- step|int == 2
|
||||||
- cinder_volume_image_id.stdout != ''
|
- cinder_volume_image_id.stdout != ''
|
||||||
- name: Pull latest Cinder-Volume images
|
- name: Pull latest Cinder-Volume images
|
||||||
command: "docker pull {{docker_image}}"
|
command: "docker pull {{docker_image}}"
|
||||||
when: step == "2"
|
when: step|int == 2
|
||||||
- name: Retag pcmklatest to latest Cinder-Volume image
|
- name: Retag pcmklatest to latest Cinder-Volume image
|
||||||
shell: "docker tag {{docker_image}} {{docker_image_latest}}"
|
shell: "docker tag {{docker_image}} {{docker_image_latest}}"
|
||||||
when: step == "2"
|
when: step|int == 2
|
||||||
# Got to check that pacemaker_is_active is working fine with bundle.
|
# Got to check that pacemaker_is_active is working fine with bundle.
|
||||||
# TODO: pacemaker_is_active resource doesn't support bundle.
|
# TODO: pacemaker_is_active resource doesn't support bundle.
|
||||||
|
@ -285,48 +285,47 @@ outputs:
|
|||||||
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}}
|
||||||
- name: Check cluster resource status
|
- name: Check cluster resource status
|
||||||
tags: step2
|
when: step|int == 2
|
||||||
pacemaker_resource:
|
pacemaker_resource:
|
||||||
resource: galera
|
resource: galera
|
||||||
state: master
|
state: master
|
||||||
check_mode: true
|
check_mode: true
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
register: galera_res
|
register: galera_res
|
||||||
- name: Disable the galera cluster resource
|
- when: (is_bootstrap_node) and (galera_res|succeeded) and (step|int == 2)
|
||||||
tags: step2
|
block:
|
||||||
pacemaker_resource:
|
- name: Disable the galera cluster resource
|
||||||
resource: galera
|
pacemaker_resource:
|
||||||
state: disable
|
resource: galera
|
||||||
wait_for_resource: true
|
state: disable
|
||||||
register: output
|
wait_for_resource: true
|
||||||
retries: 5
|
register: output
|
||||||
until: output.rc == 0
|
retries: 5
|
||||||
when: is_bootstrap_node and galera_res|succeeded
|
until: output.rc == 0
|
||||||
- name: Delete the stopped galera cluster resource.
|
- name: Delete the stopped galera cluster resource.
|
||||||
tags: step2
|
when: step|int == 2
|
||||||
pacemaker_resource:
|
pacemaker_resource:
|
||||||
resource: galera
|
resource: galera
|
||||||
state: delete
|
state: delete
|
||||||
wait_for_resource: true
|
wait_for_resource: true
|
||||||
register: output
|
register: output
|
||||||
retries: 5
|
retries: 5
|
||||||
until: output.rc == 0
|
until: output.rc == 0
|
||||||
when: is_bootstrap_node and galera_res|succeeded
|
|
||||||
- name: Disable mysql service
|
- name: Disable mysql service
|
||||||
tags: step2
|
when: step|int == 2
|
||||||
service: name=mariadb enabled=no
|
service: name=mariadb enabled=no
|
||||||
- name: Remove clustercheck service from xinetd
|
- name: Remove clustercheck service from xinetd
|
||||||
tags: step2
|
when: step|int == 2
|
||||||
file: state=absent path=/etc/xinetd.d/galera-monitor
|
file: state=absent path=/etc/xinetd.d/galera-monitor
|
||||||
- name: Restart xinetd service after clustercheck removal
|
- name: Restart xinetd service after clustercheck removal
|
||||||
tags: step2
|
when: step|int == 2
|
||||||
service: name=xinetd state=restarted
|
service: name=xinetd state=restarted
|
||||||
update_tasks:
|
update_tasks:
|
||||||
- name: Get docker Mariadb image
|
- name: Get docker Mariadb image
|
||||||
set_fact:
|
set_fact:
|
||||||
docker_image: {get_param: DockerMysqlImage}
|
docker_image: {get_param: DockerMysqlImage}
|
||||||
docker_image_latest: *mysql_image_pcmklatest
|
docker_image_latest: *mysql_image_pcmklatest
|
||||||
when: step == '2'
|
when: step|int == 2
|
||||||
- name: Get previous Mariadb image id
|
- name: Get previous Mariadb image id
|
||||||
shell: "docker images | awk '/mariadb.* pcmklatest/{print $3}'"
|
shell: "docker images | awk '/mariadb.* pcmklatest/{print $3}'"
|
||||||
register: mariadb_image_id
|
register: mariadb_image_id
|
||||||
@ -341,13 +340,13 @@ outputs:
|
|||||||
- name: Remove previous Mariadb images
|
- name: Remove previous Mariadb images
|
||||||
shell: "docker rmi -f {{mariadb_image_id.stdout}}"
|
shell: "docker rmi -f {{mariadb_image_id.stdout}}"
|
||||||
when:
|
when:
|
||||||
- step == '2'
|
- step|int == 2
|
||||||
- mariadb_image_id.stdout != ''
|
- mariadb_image_id.stdout != ''
|
||||||
- name: Pull latest Mariadb images
|
- name: Pull latest Mariadb images
|
||||||
command: "docker pull {{docker_image}}"
|
command: "docker pull {{docker_image}}"
|
||||||
when: step == "2"
|
when: step|int == 2
|
||||||
- name: Retag pcmklatest to latest Mariadb image
|
- name: Retag pcmklatest to latest Mariadb image
|
||||||
shell: "docker tag {{docker_image}} {{docker_image_latest}}"
|
shell: "docker tag {{docker_image}} {{docker_image_latest}}"
|
||||||
when: step == "2"
|
when: step|int == 2
|
||||||
# Got to check that pacemaker_is_active is working fine with bundle.
|
# Got to check that pacemaker_is_active is working fine with bundle.
|
||||||
# TODO: pacemaker_is_active resource doesn't support bundle.
|
# TODO: pacemaker_is_active resource doesn't support bundle.
|
||||||
|
@ -195,42 +195,40 @@ outputs:
|
|||||||
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}}
|
||||||
- name: Check cluster resource status
|
- name: Check cluster resource status
|
||||||
tags: step2
|
when: step|int == 2
|
||||||
pacemaker_resource:
|
pacemaker_resource:
|
||||||
resource: {get_attr: [RedisBase, role_data, service_name]}
|
resource: {get_attr: [RedisBase, role_data, service_name]}
|
||||||
state: master
|
state: master
|
||||||
check_mode: true
|
check_mode: true
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
register: redis_res
|
register: redis_res
|
||||||
- name: Disable the redis cluster resource
|
- when: (is_bootstrap_node) and (redis_res|succeeded) and (step|int == 2)
|
||||||
tags: step2
|
block:
|
||||||
pacemaker_resource:
|
- name: Disable the redis cluster resource
|
||||||
resource: {get_attr: [RedisBase, role_data, service_name]}
|
pacemaker_resource:
|
||||||
state: disable
|
resource: {get_attr: [RedisBase, role_data, service_name]}
|
||||||
wait_for_resource: true
|
state: disable
|
||||||
register: output
|
wait_for_resource: true
|
||||||
retries: 5
|
register: output
|
||||||
until: output.rc == 0
|
retries: 5
|
||||||
when: is_bootstrap_node and redis_res|succeeded
|
until: output.rc == 0
|
||||||
- name: Delete the stopped redis cluster resource.
|
- name: Delete the stopped redis cluster resource.
|
||||||
tags: step2
|
pacemaker_resource:
|
||||||
pacemaker_resource:
|
resource: {get_attr: [RedisBase, role_data, service_name]}
|
||||||
resource: {get_attr: [RedisBase, role_data, service_name]}
|
state: delete
|
||||||
state: delete
|
wait_for_resource: true
|
||||||
wait_for_resource: true
|
register: output
|
||||||
register: output
|
retries: 5
|
||||||
retries: 5
|
until: output.rc == 0
|
||||||
until: output.rc == 0
|
|
||||||
when: is_bootstrap_node and redis_res|succeeded
|
|
||||||
- name: Disable redis service
|
- name: Disable redis service
|
||||||
tags: step2
|
when: step|int == 2
|
||||||
service: name=redis enabled=no
|
service: name=redis enabled=no
|
||||||
update_tasks:
|
update_tasks:
|
||||||
- name: Get docker Redis image
|
- name: Get docker Redis image
|
||||||
set_fact:
|
set_fact:
|
||||||
docker_image: {get_param: DockerRedisImage}
|
docker_image: {get_param: DockerRedisImage}
|
||||||
docker_image_latest: *redis_image_pcmklatest
|
docker_image_latest: *redis_image_pcmklatest
|
||||||
when: step == '2'
|
when: step|int == 2
|
||||||
- name: Get previous Redis image id
|
- name: Get previous Redis image id
|
||||||
shell: "docker images | awk '/redis.* pcmklatest/{print $3}'"
|
shell: "docker images | awk '/redis.* pcmklatest/{print $3}'"
|
||||||
register: redis_image_id
|
register: redis_image_id
|
||||||
@ -245,13 +243,13 @@ outputs:
|
|||||||
- name: Remove previous Redis images
|
- name: Remove previous Redis images
|
||||||
shell: "docker rmi -f {{redis_image_id.stdout}}"
|
shell: "docker rmi -f {{redis_image_id.stdout}}"
|
||||||
when:
|
when:
|
||||||
- step == '2'
|
- step|int == 2
|
||||||
- redis_image_id.stdout != ''
|
- redis_image_id.stdout != ''
|
||||||
- name: Pull latest Redis images
|
- name: Pull latest Redis images
|
||||||
command: "docker pull {{docker_image}}"
|
command: "docker pull {{docker_image}}"
|
||||||
when: step == "2"
|
when: step|int == 2
|
||||||
- name: Retag pcmklatest to latest Redis image
|
- name: Retag pcmklatest to latest Redis image
|
||||||
shell: "docker tag {{docker_image}} {{docker_image_latest}}"
|
shell: "docker tag {{docker_image}} {{docker_image_latest}}"
|
||||||
when: step == "2"
|
when: step|int == 2
|
||||||
# Got to check that pacemaker_is_active is working fine with bundle.
|
# Got to check that pacemaker_is_active is working fine with bundle.
|
||||||
# TODO: pacemaker_is_active resource doesn't support bundle.
|
# TODO: pacemaker_is_active resource doesn't support bundle.
|
||||||
|
@ -237,39 +237,37 @@ outputs:
|
|||||||
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}}
|
||||||
- name: Check cluster resource status
|
- name: Check cluster resource status
|
||||||
tags: step2
|
when: step|int == 2
|
||||||
pacemaker_resource:
|
pacemaker_resource:
|
||||||
resource: {get_attr: [HAProxyBase, role_data, service_name]}
|
resource: {get_attr: [HAProxyBase, role_data, service_name]}
|
||||||
state: started
|
state: started
|
||||||
check_mode: true
|
check_mode: true
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
register: haproxy_res
|
register: haproxy_res
|
||||||
- name: Disable the haproxy cluster resource.
|
- when: (is_bootstrap_node) and (haproxy_res|succeeded) and (step|int == 2)
|
||||||
tags: step2
|
block:
|
||||||
pacemaker_resource:
|
- name: Disable the haproxy cluster resource.
|
||||||
resource: {get_attr: [HAProxyBase, role_data, service_name]}
|
pacemaker_resource:
|
||||||
state: disable
|
resource: {get_attr: [HAProxyBase, role_data, service_name]}
|
||||||
wait_for_resource: true
|
state: disable
|
||||||
register: output
|
wait_for_resource: true
|
||||||
retries: 5
|
register: output
|
||||||
until: output.rc == 0
|
retries: 5
|
||||||
when: is_bootstrap_node and haproxy_res|succeeded
|
until: output.rc == 0
|
||||||
- name: Delete the stopped haproxy cluster resource.
|
- name: Delete the stopped haproxy cluster resource.
|
||||||
tags: step2
|
pacemaker_resource:
|
||||||
pacemaker_resource:
|
resource: {get_attr: [HAProxyBase, role_data, service_name]}
|
||||||
resource: {get_attr: [HAProxyBase, role_data, service_name]}
|
state: delete
|
||||||
state: delete
|
wait_for_resource: true
|
||||||
wait_for_resource: true
|
register: output
|
||||||
register: output
|
retries: 5
|
||||||
retries: 5
|
until: output.rc == 0
|
||||||
until: output.rc == 0
|
|
||||||
when: is_bootstrap_node and haproxy_res|succeeded
|
|
||||||
update_tasks:
|
update_tasks:
|
||||||
- name: Get docker Haproxy image
|
- name: Get docker Haproxy image
|
||||||
set_fact:
|
set_fact:
|
||||||
docker_image: {get_param: DockerHAProxyImage}
|
docker_image: {get_param: DockerHAProxyImage}
|
||||||
docker_image_latest: *haproxy_image_pcmklatest
|
docker_image_latest: *haproxy_image_pcmklatest
|
||||||
when: step == '2'
|
when: step|int == 2
|
||||||
- name: Get previous Haproxy image id
|
- name: Get previous Haproxy image id
|
||||||
shell: "docker images | awk '/haproxy.* pcmklatest/{print $3}'"
|
shell: "docker images | awk '/haproxy.* pcmklatest/{print $3}'"
|
||||||
register: haproxy_image_id
|
register: haproxy_image_id
|
||||||
@ -284,13 +282,13 @@ outputs:
|
|||||||
- name: Remove previous Haproxy images
|
- name: Remove previous Haproxy images
|
||||||
shell: "docker rmi -f {{haproxy_image_id.stdout}}"
|
shell: "docker rmi -f {{haproxy_image_id.stdout}}"
|
||||||
when:
|
when:
|
||||||
- step == '2'
|
- step|int == 2
|
||||||
- haproxy_image_id.stdout != ''
|
- haproxy_image_id.stdout != ''
|
||||||
- name: Pull latest Haproxy images
|
- name: Pull latest Haproxy images
|
||||||
command: "docker pull {{docker_image}}"
|
command: "docker pull {{docker_image}}"
|
||||||
when: step == "2"
|
when: step|int == 2
|
||||||
- name: Retag pcmklatest to latest Haproxy image
|
- name: Retag pcmklatest to latest Haproxy image
|
||||||
shell: "docker tag {{docker_image}} {{docker_image_latest}}"
|
shell: "docker tag {{docker_image}} {{docker_image_latest}}"
|
||||||
when: step == "2"
|
when: step|int == 2
|
||||||
# Got to check that pacemaker_is_active is working fine with bundle.
|
# Got to check that pacemaker_is_active is working fine with bundle.
|
||||||
# TODO: pacemaker_is_active resource doesn't support bundle.
|
# TODO: pacemaker_is_active resource doesn't support bundle.
|
||||||
|
@ -182,14 +182,14 @@ outputs:
|
|||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
upgrade_tasks:
|
upgrade_tasks:
|
||||||
- name: Stop and disable manila_share service
|
- name: Stop and disable manila_share service
|
||||||
tags: step2
|
when: step|int == 2
|
||||||
service: name=openstack-manila-share state=stopped enabled=no
|
service: name=openstack-manila-share state=stopped enabled=no
|
||||||
update_tasks:
|
update_tasks:
|
||||||
- name: Get docker Manila-Share image
|
- name: Get docker Manila-Share image
|
||||||
set_fact:
|
set_fact:
|
||||||
docker_image: {get_param: DockerManilaShareImage}
|
docker_image: {get_param: DockerManilaShareImage}
|
||||||
docker_image_latest: *manila_share_image_pcmklatest
|
docker_image_latest: *manila_share_image_pcmklatest
|
||||||
when: step == '2'
|
when: step|int == 2
|
||||||
- name: Get previous Manila-Share image id
|
- name: Get previous Manila-Share image id
|
||||||
shell: "docker images | awk '/manila-share.* pcmklatest/{print $3}'"
|
shell: "docker images | awk '/manila-share.* pcmklatest/{print $3}'"
|
||||||
register: manila_share_image_id
|
register: manila_share_image_id
|
||||||
@ -204,13 +204,13 @@ outputs:
|
|||||||
- name: Remove previous Manila-Share images
|
- name: Remove previous Manila-Share images
|
||||||
shell: "docker rmi -f {{manila_share_image_id.stdout}}"
|
shell: "docker rmi -f {{manila_share_image_id.stdout}}"
|
||||||
when:
|
when:
|
||||||
- step == '2'
|
- step|int == 2
|
||||||
- manila_share_image_id.stdout != ''
|
- manila_share_image_id.stdout != ''
|
||||||
- name: Pull latest Manila-Share images
|
- name: Pull latest Manila-Share images
|
||||||
command: "docker pull {{docker_image}}"
|
command: "docker pull {{docker_image}}"
|
||||||
when: step == "2"
|
when: step|int == 2
|
||||||
- name: Retag pcmklatest to latest Manila-Share image
|
- name: Retag pcmklatest to latest Manila-Share image
|
||||||
shell: "docker tag {{docker_image}} {{docker_image_latest}}"
|
shell: "docker tag {{docker_image}} {{docker_image_latest}}"
|
||||||
when: step == "2"
|
when: step|int == 2
|
||||||
# Got to check that pacemaker_is_active is working fine with bundle.
|
# Got to check that pacemaker_is_active is working fine with bundle.
|
||||||
# TODO: pacemaker_is_active resource doesn't support bundle.
|
# TODO: pacemaker_is_active resource doesn't support bundle.
|
||||||
|
@ -156,5 +156,5 @@ outputs:
|
|||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
upgrade_tasks:
|
upgrade_tasks:
|
||||||
- name: Stop and disable ovn-northd service
|
- name: Stop and disable ovn-northd service
|
||||||
tags: step2
|
when: step|int == 2
|
||||||
service: name=ovn-northd state=stopped enabled=no
|
service: name=ovn-northd state=stopped enabled=no
|
||||||
|
@ -233,42 +233,40 @@ outputs:
|
|||||||
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}}
|
||||||
- name: Check cluster resource status
|
- name: Check cluster resource status
|
||||||
tags: step2
|
when: step|int == 2
|
||||||
pacemaker_resource:
|
pacemaker_resource:
|
||||||
resource: {get_attr: [RabbitmqBase, role_data, service_name]}
|
resource: {get_attr: [RabbitmqBase, role_data, service_name]}
|
||||||
state: started
|
state: started
|
||||||
check_mode: true
|
check_mode: true
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
register: rabbitmq_res
|
register: rabbitmq_res
|
||||||
- name: Disable the rabbitmq cluster resource.
|
- when: (is_bootstrap_node) and (rabbitmq_res|succeeded) and (step|int == 2)
|
||||||
tags: step2
|
block:
|
||||||
pacemaker_resource:
|
- name: Disable the rabbitmq cluster resource.
|
||||||
resource: {get_attr: [RabbitmqBase, role_data, service_name]}
|
pacemaker_resource:
|
||||||
state: disable
|
resource: {get_attr: [RabbitmqBase, role_data, service_name]}
|
||||||
wait_for_resource: true
|
state: disable
|
||||||
register: output
|
wait_for_resource: true
|
||||||
retries: 5
|
register: output
|
||||||
until: output.rc == 0
|
retries: 5
|
||||||
when: is_bootstrap_node and rabbitmq_res|succeeded
|
until: output.rc == 0
|
||||||
- name: Delete the stopped rabbitmq cluster resource.
|
- name: Delete the stopped rabbitmq cluster resource.
|
||||||
tags: step2
|
pacemaker_resource:
|
||||||
pacemaker_resource:
|
resource: {get_attr: [RabbitmqBase, role_data, service_name]}
|
||||||
resource: {get_attr: [RabbitmqBase, role_data, service_name]}
|
state: delete
|
||||||
state: delete
|
wait_for_resource: true
|
||||||
wait_for_resource: true
|
register: output
|
||||||
register: output
|
retries: 5
|
||||||
retries: 5
|
until: output.rc == 0
|
||||||
until: output.rc == 0
|
|
||||||
when: is_bootstrap_node and rabbitmq_res|succeeded
|
|
||||||
- name: Disable rabbitmq service
|
- name: Disable rabbitmq service
|
||||||
tags: step2
|
when: step|int == 2
|
||||||
service: name=rabbitmq-server enabled=no
|
service: name=rabbitmq-server enabled=no
|
||||||
update_tasks:
|
update_tasks:
|
||||||
- name: Get docker Rabbitmq image
|
- name: Get docker Rabbitmq image
|
||||||
set_fact:
|
set_fact:
|
||||||
docker_image: {get_param: DockerRabbitmqImage}
|
docker_image: {get_param: DockerRabbitmqImage}
|
||||||
docker_image_latest: *rabbitmq_image_pcmklatest
|
docker_image_latest: *rabbitmq_image_pcmklatest
|
||||||
when: step == '2'
|
when: step|int == 2
|
||||||
- name: Get previous Rabbitmq image id
|
- name: Get previous Rabbitmq image id
|
||||||
shell: "docker images | awk '/rabbitmq.* pcmklatest/{print $3}'"
|
shell: "docker images | awk '/rabbitmq.* pcmklatest/{print $3}'"
|
||||||
register: rabbitmq_image_id
|
register: rabbitmq_image_id
|
||||||
@ -283,13 +281,13 @@ outputs:
|
|||||||
- name: Remove previous Rabbitmq images
|
- name: Remove previous Rabbitmq images
|
||||||
shell: "docker rmi -f {{rabbitmq_image_id.stdout}}"
|
shell: "docker rmi -f {{rabbitmq_image_id.stdout}}"
|
||||||
when:
|
when:
|
||||||
- step == '2'
|
- step|int == 2
|
||||||
- rabbitmq_image_id.stdout != ''
|
- rabbitmq_image_id.stdout != ''
|
||||||
- name: Pull latest Rabbitmq images
|
- name: Pull latest Rabbitmq images
|
||||||
command: "docker pull {{docker_image}}"
|
command: "docker pull {{docker_image}}"
|
||||||
when: step == "2"
|
when: step|int == 2
|
||||||
- name: Retag pcmklatest to latest Rabbitmq image
|
- name: Retag pcmklatest to latest Rabbitmq image
|
||||||
shell: "docker tag {{docker_image}} {{docker_image_latest}}"
|
shell: "docker tag {{docker_image}} {{docker_image_latest}}"
|
||||||
when: step == "2"
|
when: step|int == 2
|
||||||
# Got to check that pacemaker_is_active is working fine with bundle.
|
# Got to check that pacemaker_is_active is working fine with bundle.
|
||||||
# TODO: pacemaker_is_active resource doesn't support bundle.
|
# TODO: pacemaker_is_active resource doesn't support bundle.
|
||||||
|
@ -232,11 +232,10 @@ 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
|
when: (rabbitmq_enabled.rc == 0) and (step|int == 0)
|
||||||
tags: step0,validation
|
tags: validation
|
||||||
- name: Stop and disable rabbitmq service
|
- name: Stop and disable rabbitmq service
|
||||||
tags: step2
|
when: (rabbitmq_enabled.rc == 0) and (step|int == 2)
|
||||||
when: 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
|
||||||
|
@ -152,14 +152,16 @@ 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
|
when: (sahara_api_enabled.rc == 0) and (step|int == 0)
|
||||||
tags: step0,validation
|
tags: validation
|
||||||
- name: Stop and disable sahara_api service
|
- name: Stop and disable sahara_api service
|
||||||
tags: step2
|
when: (sahara_api_enabled.rc == 0) and (step|int == 2)
|
||||||
when: 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
|
||||||
|
when: step|int == 2
|
||||||
|
set_fact:
|
||||||
|
remove_sahara_api_package: {get_param: UpgradeRemoveUnusedPackages}
|
||||||
- name: Remove openstack-sahara-api package if operator requests it
|
- name: Remove openstack-sahara-api package if operator requests it
|
||||||
yum: name=openstack-sahara-api state=removed
|
yum: name=openstack-sahara-api state=removed
|
||||||
tags: step2
|
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
when: {get_param: UpgradeRemoveUnusedPackages}
|
when: (remove_sahara_api_package|bool) and (step|int == 2)
|
||||||
|
@ -137,14 +137,16 @@ 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
|
when: (sahara_engine_enabled.rc == 0) and (step|int == 0)
|
||||||
tags: step0,validation
|
tags: validation
|
||||||
- name: Stop and disable sahara_engine service
|
- name: Stop and disable sahara_engine service
|
||||||
tags: step2
|
when: (sahara_engine_enabled.rc == 0) and (step|int == 2)
|
||||||
when: 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
|
||||||
|
when: step|int == 2
|
||||||
|
set_fact:
|
||||||
|
remove_sahara_engine_package: {get_param: UpgradeRemoveUnusedPackages}
|
||||||
- name: Remove openstack-sahara-engine package if operator requests it
|
- name: Remove openstack-sahara-engine package if operator requests it
|
||||||
yum: name=openstack-sahara-engine state=removed
|
yum: name=openstack-sahara-engine state=removed
|
||||||
tags: step2
|
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
when: {get_param: UpgradeRemoveUnusedPackages}
|
when: (remove_sahara_engine_package|bool) and (step|int == 2)
|
||||||
|
@ -160,9 +160,8 @@ 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
|
when: (sensu_enabled.rc == 0) and (step|int == 0)
|
||||||
tags: step0,validation
|
tags: validation
|
||||||
- name: Stop and disable sensu-client service
|
- name: Stop and disable sensu-client service
|
||||||
tags: step2
|
when: (sensu_enabled.rc == 0) and (step|int == 2)
|
||||||
when: sensu_enabled.rc == 0
|
|
||||||
service: name=sensu-client state=stopped enabled=no
|
service: name=sensu-client state=stopped enabled=no
|
||||||
|
@ -157,18 +157,20 @@ 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
|
when: (item.rc == 0) and (step|int == 0)
|
||||||
tags: step0,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
|
||||||
tags: step2
|
when: (item.rc == 0) and (step|int == 2)
|
||||||
when: 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
|
||||||
|
when: step|int == 2
|
||||||
|
set_fact:
|
||||||
|
remove_swift_proxy_package: {get_param: UpgradeRemoveUnusedPackages}
|
||||||
- name: Remove openstack-swift-proxy package if operator requests it
|
- name: Remove openstack-swift-proxy package if operator requests it
|
||||||
yum: name=openstack-swift-proxy state=removed
|
yum: name=openstack-swift-proxy state=removed
|
||||||
tags: step2
|
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
when: {get_param: UpgradeRemoveUnusedPackages}
|
when: (remove_swift_proxy_package|bool) and (step|int == 2)
|
||||||
metadata_settings:
|
metadata_settings:
|
||||||
get_attr: [SwiftProxyBase, role_data, metadata_settings]
|
get_attr: [SwiftProxyBase, role_data, metadata_settings]
|
||||||
|
@ -504,28 +504,30 @@ outputs:
|
|||||||
- openstack-swift-object
|
- openstack-swift-object
|
||||||
- name: "PreUpgrade step0,validation: Check swift storage services are running"
|
- name: "PreUpgrade step0,validation: Check swift storage services are running"
|
||||||
command: systemctl is-active --quiet "{{ item.item }}"
|
command: systemctl is-active --quiet "{{ item.item }}"
|
||||||
tags: step0,validation
|
tags: validation
|
||||||
with_items: "{{ swift_services_enabled.results }}"
|
with_items: "{{ swift_services_enabled.results }}"
|
||||||
when: item.rc == 0
|
when: (item.rc == 0) and (step|int == 0)
|
||||||
- name: Stop and disable swift storage services
|
- name: Stop and disable swift storage services
|
||||||
tags: step2
|
|
||||||
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
|
when: (item.rc == 0) and (step|int == 2)
|
||||||
|
- name: Set fact for removal of openstack-swift-container,object,account package
|
||||||
|
when: step|int == 2
|
||||||
|
set_fact:
|
||||||
|
remove_swift_package: {get_param: UpgradeRemoveUnusedPackages}
|
||||||
- name: Remove openstack-swift-container,object,account packages if operator requests it
|
- name: Remove openstack-swift-container,object,account packages if operator requests it
|
||||||
yum: name={{ item }} state=removed
|
yum: name={{ item }} state=removed
|
||||||
tags: step2
|
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
when: {get_param: UpgradeRemoveUnusedPackages}
|
when: (remove_swift_package|bool) and (step|int == 2)
|
||||||
with_items:
|
with_items:
|
||||||
- openstack-swift-container
|
- openstack-swift-container
|
||||||
- openstack-swift-object
|
- openstack-swift-object
|
||||||
- openstack-swift-account
|
- openstack-swift-account
|
||||||
- name: Remove rsync service from xinetd
|
- name: Remove rsync service from xinetd
|
||||||
tags: step2
|
|
||||||
file: state=absent path=/etc/xinetd.d/rsync
|
file: state=absent path=/etc/xinetd.d/rsync
|
||||||
|
when: step|int == 2
|
||||||
- name: Restart xinetd service after rsync removal
|
- name: Restart xinetd service after rsync removal
|
||||||
tags: step2
|
when: step|int == 2
|
||||||
service: name=xinetd state=restarted
|
service: name=xinetd state=restarted
|
||||||
update_tasks:
|
update_tasks:
|
||||||
- name: Ensure rsyncd pid file is absent
|
- name: Ensure rsyncd pid file is absent
|
||||||
|
@ -150,9 +150,8 @@ 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
|
when: (tacker_enabled.rc == 0) and (step|int == 0)
|
||||||
tags: step0,validation
|
tags: validation
|
||||||
- name: Stop and disable tacker-server service
|
- name: Stop and disable tacker-server service
|
||||||
tags: step2
|
when: (tacker_enabled.rc == 0) and (step|int == 2)
|
||||||
when: tacker_enabled.rc == 0
|
|
||||||
service: name=openstack-tacker-server state=stopped enabled=no
|
service: name=openstack-tacker-server state=stopped enabled=no
|
||||||
|
@ -207,11 +207,10 @@ outputs:
|
|||||||
register: httpd_running
|
register: httpd_running
|
||||||
- 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: step0,validation
|
tags: validation
|
||||||
when: httpd_enabled.rc == 0 and httpd_running.rc == 0
|
when: (httpd_enabled.rc == 0) and (httpd_running.rc == 0) and (step|int == 0)
|
||||||
- name: Stop and disable zaqar service
|
- name: Stop and disable zaqar service
|
||||||
tags: step2
|
when: (httpd_enabled.rc == 0) and (httpd_running.rc == 0) and (step|int == 2)
|
||||||
when: httpd_enabled.rc == 0 and 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]
|
||||||
|
@ -63,7 +63,7 @@ outputs:
|
|||||||
external_deploy_tasks:
|
external_deploy_tasks:
|
||||||
# FIXME: remove this block when kubespray is packaged
|
# FIXME: remove this block when kubespray is packaged
|
||||||
- name: kubernetes_master step 2 kubespray repository
|
- name: kubernetes_master step 2 kubespray repository
|
||||||
when: step == '2'
|
when: step|int == 2
|
||||||
block:
|
block:
|
||||||
- name: check kubespray directory existence
|
- name: check kubespray directory existence
|
||||||
stat:
|
stat:
|
||||||
@ -93,7 +93,7 @@ outputs:
|
|||||||
# do not overwrite existing contents
|
# do not overwrite existing contents
|
||||||
when: not kubespray_stat.stat.exists and not kubespray_cloned_stat.stat.exists
|
when: not kubespray_stat.stat.exists and not kubespray_cloned_stat.stat.exists
|
||||||
- name: kubernetes_master step 2
|
- name: kubernetes_master step 2
|
||||||
when: step == '2'
|
when: step|int == 2
|
||||||
block:
|
block:
|
||||||
- name: create kubespray temp dirs
|
- name: create kubespray temp dirs
|
||||||
file:
|
file:
|
||||||
|
@ -133,6 +133,10 @@ has more details about the expected dictionary.
|
|||||||
|
|
||||||
Batch Upgrade Steps
|
Batch Upgrade Steps
|
||||||
-------------------
|
-------------------
|
||||||
|
Note: the `upgrade_batch_tasks` are no longer used and deprecated for Queens.
|
||||||
|
The information below applies to upgrade_batch_tasks as they were used for the
|
||||||
|
Ocata major upgrade. The `upgrade_batch_tasks` were used exclusively by the
|
||||||
|
ceph services and for Pike ceph is now configured by ceph-ansible.
|
||||||
|
|
||||||
Each service template may optionally define a `upgrade_batch_tasks` key, which
|
Each service template may optionally define a `upgrade_batch_tasks` key, which
|
||||||
is a list of ansible tasks to be performed during the upgrade process.
|
is a list of ansible tasks to be performed during the upgrade process.
|
||||||
@ -164,26 +168,15 @@ Each service template may optionally define a `upgrade_tasks` key, which is a
|
|||||||
list of ansible tasks to be performed during the upgrade process.
|
list of ansible tasks to be performed during the upgrade process.
|
||||||
|
|
||||||
Similar to the step_config, we allow a series of steps for the per-service
|
Similar to the step_config, we allow a series of steps for the per-service
|
||||||
upgrade sequence, defined as ansible tasks with a tag e.g "step1" for the first
|
upgrade sequence, defined as ansible tasks with a "when: step|int == 1" for
|
||||||
step, "step2" for the second, etc.
|
for the first step, "== 2" for the second, etc.
|
||||||
|
|
||||||
Steps/tags correlate to the following:
|
Steps correlate to the following:
|
||||||
|
|
||||||
1) Stop all control-plane services.
|
1) Perform any pre-upgrade validations.
|
||||||
|
|
||||||
2) Quiesce the control-plane, e.g disable LoadBalancer, stop
|
|
||||||
pacemaker cluster: this will stop the following resource:
|
|
||||||
- ocata:
|
|
||||||
- galera
|
|
||||||
- rabbit
|
|
||||||
- redis
|
|
||||||
- haproxy
|
|
||||||
- vips
|
|
||||||
- cinder-volumes
|
|
||||||
- cinder-backup
|
|
||||||
- manilla-share
|
|
||||||
- rbd-mirror
|
|
||||||
|
|
||||||
|
2) Stop the control-plane services, e.g disable LoadBalancer, stop
|
||||||
|
pacemaker cluster and stop any managed resources.
|
||||||
The exact order is controlled by the cluster constraints.
|
The exact order is controlled by the cluster constraints.
|
||||||
|
|
||||||
3) Perform a package update and install new packages: A general
|
3) Perform a package update and install new packages: A general
|
||||||
@ -205,9 +198,8 @@ Each service template may optionally define a `update_tasks` key, which is a
|
|||||||
list of ansible tasks to be performed during the minor update process.
|
list of ansible tasks to be performed during the minor update process.
|
||||||
|
|
||||||
Similar to the upgrade_tasks, we allow a series of steps for the per-service
|
Similar to the upgrade_tasks, we allow a series of steps for the per-service
|
||||||
update sequence, but note update_task selects the steps via a conditional
|
update sequence via conditionals referencing a step variable e.g when:
|
||||||
referencing the step variable e.g when: step == 2, which is different to the
|
step|int == 2.
|
||||||
tags based approach used for upgrade_tasks (the two may be aligned in future).
|
|
||||||
|
|
||||||
|
|
||||||
Nova Server Metadata Settings
|
Nova Server Metadata Settings
|
||||||
|
@ -120,5 +120,5 @@ outputs:
|
|||||||
- get_attr: [ApacheServiceBase, role_data, upgrade_tasks]
|
- get_attr: [ApacheServiceBase, role_data, upgrade_tasks]
|
||||||
-
|
-
|
||||||
- name: Stop aodh_api service (running under httpd)
|
- name: Stop aodh_api service (running under httpd)
|
||||||
tags: step1
|
when: step|int == 1
|
||||||
service: name=httpd state=stopped
|
service: name=httpd state=stopped
|
||||||
|
@ -63,9 +63,8 @@ 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
|
when: (aodh_evaluator_enabled.rc == 0) and (step|int == 0)
|
||||||
tags: step0,validation
|
tags: validation
|
||||||
- name: Stop aodh_evaluator service
|
- name: Stop aodh_evaluator service
|
||||||
tags: step1
|
when: (aodh_evaluator_enabled.rc == 0) and (step|int == 1)
|
||||||
when: aodh_evaluator_enabled.rc == 0
|
|
||||||
service: name=openstack-aodh-evaluator state=stopped
|
service: name=openstack-aodh-evaluator state=stopped
|
||||||
|
@ -63,9 +63,8 @@ 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
|
when: (aodh_listener_enabled.rc == 0) and (step|int == 0)
|
||||||
tags: step0,validation
|
tags: validation
|
||||||
- name: Stop aodh_listener service
|
- name: Stop aodh_listener service
|
||||||
tags: step1
|
when: (aodh_listener_enabled.rc == 0) and (step|int == 1)
|
||||||
when: aodh_listener_enabled.rc == 0
|
|
||||||
service: name=openstack-aodh-listener state=stopped
|
service: name=openstack-aodh-listener state=stopped
|
||||||
|
@ -63,9 +63,8 @@ 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
|
when: (aodh_notifier_enabled.rc == 0) and (step|int == 0)
|
||||||
tags: step0,validation
|
tags: validation
|
||||||
- name: Stop aodh_notifier service
|
- name: Stop aodh_notifier service
|
||||||
tags: step1
|
when: (aodh_notifier_enabled.rc == 0) and (step|int == 1)
|
||||||
when: aodh_notifier_enabled.rc == 0
|
|
||||||
service: name=openstack-aodh-notifier state=stopped
|
service: name=openstack-aodh-notifier state=stopped
|
||||||
|
@ -131,8 +131,8 @@ 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
|
when: (httpd_enabled.rc == 0) and (step|int == 0)
|
||||||
tags: step0,validation
|
tags: validation
|
||||||
- name: Ensure mod_ssl package is installed
|
- name: Ensure mod_ssl package is installed
|
||||||
tags: step3
|
when: step|int == 3
|
||||||
yum: name=mod_ssl state=latest
|
yum: name=mod_ssl state=latest
|
||||||
|
@ -54,9 +54,8 @@ 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
|
when: (auditd_enabled.rc == 0) and (step|int == 0)
|
||||||
tags: step0,validation
|
tags: validation
|
||||||
- name: Stop auditd service
|
- name: Stop auditd service
|
||||||
tags: step2
|
when: (auditd_enabled.rc == 0) and (step|int == 2)
|
||||||
when: auditd_enabled.rc == 0
|
|
||||||
service: name=auditd state=stopped
|
service: name=auditd state=stopped
|
||||||
|
@ -209,9 +209,8 @@ 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
|
when: (barbican_api_enabled.rc == 0) and (step|int == 0)
|
||||||
tags: step0,validation
|
tags: validation
|
||||||
- name: Install openstack-barbican-api package if it was disabled
|
- name: Install openstack-barbican-api package if it was disabled
|
||||||
tags: step3
|
|
||||||
yum: name=openstack-barbican-api state=latest
|
yum: name=openstack-barbican-api state=latest
|
||||||
when: barbican_api_enabled.rc != 0
|
when: (barbican_api_enabled.rc != 0) and (step|int == 3)
|
||||||
|
@ -80,9 +80,8 @@ 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
|
when: (ceilometer_agent_central_enabled.rc == 0) and (step|int == 0)
|
||||||
tags: step0,validation
|
tags: validation
|
||||||
- name: Stop ceilometer_agent_central service
|
- name: Stop ceilometer_agent_central service
|
||||||
tags: step1
|
when: (ceilometer_agent_central_enabled.rc == 0) and (step|int == 1)
|
||||||
when: ceilometer_agent_central_enabled.rc == 0
|
|
||||||
service: name=openstack-ceilometer-central state=stopped
|
service: name=openstack-ceilometer-central state=stopped
|
||||||
|
@ -79,9 +79,8 @@ 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
|
when: (ceilometer_agent_compute_enabled.rc == 0) and (step|int == 0)
|
||||||
tags: step0,validation
|
tags: validation
|
||||||
- name: Stop ceilometer_agent_compute service
|
- name: Stop ceilometer_agent_compute service
|
||||||
tags: step1
|
when: (ceilometer_agent_compute_enabled.rc == 0) and (step|int == 1)
|
||||||
when: ceilometer_agent_compute_enabled.rc == 0
|
|
||||||
service: name=openstack-ceilometer-compute state=stopped
|
service: name=openstack-ceilometer-compute state=stopped
|
||||||
|
@ -80,13 +80,11 @@ 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
|
when: (ceilometer_ipmi_enabled.rc == 0) and (step|int == 0)
|
||||||
tags: step0,validation
|
tags: validation
|
||||||
- name: Stop openstack-ceilometer-ipmi service
|
- name: Stop openstack-ceilometer-ipmi service
|
||||||
tags: step1
|
when: (ceilometer_ipmi_enabled.rc == 0) and (step|int == 1)
|
||||||
when: 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
|
||||||
tags: step3
|
|
||||||
yum: name=openstack-ceilometer-ipmi state=latest
|
yum: name=openstack-ceilometer-ipmi state=latest
|
||||||
when: ceilometer_ipmi_enabled.rc != 0
|
when: (ceilometer_ipmi_enabled.rc != 0) and (step|int == 3)
|
||||||
|
@ -74,9 +74,8 @@ 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
|
when: (ceilometer_agent_notification_enabled.rc == 0) and (step|int == 0)
|
||||||
tags: step0,validation
|
tags: validation
|
||||||
- name: Stop ceilometer_agent_notification service
|
- name: Stop ceilometer_agent_notification service
|
||||||
tags: step1
|
when: (ceilometer_agent_notification_enabled.rc == 0) and (step|int == 1)
|
||||||
when: ceilometer_agent_notification_enabled.rc == 0
|
|
||||||
service: name=openstack-ceilometer-notification state=stopped
|
service: name=openstack-ceilometer-notification state=stopped
|
||||||
|
@ -152,37 +152,36 @@ outputs:
|
|||||||
step_config: |
|
step_config: |
|
||||||
include ::tripleo::profile::base::ceph::mon
|
include ::tripleo::profile::base::ceph::mon
|
||||||
upgrade_batch_tasks:
|
upgrade_batch_tasks:
|
||||||
|
# NOTE: upgrade_batch_tasks are deprecated in Queens.
|
||||||
# Note we perform these tasks in list order, but they are all step0 so
|
# Note we perform these tasks in list order, but they are all step0 so
|
||||||
# we can perform a rolling upgrade of all mon nodes in step0, then a
|
# we can perform a rolling upgrade of all mon nodes in step0, then a
|
||||||
# rolling upgrade of all osd nodes in step1
|
# rolling upgrade of all osd nodes in step1
|
||||||
- name: Check status
|
- when: step|int == 0
|
||||||
tags: step0,validation
|
block:
|
||||||
shell: ceph health | egrep -sq "HEALTH_OK|HEALTH_WARN"
|
- name: Check status
|
||||||
- name: Stop CephMon
|
tags: validation
|
||||||
tags: step0
|
shell: ceph health | egrep -sq "HEALTH_OK|HEALTH_WARN"
|
||||||
service:
|
- name: Stop CephMon
|
||||||
name: ceph-mon@{{ ansible_hostname }}
|
service:
|
||||||
state: stopped
|
name: ceph-mon@{{ ansible_hostname }}
|
||||||
- name: Update Ceph packages
|
state: stopped
|
||||||
tags: step0
|
- name: Update Ceph packages
|
||||||
yum:
|
yum:
|
||||||
name: ceph-mon
|
name: ceph-mon
|
||||||
state: latest
|
state: latest
|
||||||
- name: Start CephMon
|
- name: Start CephMon
|
||||||
tags: step0
|
service:
|
||||||
service:
|
name: ceph-mon@{{ ansible_hostname }}
|
||||||
name: ceph-mon@{{ ansible_hostname }}
|
state: started
|
||||||
state: started
|
# ceph-ansible
|
||||||
# ceph-ansible
|
# https://github.com/ceph/ceph-ansible/blob/master/infrastructure-playbooks/rolling_update.yml#L149-L157
|
||||||
# https://github.com/ceph/ceph-ansible/blob/master/infrastructure-playbooks/rolling_update.yml#L149-L157
|
- name: Wait for the monitor to join the quorum...
|
||||||
- name: Wait for the monitor to join the quorum...
|
tags: ceph_quorum_validation
|
||||||
tags: step0,ceph_quorum_validation
|
shell: |
|
||||||
shell: |
|
ceph -s | grep monmap | sed 's/.*quorum//' | egrep -sq {{ ansible_hostname }}
|
||||||
ceph -s | grep monmap | sed 's/.*quorum//' | egrep -sq {{ ansible_hostname }}
|
register: ceph_quorum_nodecheck
|
||||||
register: ceph_quorum_nodecheck
|
until: ceph_quorum_nodecheck.rc == 0
|
||||||
until: ceph_quorum_nodecheck.rc == 0
|
retries: {get_param: CephValidationRetries}
|
||||||
retries: {get_param: CephValidationRetries}
|
delay: {get_param: CephValidationDelay}
|
||||||
delay: {get_param: CephValidationDelay}
|
- name: ceph osd crush tunables default
|
||||||
- name: ceph osd crush tunables default
|
shell: ceph osd crush tunables default
|
||||||
tags: step0
|
|
||||||
shell: ceph osd crush tunables default
|
|
||||||
|
@ -79,66 +79,57 @@ outputs:
|
|||||||
step_config: |
|
step_config: |
|
||||||
include ::tripleo::profile::base::ceph::osd
|
include ::tripleo::profile::base::ceph::osd
|
||||||
upgrade_batch_tasks:
|
upgrade_batch_tasks:
|
||||||
- name: Check status
|
# NOTE: upgrade_batch_tasks are deprecated in Queens.
|
||||||
tags: step1,validation
|
- when: step|int == 1
|
||||||
shell: ceph health | grep -qv HEALTH_ERR
|
block:
|
||||||
- name: Get OSD IDs
|
- name: Check status
|
||||||
tags: step1
|
tags: validation
|
||||||
shell: ls /var/lib/ceph/osd | awk 'BEGIN { FS = "-" } ; { print $2 }'
|
shell: ceph health | grep -qv HEALTH_ERR
|
||||||
register: osd_ids
|
- name: Get OSD IDs
|
||||||
# "so that mirrors aren't rebalanced as if the OSD died" - gfidente / leseb
|
shell: ls /var/lib/ceph/osd | awk 'BEGIN { FS = "-" } ; { print $2 }'
|
||||||
- name: ceph osd set noout
|
register: osd_ids
|
||||||
tags: step1
|
# "so that mirrors aren't rebalanced as if the OSD died" - gfidente / leseb
|
||||||
command: ceph osd set noout
|
- name: ceph osd set noout
|
||||||
- name: ceph osd set norebalance
|
command: ceph osd set noout
|
||||||
tags: step1
|
- name: ceph osd set norebalance
|
||||||
command: ceph osd set norebalance
|
command: ceph osd set norebalance
|
||||||
- name: ceph osd set nodeep-scrub
|
- name: ceph osd set nodeep-scrub
|
||||||
tags: step1
|
command: ceph osd set nodeep-scrub
|
||||||
command: ceph osd set nodeep-scrub
|
- name: ceph osd set noscrub
|
||||||
- name: ceph osd set noscrub
|
command: ceph osd set noscrub
|
||||||
tags: step1
|
- name: Stop CephOSD
|
||||||
command: ceph osd set noscrub
|
service:
|
||||||
- name: Stop CephOSD
|
name: ceph-osd@{{ item }}
|
||||||
tags: step1
|
state: stopped
|
||||||
service:
|
with_items: "{{osd_ids.stdout.strip().split()}}"
|
||||||
name: ceph-osd@{{ item }}
|
- name: Update Ceph packages
|
||||||
state: stopped
|
yum:
|
||||||
with_items: "{{osd_ids.stdout.strip().split()}}"
|
name: ceph-osd
|
||||||
- name: Update Ceph packages
|
state: latest
|
||||||
tags: step1
|
- name: Start CephOSD
|
||||||
yum:
|
service:
|
||||||
name: ceph-osd
|
name: ceph-osd@{{ item }}
|
||||||
state: latest
|
state: started
|
||||||
- name: Start CephOSD
|
with_items: "{{osd_ids.stdout.strip().split()}}"
|
||||||
tags: step1
|
# with awk we are meant to check if $2 and $4 are *the same* but it returns 1 when
|
||||||
service:
|
# they are, so the check is inverted to produce an useful exit code
|
||||||
name: ceph-osd@{{ item }}
|
- name: Wait for clean pgs...
|
||||||
state: started
|
tags: ceph_pgs_clean_validation
|
||||||
with_items: "{{osd_ids.stdout.strip().split()}}"
|
vars:
|
||||||
# with awk we are meant to check if $2 and $4 are *the same* but it returns 1 when
|
ignore_warnings: {get_param: IgnoreCephUpgradeWarnings}
|
||||||
# they are, so the check is inverted to produce an useful exit code
|
shell: |
|
||||||
- name: Wait for clean pgs...
|
ceph pg stat | awk '{exit($2!=$4)}' && ceph health | egrep -sq "HEALTH_OK|HEALTH_WARN"
|
||||||
tags: step1,ceph_pgs_clean_validation
|
register: ceph_pgs_healthcheck
|
||||||
vars:
|
until: ceph_pgs_healthcheck.rc == 0
|
||||||
ignore_warnings: {get_param: IgnoreCephUpgradeWarnings}
|
retries: {get_param: CephValidationRetries}
|
||||||
shell: |
|
delay: {get_param: CephValidationDelay}
|
||||||
ceph pg stat | awk '{exit($2!=$4)}' && ceph health | egrep -sq "HEALTH_OK|HEALTH_WARN"
|
when:
|
||||||
register: ceph_pgs_healthcheck
|
- not ignore_warnings
|
||||||
until: ceph_pgs_healthcheck.rc == 0
|
- name: ceph osd unset noout
|
||||||
retries: {get_param: CephValidationRetries}
|
command: ceph osd unset noout
|
||||||
delay: {get_param: CephValidationDelay}
|
- name: ceph osd unset norebalance
|
||||||
when:
|
command: ceph osd unset norebalance
|
||||||
- not ignore_warnings
|
- name: ceph osd unset nodeep-scrub
|
||||||
- name: ceph osd unset noout
|
command: ceph osd unset nodeep-scrub
|
||||||
tags: step1
|
- name: ceph osd unset noscrub
|
||||||
command: ceph osd unset noout
|
command: ceph osd unset noscrub
|
||||||
- name: ceph osd unset norebalance
|
|
||||||
tags: step1
|
|
||||||
command: ceph osd unset norebalance
|
|
||||||
- name: ceph osd unset nodeep-scrub
|
|
||||||
tags: step1
|
|
||||||
command: ceph osd unset nodeep-scrub
|
|
||||||
- name: ceph osd unset noscrub
|
|
||||||
tags: step1
|
|
||||||
command: ceph osd unset noscrub
|
|
||||||
|
@ -104,11 +104,10 @@ 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
|
when: (ceph_rgw_enabled.rc == 0) and (step|int == 0)
|
||||||
tags: step0,validation
|
tags: validation
|
||||||
- name: Stop RGW instance
|
- name: Stop RGW instance
|
||||||
tags: step1
|
when: (ceph_rgw_enabled.rc == 0) and (step|int == 1)
|
||||||
when: ceph_rgw_enabled.rc == 0
|
|
||||||
service:
|
service:
|
||||||
name: ceph-radosgw@{{rgw_id.stdout}}
|
name: ceph-radosgw@{{rgw_id.stdout}}
|
||||||
state: stopped
|
state: stopped
|
||||||
|
@ -194,18 +194,16 @@ 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
|
when: (cinder_api_enabled.rc == 0) and (step|int == 0)
|
||||||
tags: step0,validation
|
tags: validation
|
||||||
- name: check for cinder running under apache (post upgrade)
|
- name: check for cinder running under apache (post upgrade)
|
||||||
tags: step1
|
when: step|int == 1
|
||||||
shell: "httpd -t -D DUMP_VHOSTS | grep -q cinder"
|
shell: "httpd -t -D DUMP_VHOSTS | grep -q cinder"
|
||||||
register: cinder_apache
|
register: cinder_apache
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
- name: Stop cinder_api service (running under httpd)
|
- name: Stop cinder_api service (running under httpd)
|
||||||
tags: step1
|
|
||||||
service: name=httpd state=stopped
|
service: name=httpd state=stopped
|
||||||
when: cinder_apache.rc == 0
|
when: (cinder_apache.rc == 0) and (step|int == 1)
|
||||||
- name: Stop and disable cinder_api service (pre-upgrade not under httpd)
|
- name: Stop and disable cinder_api service (pre-upgrade not under httpd)
|
||||||
tags: step1
|
when: (cinder_api_enabled.rc == 0) and (step|int == 1)
|
||||||
when: cinder_api_enabled.rc == 0
|
|
||||||
service: name=openstack-cinder-api state=stopped enabled=no
|
service: name=openstack-cinder-api state=stopped enabled=no
|
||||||
|
@ -74,9 +74,8 @@ 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
|
when: (cinder_scheduler_enabled.rc == 0) and (step|int == 0)
|
||||||
tags: step0,validation
|
tags: validation
|
||||||
- name: Stop cinder_scheduler service
|
- name: Stop cinder_scheduler service
|
||||||
tags: step1
|
when: (cinder_scheduler_enabled.rc == 0) and (step|int == 1)
|
||||||
when: cinder_scheduler_enabled.rc == 0
|
|
||||||
service: name=openstack-cinder-scheduler state=stopped
|
service: name=openstack-cinder-scheduler state=stopped
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user