Add validation task in docker services [Nova]
Docker services are missing the pre-upgrade validation task in the upgrade_tasks section which verifies if the service is running before going on with the upgrade. Change-Id: I5327bd319012d99a6b805631bd96ca9f335d1b22 Partial-Bug: #1704389
This commit is contained in:
parent
9bd858ebdf
commit
188435ca18
@ -223,9 +223,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
|
||||
|
@ -151,6 +151,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:
|
||||
@ -158,8 +163,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
|
||||
|
@ -127,6 +127,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:
|
||||
@ -134,8 +139,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
|
||||
|
@ -122,8 +122,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
|
||||
|
@ -122,6 +122,16 @@ outputs:
|
||||
- /var/log/containers/nova
|
||||
- /var/lib/nova
|
||||
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
|
||||
|
@ -298,6 +298,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
|
||||
|
@ -118,6 +118,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
|
||||
|
@ -139,8 +139,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
|
||||
|
@ -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_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
|
||||
|
@ -122,8 +122,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…
x
Reference in New Issue
Block a user