diff options
author | Jenkins <jenkins@review.openstack.org> | 2017-03-09 21:44:21 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2017-03-09 21:44:21 +0000 |
commit | a8d511a05e2f94af177155546bcc5b74ee0329a0 (patch) | |
tree | ca9f243f48a9ceab9065fc9214983e30d9c8de98 /validation-scripts | |
parent | 90a0c87608e8f9fe37acd659ac6b130791a743e8 (diff) | |
parent | bae2d113938b9bb22d4c291ae312d2299187f72b (diff) |
Merge "FQDN validation"
Diffstat (limited to 'validation-scripts')
-rw-r--r-- | validation-scripts/all-nodes.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/validation-scripts/all-nodes.sh b/validation-scripts/all-nodes.sh index 0b8b3523..f1f4cc11 100644 --- a/validation-scripts/all-nodes.sh +++ b/validation-scripts/all-nodes.sh @@ -67,5 +67,23 @@ 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 +if [[ $validate_fqdn == "True" ]];then + fqdn_check +fi |