Merge "Migrate inflight validations to native podman healthchecks"

This commit is contained in:
Zuul 2020-04-21 06:02:28 +00:00 committed by Gerrit Code Review
commit 3d5a3fc45f
9 changed files with 115 additions and 162 deletions

View File

@ -741,21 +741,22 @@ outputs:
tripleo_keystone_resources_cloud_name: {get_param: RootStackName}
batched_tripleo_keystone_resources_domains: "{{ tripleo_keystone_ldap_domains | list }}"
deploy_steps_tasks:
- name: validate keystone service state
when:
- container_cli == 'podman'
- not container_healthcheck_disabled
- step|int == 4
- name: validate keystone container state
podman_container_info:
name: keystone
register: keystone_infos
failed_when:
- "'healthy' not in keystone_infos.containers.0.Healthcheck.Status"
retries: 10
delay: 30
tags:
- opendev-validation
- opendev-validation-keystone
block:
- name: Get keystone service healthcheck status
import_role:
name: healthcheck_service_status
vars:
inflight_healthcheck_services:
- tripleo_keystone_healthcheck
when:
- false
- container_cli == 'podman'
- not container_healthcheck_disabled
- step|int == 4
container_puppet_tasks:
# Keystone endpoint creation occurs only on single node
step_3:

View File

@ -467,28 +467,22 @@ outputs:
metadata_settings:
get_attr: [ApacheServiceBase, role_data, metadata_settings]
deploy_steps_tasks:
- name: validate nova api container state
when:
- container_cli == 'podman'
- not container_healthcheck_disabled
- step|int == 5
- name: validate nova-api container state
podman_container_info:
name: nova_api
register: nova_api_infos
failed_when:
- "'healthy' not in nova_api_infos.containers.0.Healthcheck.Status"
retries: 10
delay: 30
tags:
- opendev-validation
- opendev-validation-nova
block:
- name: Get nova-api healthcheck status
register: nova_api_healthcheck_state
systemd:
name: tripleo_nova_api_healthcheck
retries: 10
delay: 30
until: nova_api_healthcheck_state.status.ExecMainPID != '0' and
nova_api_healthcheck_state.status.ActiveState in ['inactive', 'failed']
failed_when: false
- name: Fail if nova-api healthcheck report failed status
fail:
msg: nova-api isn't working (healthcheck failed)
when: nova_api_healthcheck_state.status.ExecMainStatus != '0'
when:
- false
- container_cli == 'podman'
- not container_healthcheck_disabled
- step|int == 4
host_prep_tasks: {get_attr: [NovaApiLogging, host_prep_tasks]}
external_upgrade_tasks:
- when: step|int == 1

View File

@ -1053,28 +1053,22 @@ outputs:
- ksm.service
- ksmtuned.service
deploy_steps_tasks:
- name: validate nova compute container state
when:
- container_cli == 'podman'
- not container_healthcheck_disabled
- step|int == 6 #FIXME: there is no step6
- name: validate nova-compute container state
podman_container_info:
name: nova_compute
register: nova_compute_infos
failed_when:
- "'healthy' not in nova_compute_infos.containers.0.Healthcheck.Status"
retries: 10
delay: 30
tags:
- opendev-validation
- opendev-validation-nova
block:
- name: Get nova-compute healthcheck status
register: nova_compute_healthcheck_state
systemd:
name: tripleo_nova_compute_healthcheck
retries: 10
delay: 30
until: nova_compute_healthcheck_state.status.ExecMainPID != '0' and
nova_compute_healthcheck_state.status.ActiveState in ['inactive', 'failed']
failed_when: false
- name: Fail if nova-compute healthcheck report failed status
fail:
msg: nova-compute isn't working (healthcheck failed)
when: nova_compute_healthcheck_state.status.ExecMainStatus != '0'
when:
- false
- container_cli == 'podman'
- not container_healthcheck_disabled
- step|int == 6 #FIXME: there is no step6
external_post_deploy_tasks: {get_attr: [NovaComputeCommon, nova_compute_common_deploy_steps_tasks]}
upgrade_tasks:
- name: Remove openstack-nova-compute and python-nova package during upgrade

View File

@ -178,28 +178,22 @@ outputs:
environment:
KOLLA_CONFIG_STRATEGY: COPY_ALWAYS
deploy_steps_tasks:
- name: validate nova conductor container state
when:
- container_cli == 'podman'
- not container_healthcheck_disabled
- step|int == 5
- name: validate nova-conductor container state
podman_container_info:
name: nova_conductor
register: nova_conductor_infos
failed_when:
- "'healthy' not in nova_conductor_infos.containers.0.Healthcheck.Status"
retries: 10
delay: 30
tags:
- opendev-validation
- opendev-validation-nova
block:
- name: Get nova-conductor healthcheck status
register: nova_conductor_healthcheck_state
systemd:
name: tripleo_nova_conductor_healthcheck
retries: 10
delay: 30
until: nova_conductor_healthcheck_state.status.ExecMainPID != '0' and
nova_conductor_healthcheck_state.status.ActiveState in ['inactive', 'failed']
failed_when: false
- name: Fail if nova-conductor healthcheck report failed status
fail:
msg: nova-conductor isn't working (healthcheck failed)
when: nova_conductor_healthcheck_state.status.ExecMainStatus != '0'
when:
- false
- container_cli == 'podman'
- not container_healthcheck_disabled
- step|int == 5
host_prep_tasks:
list_concat:
- {get_attr: [NovaLogging, host_prep_tasks]}

View File

@ -794,27 +794,21 @@ outputs:
- {}
deploy_steps_tasks:
- name: validate nova-libvirt container state
when:
- container_cli == 'podman'
- not container_healthcheck_disabled
- step|int == 4
podman_container_info:
name: nova_libvirt
register: nova_libvirt_infos
failed_when:
- "'healthy' not in nova_libvirt_infos.containers.0.Healthcheck.Status"
retries: 10
delay: 30
tags:
- opendev-validation
- opendev-validation-nova
block:
- name: Get nova-libvirt healthcheck status
register: nova_libvirt_healthcheck_state
systemd:
name: tripleo_nova_libvirt_healthcheck
retries: 10
delay: 30
until: nova_libvirt_healthcheck_state.status.ExecMainPID != '0' and
nova_libvirt_healthcheck_state.status.ActiveState in ['inactive', 'failed']
failed_when: false
- name: Fail if nova-libvirt healthcheck report failed status
fail:
msg: nova-libvirt isn't working (healtcheck failed)
when: nova_libvirt_healthcheck_state.status.ExecMainStatus != '0'
when:
- false
- container_cli == 'podman'
- not container_healthcheck_disabled
- step|int == 4
host_prep_tasks:
list_concat:
- {get_attr: [NovaLibvirtLogging, host_prep_tasks]}

View File

@ -237,28 +237,22 @@ outputs:
environment:
KOLLA_CONFIG_STRATEGY: COPY_ALWAYS
deploy_steps_tasks:
- name: validate nova metadata container state
when:
- container_cli == 'podman'
- not container_healthcheck_disabled
- step|int == 5
- name: validate nova-metadata container state
podman_container_info:
name: nova_metadata
register: nova_metadata_infos
failed_when:
- "'healthy' not in nova_metadata_infos.containers.0.Healthcheck.Status"
retries: 10
delay: 30
tags:
- opendev-validation
- opendev-validation-nova
block:
- name: Get nova-metadata healthcheck status
register: nova_metadata_healthcheck_state
systemd:
name: tripleo_nova_metadata_healthcheck
retries: 10
delay: 30
until: nova_metadata_healthcheck_state.status.ExecMainPID != '0' and
nova_metadata_healthcheck_state.status.ActiveState in ['inactive', 'failed']
failed_when: false
- name: Fail if nova-metadata healthcheck report failed status
fail:
msg: nova-metadata isn't working (healthcheck failed)
when: nova_metadata_healthcheck_state.status.ExecMainStatus != '0'
when:
- false
- container_cli == 'podman'
- not container_healthcheck_disabled
- step|int == 5
host_prep_tasks: {get_attr: [NovaMetadataLogging, host_prep_tasks]}
external_upgrade_tasks:
- when:

View File

@ -181,25 +181,19 @@ outputs:
environment:
KOLLA_CONFIG_STRATEGY: COPY_ALWAYS
deploy_steps_tasks:
- name: validate nova migration target container state
when:
- container_cli == 'podman'
- not container_healthcheck_disabled
- step|int == 5
- name: validate nova-migration-target container state
podman_container_info:
name: nova_migration_target
register: nova_migration_target_infos
failed_when:
- "'healthy' not in nova_migration_target_infos.containers.0.Healthcheck.Status"
retries: 10
delay: 30
tags:
- opendev-validation
- opendev-validation-nova
block:
- name: Get nova-migration-target healthcheck status
register: nova_migration_target_healthcheck_state
systemd:
name: tripleo_nova_migration_target_healthcheck
retries: 10
delay: 30
until: nova_migration_target_healthcheck_state.status.ExecMainPID != '0' and
nova_migration_target_healthcheck_state.status.ActiveState in ['inactive', 'failed']
failed_when: false
- name: Fail if nova-migration-target healthcheck report failed status
fail:
msg: nova-migration-target isn't working (healtcheck failed)
when: nova_migration_target_healthcheck_state.status.ExecMainStatus != '0'
when:
- false
- container_cli == 'podman'
- not container_healthcheck_disabled
- step|int == 5

View File

@ -208,28 +208,22 @@ outputs:
environment:
KOLLA_CONFIG_STRATEGY: COPY_ALWAYS
deploy_steps_tasks:
- name: validate nova scheduler container state
when:
- container_cli == 'podman'
- not container_healthcheck_disabled
- step|int == 5
- name: validate nova-scheduler container state
podman_container_info:
name: nova_scheduler
register: nova_scheduler_infos
failed_when:
- "'healthy' not in nova_scheduler_infos.containers.0.Healthcheck.Status"
retries: 10
delay: 30
tags:
- opendev-validation
- opendev-validation-nova
block:
- name: Get nova-scheduler healthcheck status
register: nova_scheduler_healthcheck_state
systemd:
name: tripleo_nova_scheduler_healthcheck
retries: 10
delay: 30
until: nova_scheduler_healthcheck_state.status.ExecMainPID != '0' and
nova_scheduler_healthcheck_state.status.ActiveState in ['inactive', 'failed']
failed_when: false
- name: Fail if nova-scheduler healthcheck report failed status
fail:
msg: nova-scheduler isn't working (healthcheck failed)
when: nova_scheduler_healthcheck_state.status.ExecMainStatus != '0'
when:
- false
- container_cli == 'podman'
- not container_healthcheck_disabled
- step|int == 5
host_prep_tasks:
list_concat:
- {get_attr: [NovaLogging, host_prep_tasks]}

View File

@ -301,27 +301,21 @@ outputs:
- null
deploy_steps_tasks:
- name: validate nova-vnc-proxy container state
when:
- container_cli == 'podman'
- not container_healthcheck_disabled
- step|int == 5
podman_container_info:
name: nova_vnc_proxy
register: nova_vnc_proxy_infos
failed_when:
- "'healthy' not in nova_vnc_proxy_infos.containers.0.Healthcheck.Status"
retries: 10
delay: 30
tags:
- opendev-validation
- opendev-validation-nova
block:
- name: Get nova-vnc-proxy healthcheck status
register: nova_vnc_proxy_healthcheck_state
systemd:
name: tripleo_nova_vnc_proxy_healthcheck
retries: 10
delay: 30
until: nova_vnc_proxy_healthcheck_state.status.ExecMainPID != '0' and
nova_vnc_proxy_healthcheck_state.status.ActiveState in ['inactive', 'failed']
failed_when: false
- name: Fail if nova-vnc-proxy healtcheck report failed status
fail:
msg: nova-vnc-proxy isn't working (healthcheck failed)
when: nova_vnc_proxy_healthcheck_state.status.ExecMainStatus != '0'
when:
- false
- container_cli == 'podman'
- not container_healthcheck_disabled
- step|int == 5
host_prep_tasks:
list_concat:
- {get_attr: [NovaLogging, host_prep_tasks]}