Skip to content

Commit ab850d4

Browse files
committed
sources: warn about sources exceeding maxdistance or maxjitter
Log a warning message if a source is rejected in the source selecting due to exceeding the maxdistance or maxjitter limit to make it more obvious when synchronization is failing for this reason. Delay the message until the reachability register is full (8 updates), or a replacement of the source is attempted.
1 parent 7447683 commit ab850d4

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

sources.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -768,6 +768,20 @@ mark_source(SRC_Instance inst, SRC_Status status)
768768

769769
if (!inst->reported_status[status]) {
770770
switch (status) {
771+
case SRC_BAD_DISTANCE:
772+
if (inst->reachability_size < SOURCE_REACH_BITS && inst->bad < BAD_HANDLE_THRESHOLD)
773+
break;
774+
log_selection_source(LOGS_WARN, inst,
775+
"Root distance of ## exceeds maxdistance of %.3f seconds",
776+
max_distance);
777+
break;
778+
case SRC_JITTERY:
779+
if (inst->reachability_size < SOURCE_REACH_BITS && inst->bad < BAD_HANDLE_THRESHOLD)
780+
break;
781+
log_selection_source(LOGS_WARN, inst,
782+
"Jitter of ## exceeds maxjitter of %.3f seconds",
783+
max_jitter);
784+
break;
771785
case SRC_FALSETICKER:
772786
log_selection_source(LOGS_WARN, inst, "Detected falseticker ##");
773787
break;

0 commit comments

Comments
 (0)