healthchecks: check if fact is defined before checking its value

When checking if keystone/nova healthchecks are healthy, make sure the
registered fact is set (which can slip to a further retry if podman
inspect took too much time to execute).

That way, we process the retries without an error like found in the bug
report.

Change-Id: I9f5063c9c3b598afd5bd01447f00a1146a20f4c3
Closes-Bug: #1878063
changes/13/726913/1
Emilien Macchi 2 years ago
parent a44b659bcf
commit 21d1f773c7
  1. 1
      deployment/keystone/keystone-container-puppet.yaml
  2. 1
      deployment/nova/nova-api-container-puppet.yaml
  3. 1
      deployment/nova/nova-compute-container-puppet.yaml
  4. 1
      deployment/nova/nova-conductor-container-puppet.yaml
  5. 1
      deployment/nova/nova-libvirt-container-puppet.yaml
  6. 1
      deployment/nova/nova-metadata-container-puppet.yaml
  7. 1
      deployment/nova/nova-migration-target-container-puppet.yaml
  8. 1
      deployment/nova/nova-scheduler-container-puppet.yaml
  9. 1
      deployment/nova/nova-vnc-proxy-container-puppet.yaml

@ -763,6 +763,7 @@ outputs:
name: keystone
register: keystone_infos
failed_when:
- keystone_infos.containers.0.Healthcheck.Status is defined
- "'healthy' not in keystone_infos.containers.0.Healthcheck.Status"
retries: 10
delay: 30

@ -472,6 +472,7 @@ outputs:
name: nova_api
register: nova_api_infos
failed_when:
- nova_api_infos.containers.0.Healthcheck.Status is defined
- "'healthy' not in nova_api_infos.containers.0.Healthcheck.Status"
retries: 10
delay: 30

@ -1087,6 +1087,7 @@ outputs:
name: nova_compute
register: nova_compute_infos
failed_when:
- nova_compute_infos.containers.0.Healthcheck.Status is defined
- "'healthy' not in nova_compute_infos.containers.0.Healthcheck.Status"
retries: 10
delay: 30

@ -183,6 +183,7 @@ outputs:
name: nova_conductor
register: nova_conductor_infos
failed_when:
- nova_conductor_infos.containers.0.Healthcheck.Status is defined
- "'healthy' not in nova_conductor_infos.containers.0.Healthcheck.Status"
retries: 10
delay: 30

@ -799,6 +799,7 @@ outputs:
name: nova_libvirt
register: nova_libvirt_infos
failed_when:
- nova_libvirt_infos.containers.0.Healthcheck.Status is defined
- "'healthy' not in nova_libvirt_infos.containers.0.Healthcheck.Status"
retries: 10
delay: 30

@ -241,6 +241,7 @@ outputs:
name: nova_metadata
register: nova_metadata_infos
failed_when:
- nova_metadata_infos.containers.0.Healthcheck.Status is defined
- "'healthy' not in nova_metadata_infos.containers.0.Healthcheck.Status"
retries: 10
delay: 30

@ -186,6 +186,7 @@ outputs:
name: nova_migration_target
register: nova_migration_target_infos
failed_when:
- nova_migration_target_infos.containers.0.Healthcheck.Status is defined
- "'healthy' not in nova_migration_target_infos.containers.0.Healthcheck.Status"
retries: 10
delay: 30

@ -213,6 +213,7 @@ outputs:
name: nova_scheduler
register: nova_scheduler_infos
failed_when:
- nova_scheduler_infos.containers.0.Healthcheck.Status is defined
- "'healthy' not in nova_scheduler_infos.containers.0.Healthcheck.Status"
retries: 10
delay: 30

@ -305,6 +305,7 @@ outputs:
name: nova_vnc_proxy
register: nova_vnc_proxy_infos
failed_when:
- nova_vnc_proxy_infos.containers.0.Healthcheck.Status is defined
- "'healthy' not in nova_vnc_proxy_infos.containers.0.Healthcheck.Status"
retries: 10
delay: 30

Loading…
Cancel
Save