mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-05 16:05:06 -05:00
ntp: avoid unneccessary replacements on refresh command
When the refresh command is issued, instead of trying to replace all NTP sources as if they were unreachable or falsetickers, keep using the current address if it is still returned by the resolver for the name. This avoids unnecessary loss of measurements and switching to potentially unreachable addresses.
This commit is contained in:
31
test/simulation/147-refresh
Executable file
31
test/simulation/147-refresh
Executable file
@@ -0,0 +1,31 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
. ./test.common
|
||||
|
||||
test_start "address refreshment"
|
||||
|
||||
limit=1000
|
||||
servers=5
|
||||
client_conf="logdir tmp
|
||||
log measurements"
|
||||
client_server_conf="server nodes-1-2.net1.clk maxpoll 6
|
||||
pool nodes-3-4-5.net1.clk maxpoll 6 maxsources 2"
|
||||
client_chronyd_options="-d"
|
||||
chronyc_conf="refresh"
|
||||
chronyc_start=500
|
||||
|
||||
run_test || test_fail
|
||||
check_chronyd_exit || test_fail
|
||||
check_source_selection || test_fail
|
||||
check_packet_interval || test_fail
|
||||
check_sync || test_fail
|
||||
|
||||
check_file_messages "20.*192.168.123.1" 0 0 measurements.log || test_fail
|
||||
check_file_messages "20.*192.168.123.2" 15 17 measurements.log || test_fail
|
||||
check_file_messages "20.*192.168.123.[345]" 31 33 measurements.log || test_fail
|
||||
rm -f tmp/measurements.log
|
||||
if check_config_h 'FEAT_DEBUG 1'; then
|
||||
check_log_messages "resolved_name.*still fresh" 3 3 || test_fail
|
||||
fi
|
||||
|
||||
test_pass
|
||||
Reference in New Issue
Block a user