Both the above commands report the correct hostname undercloud-0. However, when later running the command 'openstack undercloud install' it fails with the following output:
018-12-23 10:34:46,421 INFO: Logging to /home/stack/.instack/install-undercloud.log
2018-12-23 10:34:46,458 INFO: Checking for a FQDN hostname...
2018-12-23 10:34:46,493 INFO: Static hostname detected as localhost.localdomain
2018-12-23 10:34:46,511 INFO: Transient hostname detected as undercloud-0
2018-12-23 10:34:46,511 ERROR: Static hostname "localhost.localdomain" does not match transient hostname "undercloud-0".
2018-12-23 10:34:46,511 ERROR: Use hostnamectl to set matching hostnames.
2018-12-23 10:34:46,511 ERROR: An error occurred during configuration validation, please check your host configuration and try again. Error message: Static and transient hostnames do not match
Command 'instack-install-undercloud' returned non-zero exit status 1
and it does not work until I run both hostnamectl commands listed below
I think this might be NOTABUG. The intro instructions state that you need to use a fully-qualified domain name that can be resolved with the DNS server you use for the undercloud node.
In your case, you used "undercloud-0" as the hostname, which isn't a fully-qualified domain names (e.g. "undercloud-0.example.com")
I could modify the step text to say:
"If either of the previous commands do not report the correct fully-qualified hostname or report an error, use hostnamectl to set a hostname:"
What do you think?
Thanks for explaining that. Now I understand.
I think that the modification you suggest would make it even clearer.
No worries. This has been implemented: