Description of problem: These two parameters are required to be consistent in order to properly set a new domain name for overcloud nodes: - The tripleo heat template parameter: CloudDomain - The [DEFAULT] dhcp_domain parameter in nova.conf on the Undercloud. However, it is currently possible to deploy an overcloud with these parameters mismatched. Due to the confusion this can cause and difficulty to resolve (often requiring re-deployment); the overcloud deployment should fail as soon as possible if the configuration is not consistent. Version-Release number of selected component (if applicable): Current OSP 9 How reproducible: 100% Steps to Reproduce: 1. Set CloudDomain parameter for tripleo deployment (ie example.com) 2. Leave dhcp_domain with default settings in nova.conf 3. Deploy overcloud 4. After deployment, login to overcloud node and observe issues with the configured FQDN. $ hostname -i hostname: Name or service not known $ hostname -f hostname: Name or service not known $ grep $(hostname) /etc/hosts (null) Actual results: FQDN is broken on overcloud nodes. Expected results: Deployment fails as soon as possible or a single parameter is used to set domain name. Additional info: The documentation should be enhanced to make users more aware of the impact and configuration needed. Currently: CloudDomain Type: string The DNS domain used for the hosts. This should match the dhcp_domain configured in the Undercloud’s networking. Defaults to localdomain.
The following will catch it but it seems like there should be a better way and earlier in the deployment. This would also break any deployments where this mismatch already exists. tripleo-heat-templates diff --git a/validation-scripts/all-nodes.sh b/validation-scripts/all-nodes.sh index 0b8b352..88a8147 100644 --- a/validation-scripts/all-nodes.sh +++ b/validation-scripts/all-nodes.sh @@ -67,5 +67,21 @@ function ping_default_gateways() { echo "SUCCESS" } +# Verify the FQDN from the nova/ironic deployment matches +# FQDN in the heat templates. +function fqdn_check() { + HOSTNAME=$(hostname) + SHORT_NAME=$(hostname -s) + FQDN_FROM_HOSTS=$(awk '$3 == "'${SHORT_NAME}'"{print $2}' /etc/hosts) + echo -n "Checking hostname vs /etc/hosts entry..." + if [[ $HOSTNAME != $FQDN_FROM_HOSTS ]]; then + echo "FAILURE" + echo -e "System hostname: ${HOSTNAME}\nEntry from /etc/hosts: ${FQDN_FROM_HOSTS}\n" + exit 1 + fi + echo "SUCCESS" +} + ping_controller_ips "$ping_test_ips" ping_default_gateways +fqdn_check
I submitted this code upstream as an optional validation. https://review.openstack.org/#/c/433820/
433820 was merged, https://review.openstack.org/#/c/452809/ as backport to Ocata
Ocata backport merged as well.
Sorry, did I put it in the wrong status? Might need to be in post. For Ocata the commit is Ib5689acae66baf63ecccbc3b1c0b96684781b863 so it would be nice to have it in 11 (and 12)
Looks like the patch shipped in 11 GA, closing