Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

Commit

Permalink
chore: validate using ntpstat
Browse files Browse the repository at this point in the history
  • Loading branch information
jackfrancis committed Mar 18, 2020
1 parent 40adb28 commit d6c724e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion parts/k8s/cloud-init/artifacts/cse_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ installDeps() {
if [[ $UBUNTU_RELEASE == "18.04" ]]; then
systemctl_stop 20 5 10 systemd-timesyncd || exit $ERR_SYSTEMCTL_STOP_FAIL
retrycmd_if_failure 120 5 25 systemctl disable systemd-timesyncd || exit $ERR_SYSTEMCTL_STOP_FAIL
packages+=" ntp"
packages+=" ntp ntpstat"
fi
elif [[ $OS == $DEBIAN_OS_NAME ]]; then
packages+=" gpg cgroup-bin"
Expand Down
2 changes: 1 addition & 1 deletion pkg/engine/templates_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/e2e/kubernetes/scripts/time-sync-validate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ if [[ $OS == $UBUNTU_OS_NAME ]]; then
sudo timedatectl status | grep 'Network time on: yes' || exit 1
sudo timedatectl status | grep 'NTP synchronized: yes' || exit 1
elif [[ $RELEASE == "18.04" ]]; then
sudo timedatectl status | grep 'systemd-timesyncd.service active: yes' || exit 1
sudo ntpstat | grep 'synchronised to NTP server' || exit 1
sudo timedatectl status | grep 'System clock synchronized: yes' || exit 1
fi
fi
Expand Down
1 change: 1 addition & 0 deletions vhd/packer/install-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ cat << EOF >> ${VHD_LOGS_FILEPATH}
EOF
if [[ ${UBUNTU_RELEASE} == "18.04" ]]; then
echo " - ntp" >> ${VHD_LOGS_FILEPATH}
echo " - ntpstat" >> ${VHD_LOGS_FILEPATH}
fi

if [[ ${UBUNTU_RELEASE} == "18.04" ]]; then
Expand Down

0 comments on commit d6c724e

Please sign in to comment.