From 4a6050a3330afa50257dc588a8550425db0b8e94 Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Fri, 24 Jul 2020 14:55:13 +0000 Subject: [PATCH] Revert "Remove the waiting for ironic-api to be accessible" This reverts commit 8fc86893893685e828600e21ddba147b64f0adc3. It appears that it is still necessary to wait for ironic to be up, otherwise inspector may fail to start: The baremetal service for 192.0.2.10:None exists but does not have any supported versions. Change-Id: Ibc8314c91113618ce9e92b8933a63eba3cf3bbe1 --- ansible/roles/ironic/handlers/main.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/ansible/roles/ironic/handlers/main.yml b/ansible/roles/ironic/handlers/main.yml index 35fa73d021..458d648e1b 100644 --- a/ansible/roles/ironic/handlers/main.yml +++ b/ansible/roles/ironic/handlers/main.yml @@ -30,6 +30,25 @@ when: - kolla_action != "config" +# Due to a bug in the ironic client, ironic inspector fails to start if ironic +# API is not accessible. https://storyboard.openstack.org/#!/story/2006393 +# TODO(mgoddard): remove this task when +# https://storyboard.openstack.org/#!/story/2006393 has been fixed. +- name: Wait for ironic-api to be accessible + become: true + kolla_toolbox: + module_name: uri + module_args: + url: "{{ ironic_internal_endpoint }}" + register: result + until: result is success + retries: 12 + delay: 5 + listen: Restart ironic-api container + when: + - kolla_action != "config" + run_once: True + - name: Restart ironic-inspector container vars: service_name: "ironic-inspector"