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.
31 lines
837 B
Bash
Executable file
31 lines
837 B
Bash
Executable file
#!/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
|