Merge "Add validation task in docker services [Nova]"
This commit is contained in:
commit
5f4105e2c3
@ -293,9 +293,37 @@ outputs:
|
||||
get_attr: [NovaApiBase, role_data, metadata_settings]
|
||||
host_prep_tasks: {get_attr: [NovaApiLogging, host_prep_tasks]}
|
||||
upgrade_tasks:
|
||||
- name: Check if nova_api is deployed
|
||||
command: systemctl is-enabled --quiet openstack-nova-api
|
||||
tags: common
|
||||
ignore_errors: True
|
||||
register: nova_api_enabled
|
||||
- name: Check for nova-api running under apache
|
||||
tags: common
|
||||
shell: httpd -t -D DUMP_VHOSTS | grep -q 'nova'
|
||||
ignore_errors: True
|
||||
register: httpd_enabled
|
||||
- name: "PreUpgrade step0,validation: Check service openstack-nova-api is running"
|
||||
command: systemctl is-active --quiet openstack-nova-api
|
||||
tags: step0,validation
|
||||
when: nova_api_enabled.rc == 0 and httpd_enabled.rc != 0
|
||||
- name: Stop and disable nova_api service
|
||||
tags: step2
|
||||
when: nova_api_enabled.rc == 0 and httpd_enabled.rc != 0
|
||||
service: name=openstack-nova-api state=stopped enabled=no
|
||||
- name: Check if httpd service is running
|
||||
command: systemctl is-active --quiet httpd
|
||||
tags: common
|
||||
ignore_errors: True
|
||||
register: httpd_running
|
||||
- name: "PreUpgrade step0,validation: Check if nova_wsgi is running"
|
||||
tags: step0,validation
|
||||
shell: systemctl status 'httpd' | grep -q 'nova'
|
||||
when: httpd_enabled.rc == 0 and httpd_running.rc == 0
|
||||
- name: Stop nova_api service (running under httpd)
|
||||
tags: step2
|
||||
when: httpd_enabled.rc == 0 and httpd_running.rc == 0
|
||||
service: name=httpd state=stopped
|
||||
- name: Remove openstack-nova-api package if operator requests it
|
||||
yum: name=openstack-nova-api state=removed
|
||||
tags: step2
|
||||
|
@ -176,6 +176,11 @@ outputs:
|
||||
path: /etc/ceph
|
||||
state: directory
|
||||
upgrade_tasks:
|
||||
- name: Check if nova_compute is deployed
|
||||
command: systemctl is-enabled --quiet openstack-nova-compute
|
||||
tags: common
|
||||
ignore_errors: True
|
||||
register: nova_compute_enabled
|
||||
- name: Set compute upgrade level to auto
|
||||
tags: step1
|
||||
ini_file:
|
||||
@ -183,8 +188,13 @@ outputs:
|
||||
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: step0,validation
|
||||
when: nova_compute_enabled.rc == 0
|
||||
- name: Stop and disable nova-compute service
|
||||
tags: step2
|
||||
when: nova_compute_enabled.rc == 0
|
||||
service: name=openstack-nova-compute state=stopped enabled=no
|
||||
- name: Remove openstack-nova-compute package if operator requests it
|
||||
yum: name=openstack-nova-compute state=removed
|
||||
|
@ -128,6 +128,11 @@ 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
|
||||
tags: common
|
||||
ignore_errors: True
|
||||
register: nova_conductor_enabled
|
||||
- name: Set compute upgrade level to auto
|
||||
tags: step1
|
||||
ini_file:
|
||||
@ -135,8 +140,13 @@ outputs:
|
||||
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: step0,validation
|
||||
when: nova_conductor_enabled.rc == 0
|
||||
- name: Stop and disable nova_conductor service
|
||||
tags: step2
|
||||
when: nova_conductor_enabled.rc == 0
|
||||
service: name=openstack-nova-conductor state=stopped enabled=no
|
||||
- name: Remove openstack-nova-conductor package if operator requests it
|
||||
yum: name=openstack-nova-conductor state=removed
|
||||
|
@ -123,8 +123,18 @@ 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-active --quiet openstack-nova-consoleauth
|
||||
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: step0,validation
|
||||
when: nova_consoleauth_enabled.rc == 0
|
||||
- name: Stop and disable nova_consoleauth service
|
||||
tags: step2
|
||||
when: nova_consoleauth_enabled.rc == 0
|
||||
service: name=openstack-nova-consoleauth state=stopped enabled=no
|
||||
- name: Remove openstack-nova-console package if operator requests it
|
||||
yum: name=openstack-nova-console state=removed
|
||||
|
@ -130,6 +130,16 @@ 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
|
||||
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: step0,validation
|
||||
when: nova_ironic_enabled.rc == 0
|
||||
- name: Stop and disable nova-compute service
|
||||
tags: step2
|
||||
when: nova_ironic_enabled.rc == 0
|
||||
service: name=openstack-nova-compute state=stopped enabled=no
|
||||
|
@ -308,6 +308,16 @@ 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
|
||||
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: step0,validation
|
||||
when: nova_libvirt_enabled.rc == 0
|
||||
- name: Stop and disable libvirtd service
|
||||
tags: step2
|
||||
when: nova_libvirt_enabled.rc == 0
|
||||
service: name=libvirtd state=stopped enabled=no
|
||||
|
@ -117,6 +117,16 @@ 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
|
||||
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: step0,validation
|
||||
when: nova_metadata_enabled.rc == 0
|
||||
- name: Stop and disable nova_api service
|
||||
tags: step2
|
||||
when: nova_metadata_enabled.rc == 0
|
||||
service: name=openstack-nova-api state=stopped enabled=no
|
||||
|
@ -138,8 +138,23 @@ outputs:
|
||||
get_attr: [NovaPlacementBase, role_data, metadata_settings]
|
||||
host_prep_tasks: {get_attr: [NovaPlacementLogging, host_prep_tasks]}
|
||||
upgrade_tasks:
|
||||
- name: Check for nova placement running under apache
|
||||
tags: common
|
||||
shell: "httpd -t -D DUMP_VHOSTS | grep -q placement_wsgi"
|
||||
ignore_errors: True
|
||||
register: httpd_enabled
|
||||
- name: Check if httpd is running
|
||||
tags: common
|
||||
command: systemctl is-active --quiet httpd
|
||||
ignore_errors: True
|
||||
register: httpd_running
|
||||
- name: "PreUpgrade step0,validation: Check if placement_wsgi is running"
|
||||
shell: systemctl status 'httpd' | grep -q placement_wsgi
|
||||
tags: step0,validation
|
||||
when: httpd_enabled.rc == 0 and httpd_running.rc == 0
|
||||
- name: Stop and disable nova_placement service (running under httpd)
|
||||
tags: step2
|
||||
when: httpd_enabled.rc == 0 and httpd_running.rc == 0
|
||||
service: name=httpd state=stopped enabled=no
|
||||
- name: Remove httpd package if operator requests it
|
||||
yum: name=httpd state=removed
|
||||
|
@ -124,8 +124,18 @@ 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
|
||||
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: step0,validation
|
||||
when: nova_scheduler_enabled.rc == 0
|
||||
- name: Stop and disable nova_scheduler service
|
||||
tags: step2
|
||||
when: nova_scheduler_enabled.rc == 0
|
||||
service: name=openstack-nova-scheduler state=stopped enabled=no
|
||||
- name: Remove openstack-nova-scheduler package if operator requests it
|
||||
yum: name=openstack-nova-scheduler state=removed
|
||||
|
@ -123,8 +123,18 @@ outputs:
|
||||
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
|
||||
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
|
||||
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: step0,validation
|
||||
when: nova_vncproxy_enabled.rc == 0
|
||||
- name: Stop and disable nova_vnc_proxy service
|
||||
tags: step2
|
||||
when: nova_vncproxy_enabled.rc == 0
|
||||
service: name=openstack-nova-novncproxy state=stopped enabled=no
|
||||
- name: Remove openstack-nova-novncproxy package if operator requests it
|
||||
yum: name=openstack-nova-novncproxy state=removed
|
||||
|
Loading…
Reference in New Issue
Block a user