Overcloud service deploy fails when Kolla VIP contains dashes, and changing FQDN does not update all service configs
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
kayobe |
New
|
Undecided
|
Unassigned |
Bug Description
OpenStack 2023.1, Kayobe 14.1, Ubuntu 22.04
I had the kolla FQDN set as 'omc_iaas_
In /etc/kayobe/
kolla_internal_
kolla_external_
When I ran overcloud service deploy, it failed at this part:
TASK [nova-cell : Waiting for nova-compute services to register themselves] *******
skipping: [AIOTEST02]
skipping: [AIOTEST03]
fatal: [AIOTEST01]: FAILED! =>
msg: 'The conditional check ''(nova_
TASK [nova-cell : Fail if nova-compute service failed to register] *******
fatal: [AIOTEST02]: FAILED! =>
msg: |-
The conditional check 'any_failed_
failed_
failed_
from_json |
list }}: Unable to look up a name or access an attribute in template string ({{ hostvars[
from_json |
list }}).
Make sure your variable name does not contain invalid characters like '-': the JSON object must be str, bytes or bytearray, not AnsibleUndefined. the JSON object must be str, bytes or bytearray, not AnsibleUndefined. Unable to look up a name or access an attribute in template string ({{ hostvars[
from_json |
list }}).
Make sure your variable name does not contain invalid characters like '-': the JSON object must be str, bytes or bytearray, not AnsibleUndefined. the JSON object must be str, bytes or bytearray, not AnsibleUndefined. {{ hostvars[
from_json |
list }}: Unable to look up a name or access an attribute in template string ({{ hostvars[
from_json |
list }}).
Make sure your variable name does not contain invalid characters like '-': the JSON object must be str, bytes or bytearray, not AnsibleUndefined. the JSON object must be str, bytes or bytearray, not AnsibleUndefined. Unable to look up a name or access an attribute in template string ({{ hostvars[
from_json |
list }}).
Make sure your variable name does not contain invalid characters like '-': the JSON object must be str, bytes or bytearray, not AnsibleUndefined. the JSON object must be str, bytes or bytearray, not AnsibleUndefined. {{ expected_
from_json |
list }}: Unable to look up a name or access an attribute in template string ({{ hostvars[
from_json |
list }}).
There are a dozen more blocks of that message, pretty much the same. This seems to be an ansible issue and not an openstack issue since it's complaining about dashes in variable names..
The thing is that many components seem to be fine. Horizon, Grafana, Prometheus, they are all fine with that FQDN. But nova and neutron containers stop working.
During troubleshooting I tried changing the FQDN to "omciaasdeploy.
root@AIOTEST01:~# grep -Irn omc-iaas-deploy /etc/kolla/ | wc -l
86
root@AIOTEST01:~# grep -Irn omciaasdeploy /etc/kolla/ | wc -l
95
After fixing those with `find exec sed` to make them match the FQDN I set the deployment still failed in the same place.
So there are two issues:
Dashes seem to make nova and neutron containers fail
Changing the FQDN doesn't push the config everywhere, probably because it fails before it gets around to that
Currently all containers are running, only nova_api complains that the nodes can't resolve themselves, but service deploy is still failing at the error above.
More details from that error:
Make sure your variable name does not contain invalid characters like '-': the JSON object must be str, bytes or bytearray, not AnsibleUndefined. the JSON object must be str, bytes or bytearray, not AnsibleUndefined
The error appears to be in '/home/ ubuntu/ venvs/kolla- ansible/ share/kolla- ansible/ ansible/ roles/nova- cell/tasks/ wait_discover_ computes. yml': line 47, column 7, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
# that failed to register.
- name: Fail if nova-compute service failed to register
^ here
This is the task at line 47:
# NOTE(mgoddard): Use a separate fail task to ensure we fail only those hosts
nova_compute_ service_ hosts: >- all_computes_ in_batch[ 0]].nova_ compute_ services. stdout |
from_ json |
map( attribute= 'Host') |
failed_ compute_ service_ hosts: >- compute_ service_ hosts | difference( nova_compute_ service_ hosts) | list }}
any_failed_ services: >- facts.nodename in failed_ compute_ service_ hosts or
( ansible_ facts.hostname ~ "-ironic") in failed_ compute_ service_ hosts }} compute_ service_ hosts | join(',') }}
any_failed_ services or
(nova_ compute_ registration_ fatal | bool and
failed_ compute_ service_ hosts | length > 0)
# that failed to register.
- name: Fail if nova-compute service failed to register
vars:
# 'Host' field of all registered compute services.
{{ hostvars[
list }}
# 'Host' field of failed compute services.
{{ expected_
# Whether any compute services failed on this host.
{{ ansible_
fail:
msg: >-
The Nova compute service failed to register itself on the following
hosts: {{ failed_
when: >-