aboutsummaryrefslogtreecommitdiffstats
path: root/validation-scripts
diff options
context:
space:
mode:
authorMatthew Flusche <mflusche@redhat.com>2017-02-14 17:00:02 +0000
committerJason E. Rist <jrist@redhat.com>2017-04-03 10:16:25 -0600
commitcb567deb42506eb97e91a50b2c7d053761b2cbe6 (patch)
tree2d9cea2df99926769e8c650162697eea129f75c6 /validation-scripts
parentd7055059a8da022b6651227c15bca4f2667e9bf4 (diff)
FQDN validation
Adds optional validation to ensure FQDN set by Nova matches /etc/hosts as created by overcloud heat configuration. Consistent FQDN requires the nova parameter [Default]/dhcp_domain to match the CloudDomain tht parameter. This validation is disabled by default. Change-Id: Ib5689acae66baf63ecccbc3b1c0b96684781b863 (cherry picked from commit bae2d113938b9bb22d4c291ae312d2299187f72b) Partial-Bug: #1581472
Diffstat (limited to 'validation-scripts')
-rw-r--r--validation-scripts/all-nodes.sh18
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