<div dir="ltr"><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Tue, 28 Jan 2025 at 16:05, Mantas Mikulėnas <<a href="mailto:grawity@gmail.com">grawity@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jan 28, 2025 at 4:42 PM Henti Smith <<a href="mailto:henti@gaydonsmith.co.uk" target="_blank">henti@gaydonsmith.co.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Good day all. <br></div><div><br></div><div>I'm having some timeouts on a oneshot service and I cannot explain the failure based on the documentation. <br></div><div><br></div><div>We have a service that runs a script that checks for a valid upstream NTP server before dependent services can start to</div></div></blockquote><div><br></div><div>Systemd itself has a "systemd-time-wait-sync.service" for that purpose. It waits for the NTP daemon to set the 'Clock in sync' kernel flag via adjtimex (or, really, *unset* the 'Clock out of sync' flag) so it should be compatible with both ntpd and chrony (with rtcsync on) – and with systemd-timesyncd of course.<br></div></div></div></blockquote><div><br></div><div><div dir="ltr"><div>Good morning Mantas, <br></div><div><br></div><div>Thank you so much for your reply. This is very encouraging as this would replace two mechanisms we're maintaining ourselves, which we really should not. <br></div></div><div><br></div>Can we set a minimum required stratum systemd-timesyncd. We're using Cradlepoint hardware for timesyncm and unfortunately they serves a totally bogus NTP time while it is booting, and although it doesn't set the stratum to "unsynchronised" (=16) like it<br>should while serving a heinous time, it does at least set a higher stratum than when it's serving the correct time, which we're currently checking in our own scripts. <br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>I'm not sure how the process got killed if it's oneshot and timeout is disabled, but the error seems to indicate it was a timeout TERM ? <br></div></div></blockquote><div><br></div><div>Run a `systemctl show` on the unit and check what settings are in effect – it might be that a default timeout is set globally in systemd/system.conf or something like that.</div><div><br></div><div>I'd also try booting with "systemd.log_level=debug" in the kernel command line, in case it adds anything more useful to the journal whenever this happens.<br></div></div></div></blockquote><div><br></div><div>I'll do this on our test system as this does not happen very often. <br></div></div><div class="gmail_quote gmail_quote_container"><br></div><div class="gmail_quote gmail_quote_container">Kind regards</div><div class="gmail_quote gmail_quote_container">Henti <br></div></div>