You are not logged in.

#1 2016-03-04 09:36:13

warped
Member
Registered: 2009-08-19
Posts: 41

going from 208->229: can't get realtime timers working...

Hi,
I spending on it over week with no success.
I had it working in 208 but after upgrade to 229 it is not working - no matter what.
Monotonic timers are working OK.
Only realtime are not working. All of realtime timers.

Running „systemctl list-timers” for not working calendar timer shows:

NEXT                          LEFT                LAST                         PASSED        UNIT                                ACTIVATES
…..
Wed 2016-03-05 02:25:00 CET   5h 15min left       n/a                          n/a           mythtv-epg-grab-and-load.timer      mythtv-epg-grab-and-load.service
…..

NEXT and LEFT times are shown correctly - so it looks systemd correctly reads .timer unit.
All timers are symlinked in /etc/systemd/system/timers.target.wants
But corresponding service is never started.


mythtv-epg-grab-and-load.timer unit is following:

[Unit]
Description=Timer for periodic EPG grabing and loading to DB

[Timer]
OnCalendar=Mon,Wed,Fri *-*-* 02:25:00
AccuracySec=1us
Unit=mythtv-epg-grab-and-load.service

[Install]
WantedBy=timers.target


mythtv-epg-grab-and-load.service

[Unit]
Description=@Periodic EPG grabing and loading to DB
After=mysqld.service mythbackend.service

[Service]
User=mythtv
Group=mythtv
Type=oneshot
Nice=19
IOSchedulingClass=2
IOSchedulingPriority=7
ExecStart=/usr/bin/wg++/grab-and-load-epg.sh

[Install]
WantedBy=default.target

Accordingly to systemd documentation only difference between monotonic & realtime times is default dependency on timer-sync.target
Man says:

„Timer units with at least one OnCalendar= directive will have an additional After= dependency on timer-sync.target”

Looking on systemctl show mythtv-db-maintenance.timer I see:

............
Names=mythtv-epg-grab-and-load.timer
Requires=sysinit.target
WantedBy=timers.target
Conflicts=shutdown.target
Before=shutdown.target timers.target mythtv_grab_epg.service
After=sysinit.target time-sync.target
Triggers=mythtv_grab_epg.service
Description=Timer for periodic EPG grabing and loading to DB
LoadState=loaded
ActiveState=active
SubState=waiting
............

In show output I didn’t see (mentioned in systemd man) „timer-sync.target”.
But I see „time-sync.target”.
So which one is correct?

I tried to add „DefaultDependencies=no” in timer unit.
Show command stopped showing dependency „After=time-sync.target”.
list-timers shows OK but .service is never launched.

May somebody tell me what should I do to get it working?
Should I add time-sync.target or time-sync.target.wants dir or timer-sync.target or timer-sync.target.wants dir?




BTW: playing with all this timer stuff is nightmare as timer unit is not accepting OnCalendar dates earlier than 24h.

If I put (at 2016-03-04 10:05 local lime) an entry „OnCalendar=2016-03-04 10:10:00”, list-timers shows:

NEXT                          LEFT                LAST                         PASSED     UNIT                                ACTIVATES
n/a                           n/a                 n/a                          n/a        mythtv-db-maintenance.timer         mythtv-db-maintenance.service

If I put at 2016-03-04 10:05 local time an entry „OnCalendar=*-*-* 10:10:00”, list-timers shows:

„Sat 2016-03-05 10:10:00 CET   24h left            n/a                          n/a”

So any test requires me to wait over 24h to see is it working or not.
There is no way to ask timer to run within next 5min.
It can be only 24h + 5min
This is crazy!

v208 was working perfectly. After upgrade to 229 I can’t get it working.
I’m starting to really regret my decision about update systemd.

Last edited by warped (2016-03-04 09:38:24)

Offline

#2 2016-03-04 18:37:59

ajbibb
Member
Registered: 2012-02-12
Posts: 142

Re: going from 208->229: can't get realtime timers working...

The 24 hour part is known:

https://bbs.archlinux.org/viewtopic.php?id=209572

Think I'd wait until 230 comes out to work on it.

Offline

#3 2016-03-04 23:00:05

warped
Member
Registered: 2009-08-19
Posts: 41

Re: going from 208->229: can't get realtime timers working...

@ajbibb

Thx!
At least "24h problem" aspect is clear fro me.
Good that this issue is known.
Anyway, move from 208->229 is still far from perfect for me.

Offline

#4 2016-03-05 13:56:52

warped
Member
Registered: 2009-08-19
Posts: 41

Re: going from 208->229: can't get realtime timers working...

Offline

Board footer

Powered by FluxBB