Merge "Upgrades: Refactor playbooks to set facts"

This commit is contained in:
Zuul
2018-06-14 11:31:56 +00:00
committed by Gerrit Code Review
74 changed files with 1736 additions and 1587 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -238,37 +238,38 @@ outputs:
/var/log/containers/mysql.
ignore_errors: true
upgrade_tasks:
- name: Check if mysql service is deployed
command: systemctl is-enabled --quiet mariadb
- when: step|int == 0
tags: common
ignore_errors: True
register: mariadb_enabled
- name: "PreUpgrade step0,validation: Check if mysql service is running"
command: systemctl is-active --quiet mariadb
when:
- step|int == 0
- mariadb_enabled.rc == 0
tags: validation
# https://bugs.launchpad.net/tripleo/+bug/1753247
- name: Rename old neutron database to ovs_neutron
shell: >
if [ -d /var/lib/mysql/neutron ] ; then
mysql -e "CREATE DATABASE IF NOT EXISTS \`ovs_neutron\`;"
for table in `mysql -B -N -e "SHOW TABLES;" neutron`
do
mysql -e "RENAME TABLE \`neutron\`.\`$table\` to \`ovs_neutron\`.\`$table\`"
done
mysql -e "DROP DATABASE \`neutron\`;"
fi
become: true
when:
- step|int == 2
- {get_param: UndercloudUpgrade}
- name: Stop and disable mysql service
when:
- step|int == 2
- mariadb_enabled.rc == 0
service: name=mariadb state=stopped enabled=no
block:
- name: Check if mysql service is deployed
command: systemctl is-enabled --quiet mariadb
ignore_errors: True
register: mariadb_enabled_result
- name: Set fact mariadb_enabled
set_fact:
mariadb_enabled: "{{ mariadb_enabled_result.rc == 0 }}"
- name: "PreUpgrade step0,validation: Check if mysql service is running"
command: systemctl is-active --quiet mariadb
when: mariadb_enabled|bool
tags: validation
- when: step|int == 2
block:
# https://bugs.launchpad.net/tripleo/+bug/1753247
- name: Rename old neutron database to ovs_neutron
shell: >
if [ -d /var/lib/mysql/neutron ] ; then
mysql -e "CREATE DATABASE IF NOT EXISTS \`ovs_neutron\`;"
for table in `mysql -B -N -e "SHOW TABLES;" neutron`
do
mysql -e "RENAME TABLE \`neutron\`.\`$table\` to \`ovs_neutron\`.\`$table\`"
done
mysql -e "DROP DATABASE \`neutron\`;"
fi
become: true
when: {get_param: UndercloudUpgrade}
- name: Stop and disable mysql service
when: mariadb_enabled|bool
service: name=mariadb state=stopped enabled=no
post_upgrade_tasks:
- name: Check and upgrade Mysql database after major version upgrade
command: docker exec -u root mysql mysql_upgrade

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -280,17 +280,39 @@ outputs:
# Got to check that pacemaker_is_active is working fine with bundle.
# TODO: pacemaker_is_active resource doesn't support bundle.
upgrade_tasks:
- name: Get docker Cinder-Backup image
set_fact:
cinder_backup_docker_image_latest: *cinder_backup_image_pcmklatest
- name: Check for Cinder-Backup Kolla configuration
command: grep '^backup_driver[ \t]*=' /var/lib/config-data/puppet-generated/cinder/etc/cinder/cinder.conf
changed_when: no
ignore_errors: true
register: cinder_backup_kolla_config
- name: Check if Cinder-Backup is already containerized
set_fact:
cinder_backup_containerized: "{{cinder_backup_kolla_config|succeeded}}"
- when: step|int == 0
tags: common
block:
- name: Get docker Cinder-Backup image
set_fact:
cinder_backup_docker_image_latest: *cinder_backup_image_pcmklatest
- name: Check for Cinder-Backup Kolla configuration
command: grep '^backup_driver[ \t]*=' /var/lib/config-data/puppet-generated/cinder/etc/cinder/cinder.conf
changed_when: no
ignore_errors: true
register: cinder_backup_kolla_config
- name: Check if Cinder-Backup is already containerized
set_fact:
cinder_backup_containerized: "{{cinder_backup_kolla_config|succeeded}}"
- name: Prepare the switch to new cinder_backup container image name in pacemaker
when: cinder_backup_containerized|bool
block:
- name: Get cinder_backup image id currently used by pacemaker
shell: "docker images | awk '/cinder-backup.* pcmklatest/{print $3}' | uniq"
register: cinder_backup_current_pcmklatest_id
- name: Temporarily tag the current cinder_backup image id with the upgraded image name
shell: "docker tag {{cinder_backup_current_pcmklatest_id.stdout}} {{cinder_backup_docker_image_latest}}"
when: cinder_backup_current_pcmklatest_id.stdout != ''
- name: Check openstack-cinder-backup cluster resource status
pacemaker_resource:
resource: openstack-cinder-backup
state: show
check_mode: false
ignore_errors: true
register: cinder_backup_pcs_res_result
- name: Set fact cinder_backup_pcs_res
set_fact:
cinder_backup_pcs_res: "{{cinder_backup_pcs_res_result|succeeded}}"
- name: Cinder-Backup baremetal to container upgrade tasks
when:
- step|int == 1
@@ -330,30 +352,12 @@ outputs:
until: output.rc == 0
- name: Disable cinder_backup service
service: name=openstack-cinder-backup enabled=no
- name: Prepare the switch to new cinder_backup container image name in pacemaker
when:
- step|int == 0
- cinder_backup_containerized|bool
block:
- name: Get cinder_backup image id currently used by pacemaker
shell: "docker images | awk '/cinder-backup.* pcmklatest/{print $3}' | uniq"
register: cinder_backup_current_pcmklatest_id
- name: Temporarily tag the current cinder_backup image id with the upgraded image name
shell: "docker tag {{cinder_backup_current_pcmklatest_id.stdout}} {{cinder_backup_docker_image_latest}}"
when: cinder_backup_current_pcmklatest_id.stdout != ''
- name: Check openstack-cinder-backup cluster resource status
pacemaker_resource:
resource: openstack-cinder-backup
state: show
check_mode: false
ignore_errors: true
register: cinder_backup_pcs_res
- name: Update cinder_backup pcs resource bundle for new container image
when:
- step|int == 1
- cinder_backup_containerized|bool
- is_bootstrap_node
- cinder_backup_pcs_res|succeeded
- cinder_backup_pcs_res|bool
block:
- name: Disable the cinder_backup cluster resource before container upgrade
pacemaker_resource:

View File

@@ -305,17 +305,39 @@ outputs:
# Got to check that pacemaker_is_active is working fine with bundle.
# TODO: pacemaker_is_active resource doesn't support bundle.
upgrade_tasks:
- name: Get docker Cinder-Volume image
set_fact:
cinder_volume_docker_image_latest: *cinder_volume_image_pcmklatest
- name: Check for Cinder-Volume Kolla configuration
command: grep '^volume_driver[ \t]*=' /var/lib/config-data/puppet-generated/cinder/etc/cinder/cinder.conf
changed_when: no
ignore_errors: true
register: cinder_volume_kolla_config
- name: Check if Cinder-Volume is already containerized
set_fact:
cinder_volume_containerized: "{{cinder_volume_kolla_config|succeeded}}"
- when: step|int == 0
tags: common
block:
- name: Get docker Cinder-Volume image
set_fact:
cinder_volume_docker_image_latest: *cinder_volume_image_pcmklatest
- name: Check for Cinder-Volume Kolla configuration
command: grep '^volume_driver[ \t]*=' /var/lib/config-data/puppet-generated/cinder/etc/cinder/cinder.conf
changed_when: no
ignore_errors: true
register: cinder_volume_kolla_config
- name: Check if Cinder-Volume is already containerized
set_fact:
cinder_volume_containerized: "{{cinder_volume_kolla_config|succeeded}}"
- name: Prepare the switch to new cinder_volume container image name in pacemaker
when: cinder_volume_containerized|bool
block:
- name: Get cinder_volume image id currently used by pacemaker
shell: "docker images | awk '/cinder-volume.* pcmklatest/{print $3}' | uniq"
register: cinder_volume_current_pcmklatest_id
- name: Temporarily tag the current cinder_volume image id with the upgraded image name
shell: "docker tag {{cinder_volume_current_pcmklatest_id.stdout}} {{cinder_volume_docker_image_latest}}"
when: cinder_volume_current_pcmklatest_id.stdout != ''
- name: Check openstack-cinder-volume cluster resource status
pacemaker_resource:
resource: openstack-cinder-volume
state: show
check_mode: false
ignore_errors: true
register: cinder_volume_pcs_res_result
- name: Set fact cinder_volume_pcs_res
set_fact:
cinder_volume_pcs_res: "{{cinder_volume_pcs_res_result|succeeded}}"
- name: Cinder-Volume baremetal to container upgrade tasks
when:
- step|int == 1
@@ -355,30 +377,12 @@ outputs:
until: output.rc == 0
- name: Disable cinder_volume service from boot
service: name=openstack-cinder-volume enabled=no
- name: Prepare the switch to new cinder_volume container image name in pacemaker
when:
- step|int == 0
- cinder_volume_containerized|bool
block:
- name: Get cinder_volume image id currently used by pacemaker
shell: "docker images | awk '/cinder-volume.* pcmklatest/{print $3}' | uniq"
register: cinder_volume_current_pcmklatest_id
- name: Temporarily tag the current cinder_volume image id with the upgraded image name
shell: "docker tag {{cinder_volume_current_pcmklatest_id.stdout}} {{cinder_volume_docker_image_latest}}"
when: cinder_volume_current_pcmklatest_id.stdout != ''
- name: Check openstack-cinder-volume cluster resource status
pacemaker_resource:
resource: openstack-cinder-volume
state: show
check_mode: false
ignore_errors: true
register: cinder_volume_pcs_res
- name: Update cinder_volume pcs resource bundle for new container image
when:
- step|int == 1
- cinder_volume_containerized|bool
- is_bootstrap_node
- cinder_volume_pcs_res|succeeded
- cinder_volume_pcs_res|bool
block:
- name: Disable the cinder_volume cluster resource before container upgrade
pacemaker_resource:

View File

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

View File

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

View File

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

View File

@@ -246,16 +246,37 @@ outputs:
# Got to check that pacemaker_is_active is working fine with bundle.
# TODO: pacemaker_is_active resource doesn't support bundle.
upgrade_tasks:
- name: Get docker Manila-Share image
set_fact:
manila_share_docker_image_latest: *manila_share_image_pcmklatest
- name: Check for Manila-Share Kolla configuration
stat:
path: /var/lib/config-data/puppet-generated/manila
register: manila_share_kolla_config
- name: Check if Manila-Share is already containerized
set_fact:
manila_share_containerized: "{{manila_share_kolla_config.stat.isdir | default(false)}}"
- when: step|int == 0
tags: common
block:
- name: Get docker Manila-Share image
set_fact:
manila_share_docker_image_latest: *manila_share_image_pcmklatest
- name: Check for Manila-Share Kolla configuration
stat:
path: /var/lib/config-data/puppet-generated/manila
register: manila_share_kolla_config
- name: Check if Manila-Share is already containerized
set_fact:
manila_share_containerized: "{{manila_share_kolla_config.stat.isdir | default(false)}}"
- name: Prepare the switch to new Manila-Share container image name in pacemaker
when: manila_share_containerized|bool
block:
- name: Get Manila-Share image id currently used by pacemaker
shell: "docker images | awk '/manila-share.* pcmklatest/{print $3}' | uniq"
register: manila_share_current_pcmklatest_id
- name: Temporarily tag the current Manila-Share image id with the upgraded image name
shell: "docker tag {{manila_share_current_pcmklatest_id.stdout}} {{manila_share_docker_image_latest}}"
when: manila_share_current_pcmklatest_id.stdout != ''
- name: Check openstack-manila-share cluster resource status
pacemaker_resource:
resource: openstack-manila-share
state: show
check_mode: false
ignore_errors: true
register: manila_share_pcs_res_result
- name: Set fact manila_share_pcs_res
set_fact: "{{manila_share_pcs_res_result|succeeded}}"
- name: Manila-Share baremetal to container upgrade tasks
when:
- step|int == 1
@@ -263,30 +284,12 @@ outputs:
block:
- name: Stop and disable manila_share service
service: name=openstack-manila-share state=stopped enabled=no
- name: Prepare the switch to new Manila-Share container image name in pacemaker
when:
- step|int == 0
- manila_share_containerized|bool
block:
- name: Get Manila-Share image id currently used by pacemaker
shell: "docker images | awk '/manila-share.* pcmklatest/{print $3}' | uniq"
register: manila_share_current_pcmklatest_id
- name: Temporarily tag the current Manila-Share image id with the upgraded image name
shell: "docker tag {{manila_share_current_pcmklatest_id.stdout}} {{manila_share_docker_image_latest}}"
when: manila_share_current_pcmklatest_id.stdout != ''
- name: Check openstack-manila-share cluster resource status
pacemaker_resource:
resource: openstack-manila-share
state: show
check_mode: false
ignore_errors: true
register: manila_share_pcs_res
- name: Update openstack-manila-share pcs resource bundle for new container image
when:
- step|int == 1
- manila_share_containerized|bool
- is_bootstrap_node
- manila_share_pcs_res|succeeded
- manila_share_pcs_res|bool
block:
- name: Disable the Manila-Share cluster resource before container upgrade
pacemaker_resource:

View File

@@ -300,21 +300,24 @@ outputs:
# Got to check that pacemaker_is_active is working fine with bundle.
# TODO: pacemaker_is_active resource doesn't support bundle.
upgrade_tasks:
- name: Get docker Rabbitmq image
set_fact:
docker_image_latest: *rabbitmq_image_pcmklatest
- name: Check for Rabbitmq Kolla configuration
stat:
path: /var/lib/config-data/puppet-generated/rabbitmq
register: rabbit_kolla_config
- name: Check if Rabbitmq is already containerized
set_fact:
rabbit_containerized: "{{rabbit_kolla_config.stat.isdir | default(false)}}"
- name: get bootstrap nodeid
command: hiera -c /etc/puppet/hiera.yaml bootstrap_nodeid
register: bootstrap_node
- name: set is_bootstrap_node fact
set_fact: is_bootstrap_node={{bootstrap_node.stdout|lower == ansible_hostname|lower}}
- when: step|int == 0
tags: common
block:
- name: Get docker Rabbitmq image
set_fact:
docker_image_latest: *rabbitmq_image_pcmklatest
- name: Check for Rabbitmq Kolla configuration
stat:
path: /var/lib/config-data/puppet-generated/rabbitmq
register: rabbit_kolla_config
- name: Check if Rabbitmq is already containerized
set_fact:
rabbit_containerized: "{{rabbit_kolla_config.stat.isdir | default(false)}}"
- name: get bootstrap nodeid
command: hiera -c /etc/puppet/hiera.yaml bootstrap_nodeid
register: bootstrap_node
- name: set is_bootstrap_node fact
set_fact: is_bootstrap_node={{bootstrap_node.stdout|lower == ansible_hostname|lower}}
- name: Rabbitmq baremetal to container upgrade tasks
when:
- step|int == 1

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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