When config download runs to generate the ansible project directory, it will fail if any host shortname starts with another host's shortname.
Particularly, this will happen when deploying with more than 10 nodes of the same roles and using the default hostname formats since a hostname such as openstack-compute-10 starts with openstack-compute-1.
Sample traceback of a host called compute-2, and I also have hosts compute-20, compute-21, etc:
Traceback (most recent call last):
File "/usr/bin/tripleo-config-download", line 57, in <module>
stack_config.download_config(args.stack_name, args.output_dir)
File "/home/centos/tripleo-common/tripleo_common/utils/config.py", line 577, in download_config
self.write_config(stack, name, config_dir, config_type)
File "/home/centos/tripleo-common/tripleo_common/utils/config.py", line 515, in write_config
if role_host_vars and server_role:
SystemError: Found multiple `compute-2`, which is unexpected. This means that the FQDN of the selected device is either wrong or is sharing a name with another host, which is also wrong. Please correct this issue before continuing. Return data can be found here -> [{u'fqdn_internal_api': u'compute-2.internalapi.localdomain', u'fqdn_ctlplane': u'compute-2.ctlplane.localdomain', u'fqdn_storage': u'compute-2.storage.localdomain', u'fqdn_canonical': u'compute-2.localdomain', u'fqdn_tenant': u'compute-2.tenant.localdomain'}, {u'fqdn_internal_api': u'compute-20.internalapi.localdomain', u'fqdn_ctlplane': u'compute-20.ctlplane.localdomain', u'fqdn_storage': u'compute-20.storage.localdomain', u'fqdn_canonical': u'compute-20.localdomain', u'fqdn_tenant': u'compute-20.tenant.localdomain'}, {u'fqdn_internal_api': u'compute-21.internalapi.localdomain', u'fqdn_ctlplane': u'compute-21.ctlplane.localdomain', u'fqdn_storage': u'compute-21.storage.localdomain', u'fqdn_canonical': u'compute-21.localdomain', u'fqdn_tenant': u'compute-21.tenant.localdomain'}, {u'fqdn_internal_api': u'compute-22.internalapi.localdomain', u'fqdn_ctlplane': u'compute-22.ctlplane.localdomain', u'fqdn_storage': u'compute-22.storage.localdomain', u'fqdn_canonical': u'compute-22.localdomain', u'fqdn_tenant': u'compute-22.tenant.localdomain'}, {u'fqdn_internal_api': u'compute-23.internalapi.localdomain', u'fqdn_ctlplane': u'compute-23.ctlplane.localdomain', u'fqdn_storage': u'compute-23.storage.localdomain', u'fqdn_canonical': u'compute-23.localdomain', u'fqdn_tenant': u'compute-23.tenant.localdomain'}, {u'fqdn_internal_api': u'compute-24.internalapi.localdomain', u'fqdn_ctlplane': u'compute-24.ctlplane.localdomain', u'fqdn_storage': u'compute-24.storage.localdomain', u'fqdn_canonical': u'compute-24.localdomain', u'fqdn_tenant': u'compute-24.tenant.localdomain'}, {u'fqdn_internal_api': u'compute-25.internalapi.localdomain', u'fqdn_ctlplane': u'compute-25.ctlplane.localdomain', u'fqdn_storage': u'compute-25.storage.localdomain', u'fqdn_canonical': u'compute-25.localdomain', u'fqdn_tenant': u'compute-25.tenant.localdomain'}, {u'fqdn_internal_api': u'compute-26.internalapi.localdomain', u'fqdn_ctlplane': u'compute-26.ctlplane.localdomain', u'fqdn_storage': u'compute-26.storage.localdomain', u'fqdn_canonical': u'compute-26.localdomain', u'fqdn_tenant': u'compute-26.tenant.localdomain'}, {u'fqdn_internal_api': u'compute-27.internalapi.localdomain', u'fqdn_ctlplane': u'compute-27.ctlplane.localdomain', u'fqdn_storage': u'compute-27.storage.localdomain', u'fqdn_canonical': u'compute-27.localdomain', u'fqdn_tenant': u'compute-27.tenant.localdomain'}, {u'fqdn_internal_api': u'compute-28.internalapi.localdomain', u'fqdn_ctlplane': u'compute-28.ctlplane.localdomain', u'fqdn_storage': u'compute-28.storage.localdomain', u'fqdn_canonical': u'compute-28.localdomain', u'fqdn_tenant': u'compute-28.tenant.localdomain'}, {u'fqdn_internal_api': u'compute-29.internalapi.localdomain', u'fqdn_ctlplane': u'compute-29.ctlplane.localdomain', u'fqdn_storage': u'compute-29.storage.localdomain', u'fqdn_canonical': u'compute-29.localdomain', u'fqdn_tenant': u'compute-29.tenant.localdomain'}].
The issue is caused by this patch:
https://review.opendev.org/#/c/695998/
These lines:
if role_host_vars and server_role:
servers_ansible_host_vars = [
v for k, v in server_role_vars.items()
if k.startswith(server)
]
if len(servers_ansible_host_vars) > 1:
raise SystemError(
"Found multiple `{}`, which is unexpected. This means"
" that the FQDN of the selected device is either"
" wrong or is sharing a name with another host, which"
" is also wrong. Please correct this issue before"
" continuing. Return data can be found here"
" -> {}.".format(
server,
servers_ansible_host_vars
)
)
ine:
https:/ /review. opendev. org/#/c/ 698726/