Skip to content

Commit bc14b2a

Browse files
opcoder0AharonMalkin
authored andcommitted
Fix for NTPSec failing to synchronize (sonic-net#19444)
Description of PR The PR contains fix for failed NTP testcases on Bookworm based PTF image. The NTPSec daemon on Bookworm has "tos minclock 4 minsane 3" configuration line which requires at least 4 clocks to be available before ntpstat reports synchronized status. Since we use local clock, the line is commented. Applicable only to docker-ptf images that are based on Bookworm. Summary: Fixes # (issue) Type of change Bug fix Testbed and Framework(new/improvement) New Test case Skipped for non-supported platforms Test case improvement Approach What is the motivation for this PR? Fix NTP test failures. How did you do it? See description How did you verify/test it? Manually in VS test testbed. Any platform specific information? No signed-off-by: [email protected] Signed-off-by: Aharon Malkin <[email protected]>
1 parent 59a546e commit bc14b2a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/common/helpers/ntp_helper.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ def setup_ntp_context(ptfhost, duthost, ptf_use_ipv6):
4040
ptfhost.lineinfile(
4141
path=ntp_conf_path, line="#pool 3.debian.pool.ntp.org iburst", regexp="^pool.*3.debian.*pool.*ntp.*org.*")
4242

43+
# Comment out the tos minclock minsane option line
44+
# Having this option enabled can cause the NTP server to not synchronize
45+
# with the PTF host, which can lead to test failures.
46+
ptfhost.lineinfile(
47+
path=ntp_conf_path, line="#tos minclock 4 minsane 3", regexp="^tos.*minclock.*minsane.*")
48+
4349
ptfhost.lineinfile(path=ntp_conf_path, line="server 127.127.1.0 prefer")
4450

4551
# restart ntp server

0 commit comments

Comments
 (0)