Correct time on jump host prior to launching VMs 79/20479/2
authorrandyl <r.levensalor@cablelabs.com>
Tue, 6 Sep 2016 15:43:26 +0000 (09:43 -0600)
committerrandyl <r.levensalor@cablelabs.com>
Mon, 12 Sep 2016 23:37:10 +0000 (17:37 -0600)
Since the VMs use ntpdate to set the correct time, the host should
also have the correct time.

JIRA: APEX-246

Change-Id: I55ba59398f56ad25df283336c8ed75e6a3652fe4
Signed-off-by: Randy Levensalor <r.levensalor@cablelabs.com>
ci/deploy.sh

index 0044197..0a2eec2 100755 (executable)
@@ -224,6 +224,13 @@ main() {
     echo -e "${red}Dependency Validation Failed, Exiting.${reset}"
     exit 1
   fi
+  #Correct the time on the server prior to launching any VMs
+  ntpdate $ntp_server
+  if [ $? == 0 ]; then
+    hwclock --systohc
+    else
+        echo -e "${red} ERROR: ntpdate failed to update the time on the server. ${reset}"
+  fi
   setup_undercloud_vm
   if [ "$virtual" == "TRUE" ]; then
     setup_virtual_baremetal $VM_CPUS $VM_RAM