Re: Oneshot killed by timeout

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 28 Jan 2025 at 16:05, Mantas Mikulėnas <grawity@xxxxxxxxx> wrote:
On Tue, Jan 28, 2025 at 4:42 PM Henti Smith <henti@xxxxxxxxxxxxxxxxx> wrote:
Good day all.

I'm having some timeouts on a oneshot service and I cannot explain the failure based on the documentation.

We have a service that runs a script that checks for a valid upstream NTP server before dependent services can start to

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.

Good morning Mantas,

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.

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
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.

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 ?

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.

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.

I'll do this on our test system as this does not happen very often.

Kind regards
Henti

[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux