Workaround ironic inspector startup issue

If ironic inspector starts up before ironic-api is accessible, we see
the following error:

AttributeError: StrictVersion instance has no attribute 'version'

This actually prevents startup of ironic inspector.

Example: http://paste.openstack.org/show/756342/

The underlying issue is in python-ironicclient:
https://storyboard.openstack.org/#!/story/2006393.

The workaround employed here is to wait for ironic-api to become
available before starting ironic-inspector.

Change-Id: I674982eba5082fdc951cdcb8247d706278c64c1a
Closes-Bug: #1839866
This commit is contained in:
Mark Goddard 2019-08-12 14:05:53 +01:00
parent 1932679987
commit 15591437f3

View File

@ -30,6 +30,22 @@
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
uri:
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"