[ntp] disable ntp long jump (#4748)
Found another syncd timing issue related to clock going backwards. To be safe disable the ntp long jump. Signed-off-by: Ying Xie <ying.xie@microsoft.com>
This commit is contained in:
parent
d10b597f50
commit
aecebac86b
@ -26,12 +26,7 @@ function modify_ntp_default
|
|||||||
sonic-cfggen -d -t /usr/share/sonic/templates/ntp.conf.j2 >/etc/ntp.conf
|
sonic-cfggen -d -t /usr/share/sonic/templates/ntp.conf.j2 >/etc/ntp.conf
|
||||||
|
|
||||||
get_database_reboot_type
|
get_database_reboot_type
|
||||||
if [[ x"${reboot_type}" == x"cold" ]]; then
|
echo "Disabling NTP long jump for reboot type ${reboot_type} ..."
|
||||||
echo "Enabling NTP long jump for reboot type ${reboot_type} ..."
|
modify_ntp_default "s/NTPD_OPTS='-g'/NTPD_OPTS='-x'/"
|
||||||
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
|
|
||||||
|
|
||||||
systemctl restart ntp
|
systemctl restart ntp
|
||||||
|
Reference in New Issue
Block a user