bootstrap-server failing due to hostname /etc/hosts
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
kolla-ansible |
Invalid
|
Undecided
|
Unassigned |
Bug Description
bootstrap fails to run .. and the error does not make sense.
(kolla-run) root@local:
Bootstrapping servers : ansible-playbook -e @/etc/kolla/
[WARNING]: Invalid characters were found in group names but not replaced, use -vvvv to see details
[WARNING]: * Failed to parse /etc/kolla/
YAML, these are the errors we got from each: JSON: Expecting value: line 1 column 1 (char 0) Syntax Error while
loading YAML. did not find expected <document start> The error appears to be in '/etc/kolla/
5, column 1, but may be elsewhere in the file depending on the exact syntax problem. The offending line appears
to be: # These hostname must be resolvable from your deployment host v111 ^ here
[WARNING]: * Failed to parse /etc/kolla/
[prometheus-
[WARNING]: Unable to parse /etc/kolla/
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not
match 'all'
PLAY [Gather facts for all hosts] *******
skipping: no hosts matched
[WARNING]: Could not match supplied host pattern, ignoring: all_using_
PLAY [Gather facts for all hosts (if using --limit)] *******
skipping: no hosts matched
PLAY [Apply role baremetal] *******
TASK [baremetal : include_tasks] *******
included: /opt/kolla-
TASK [baremetal : Ensure localhost in /etc/hosts] *******
changed: [v111]
TASK [baremetal : Ensure hostname does not point to 127.0.1.1 in /etc/hosts] *******
fatal: [v111]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'dict object' has no attribute 'hostname'\n\nThe error appears to be in '/opt/kolla-
PLAY RECAP *******
v111 : ok=2 changed=1 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
root@local:
Warning: Permanently added 'v111,192.
127.0.0.1 localhost
(kolla-run) root@local:
Ansible is known for really bad error reporting.
This is the offending line:
regexp: "^127.0. 1.1\\b. *\\s{{ ansible_ facts.hostname }}\\b"
Seemingly, in your case ansible_facts are missing hostname.
As this is the first usage of ansible_facts in this action, I would check if facts were collected and bingo - they were not (based on your log):
PLAY [Gather facts for all hosts]
skipping: no hosts matched
You have an inventory parsing error above:
[WARNING]: * Failed to parse /etc/kolla/ multinode with yaml plugin...
It shall work when you fix it.