installer: baremetal: master deployment can fail due to ironic-conductor not ready
It has been observed that in some environments we can attempt to deploy masters while the conductor service on the bootstrap VM is still starting up, this results in a failure like:
msg="module.masters.ironic_node_v1.openshift-master-host[0]: Still creating... [22m30s elapsed]"
level=error
level=error msg="Error: Bad request with: [POST http://172.22.0.2:6385/v1/nodes], error message: {\"error_message\": \"{\\\"faultcode\\\": \\\"Client\\\", \\\"faultstring\\\": \\\"No valid host was found. Reason: No conductor service registered which supports driver ipmi for conductor group \\\\\\\"\\\\\\\".\\\", \\\"debuginfo\\\": null}\"}"
level=error
level=error msg=" on ../../../../../tmp/openshift-install-968715703/masters/main.tf line 1, in resource \"ironic_node_v1\" \"openshift-master-host\":"
Looking at the bootstrap VM ironic logs we see:
2020-01-06 09:51:46.400 26 DEBUG ironic.common.hash_ring [req-fc6d508c-e93b-4567-ba20-70d34f789558 - - - - -] No conductor from group <none> found for driver ipmi, trying to rebuild the hash rings get_ring /usr/lib/python3.6/site-packages/ironic/common/hash_ring.py:91[00m
then a few seconds late the conductor is finished starting
2020-01-06 09:51:57.347 1 INFO ironic.conductor.base_manager [req-691df76f-fd57-4c5a-bcc6-3d5d5a86dd68 - - - - -] Successfully started conductor with hostname dhcp19-232-242...
A partial fix for this already landed in terraform-provider-ironic ref https://github.com/openshift-metal3/terraform-provider-ironic/pull/32 however this doesn’t wait long enough for all drivers to be loaded:
09:51:36.343 26 "GET /v1/drivers HTTP/1.1" len: 335
09:51:41.365 25 "GET /v1/drivers HTTP/1.1" len: 335
09:51:46.387 26 "GET /v1/drivers HTTP/1.1" len: 796
09:51:46.400 26 No conductor from group <none> found for driver ipmi, trying to rebuild the hash rings
09:51:46.402 26 Finished rebuilding hash rings, available drivers are :fake-hardware ring /usr/lib/python3.6/site-packages/ironic/common/hash_ring.py:62[00m
09:51:46.403 26 No conductor service registered which supports driver ipmi for conductor group "".
The driver list contains “fake-hardware” but not ipmi, which satisifes the terraform check, then later ipmi is added to the list (see the len of the replies goes up to 1641 after the error (thanks to @derekhiggins for helping to figure this out)
10:22:54.929 26 "GET /v1/drivers HTTP/1.1" len: 1641
We need some way to wait until the conductor is fully initialized, and all enabled drivers are ready for use, before attempting to deploy any master nodes.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 16 (10 by maintainers)
A fix was available at https://github.com/openshift/baremetal-operator/commit/d6eaf6774de775d83bdd47e04ea3d171ba7d4346