Re: [chrony-users] Problem when removing all sources |
[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-users Archives ]
On 2023-11-21 12:51, Miroslav Lichvar wrote:
On Mon, Nov 20, 2023 at 04:17:47PM +0100, Miroslav Lichvar wrote:On Mon, Nov 20, 2023 at 11:14:00AM +0100, Thomas Lange wrote:<chronyc reload sources> 2023-11-19T17:43:20Z Removed source 103.242.68.69 2023-11-19T17:43:20Z Removed source 162.159.200.123 2023-11-19T17:43:20Z Removed source 194.58.202.148 2023-11-19T17:43:20Z Selected source 194.58.206.20 2023-11-19T17:43:20Z Removed source 194.58.206.20 2023-11-19T17:43:20Z Removed source 217.75.106.216 2023-11-19T17:43:20Z Removed source 91.209.0.17 <Missing "Can't synchronise: no selectable sources" >It depends on the order of removed sources and the reselection that can happen. The message is logged only when a source is already selected and newly executed source selection doesn't find a selectable source. In your example the last selected source is 194.58.206.20. It is removed, i.e. nothing is selected, and with the two remaining sources there is no successful selection.The issue actually was in the removal of the source. If it was reselected due to becoming offline, the log message was logged. If it was kept selected even as offline (due to other sources not being better), it would not be logged. The latest development code now has a fix to make it consistent.
Thanks, I like consistency. I reran my tests using 4.5-pre1 and my test case seems to work now. However, I found another test case that doesn't. It's the same setup as in my original post but instead of removing all sources and leaving chrony without any sources at all, I add an unreachable server. This results in: I don't get the "Can't synchronise: no selectable sources" log message. 'chronyc tracking' still reports the now removed server. Perhaps this is expected. Logs below. /Thomas # chronyd -d 2023-11-23T08:45:54Z chronyd version 4.5-pre1 starting (+CMDMON +NTP +REFCLOCK -RTC +PRIVDROP -SCFILTER -SIGND -ASYNCDNS -NTS -SECHASH -IPV6 +DEBUG) 2023-11-23T08:45:54Z Running with root privileges 2023-11-23T08:45:54Z Frequency 0.814 +/- 4.379 ppm read from /var/lib/chrony/drift 2023-11-23T08:45:54Z Added source 103.242.68.69 2023-11-23T08:45:54Z Added source 162.159.200.123 2023-11-23T08:45:54Z Added source 194.58.202.148 2023-11-23T08:45:54Z Added source 194.58.206.20 2023-11-23T08:45:54Z Added source 217.75.106.216 2023-11-23T08:45:54Z Added source 91.209.0.17 2023-11-23T08:46:00Z Selected source 91.209.0.17 2023-11-23T08:46:01Z Selected source 194.58.206.20 2023-11-23T08:46:27Z Removed source 103.242.68.69 2023-11-23T08:46:27Z Removed source 162.159.200.123 2023-11-23T08:46:27Z Removed source 194.58.202.148 2023-11-23T08:46:27Z Removed source 194.58.206.20 2023-11-23T08:46:27Z Removed source 217.75.106.216 2023-11-23T08:46:27Z Removed source 91.209.0.17 2023-11-23T08:46:27Z Added source 172.16.1.99 ----- # rm chrony.sources # cp /tmp/new.sources . # cat new.sources server 172.16.1.99 burst iburst xleave # chronyc reload sources 200 OK # chronyc tracking Reference ID : C23ACE14 (194.58.206.20) Stratum : 2 Ref time (UTC) : Thu Nov 23 08:45:59 2023 System time : 0.000013376 seconds slow of NTP time Last offset : +0.003778137 seconds RMS offset : 0.003778137 seconds Frequency : 0.814 ppm fast Residual freq : +107.309 ppm Skew : 4.379 ppm Root delay : 0.032012437 seconds Root dispersion : 0.006136328 seconds Update interval : 0.8 seconds Leap status : Normal # chronyc sources MS Name/IP address Stratum Poll Reach LastRx Last sample =============================================================================== ^? 172.16.1.99 0 7 0 - +0ns[ +0ns] +/- 0ns --To unsubscribe email chrony-users-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject. For help email chrony-users-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble? Email listmaster@xxxxxxxxxxxxxxxxxxxx.
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |