Skip to content

Commit

Permalink
[ntp] disable ntp long jump (#4748)
Browse files Browse the repository at this point in the history
Found another syncd timing issue related to clock going backwards.
To be safe disable the ntp long jump.

Signed-off-by: Ying Xie <[email protected]>
  • Loading branch information
yxieca authored Jun 11, 2020
1 parent ddd60bf commit ae7bf3d
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions files/image_config/ntp/ntp-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,7 @@ function modify_ntp_default
sonic-cfggen -d -t /usr/share/sonic/templates/ntp.conf.j2 >/etc/ntp.conf

get_database_reboot_type
if [[ x"${reboot_type}" == x"cold" ]]; then
echo "Enabling NTP long jump for reboot type ${reboot_type} ..."
modify_ntp_default "s/NTPD_OPTS='-x'/NTPD_OPTS='-g'/"
else
echo "Disabling NTP long jump for reboot type ${reboot_type} ..."
modify_ntp_default "s/NTPD_OPTS='-g'/NTPD_OPTS='-x'/"
fi
echo "Disabling NTP long jump for reboot type ${reboot_type} ..."
modify_ntp_default "s/NTPD_OPTS='-g'/NTPD_OPTS='-x'/"

systemctl restart ntp

0 comments on commit ae7bf3d

Please sign in to comment.