Re: [chrony-users] Systemd timers and chrony

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-users Archives ]


On Wed, Mar 23, 2022 at 2:28 PM Krix Rosinski <krzysiek@xxxxxxxxxxxx> wrote:
>
> Hello all, thank you for the speedy reply!
>
> @Laura, yes we disable systemd-timesyncd completely and enable chrony instead.
>
> @Kevin, I may ask a separate question there, I thought this will be a common issue for chrony users though.
>
> @Miroslav, timer below, we don't have an RTC, we haven't enabled chrony-wait service yet but we will check if it helps here.
>
> [Unit]
> Description=Daily Timer One Per Day
>
> [Timer]
> OnCalendar=*-*-* 02:10:00
>

Reading systemd.timer man page:

Timer units with at least one OnCalendar= directive acquire a pair of
additional After= [Default] dependencies on time-set.target and
time-sync.target, in order to avoid being started before the system
clock has been correctly set.

And systemd-timesyncd.target will pull in time-set.target:

Wants=time-set.target
Before=time-set.target

chrony-wait.service is also ordered before time-sync.target, so using
it should be equivalent to systemd-timesyncd.service.

> [Install]
> WantedBy=timers.target
>
>
> On Wed, 23 Mar 2022 at 12:18, Miroslav Lichvar <mlichvar@xxxxxxxxxx> wrote:
>>
>> On Wed, Mar 23, 2022 at 12:09:32PM +0100, Krix Rosinski wrote:
>> > Hello,
>> >
>> > We are trying to set up chrony instead of systemd-timesyncd service,
>> > everything works perfectly except for the systemd timers which fires
>> > straight away when chrony updates time. It seems that systemd-timesyncd
>> > does somethings to temporarily stop timers for time update, and this
>> > doesn't work out of the box with chrony.
>>
>> Can you post an example of the timer which triggers?
>>
>> Does the machine have an RTC?
>>
>> Does it happen when you enable the chrony-wait service?
>>
>> --
>> Miroslav Lichvar
>>
>>
>> --
>> 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.
>>

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