0

I have a very weird issue on Debian Buster. I've enabled unattended-upgrades on the server as this is a very bare bones server and it should just update automatically. However, it seems that the apt timers for this never start.

When I check all timers, I get the following:

# systemctl list-timers
NEXT                         LEFT          LAST                         PASSED               UNIT                         ACTIVATES
Fri 2021-01-15 20:00:00 UTC  58min left    Fri 2021-01-15 19:00:00 UTC  1min 13s ago         logrotate.timer              logrotate.service
Sat 2021-01-16 00:00:00 UTC  4h 58min left Fri 2021-01-15 00:00:00 UTC  19h ago              man-db.timer                 man-db.service
Sat 2021-01-16 18:03:26 UTC  23h left      Fri 2021-01-15 18:03:26 UTC  57min ago            systemd-tmpfiles-clean.timer systemd-tmpfiles-clean.service
n/a                          n/a           Thu 2020-11-26 06:15:45 UTC  1 months 20 days ago apt-daily-upgrade.timer      apt-daily-upgrade.service
n/a                          n/a           Wed 2020-11-25 20:32:27 UTC  1 months 20 days ago apt-daily.timer              apt-daily.service

When I check the definition of the timer, it seems fine:

# systemctl cat apt-daily.timer
# /lib/systemd/system/apt-daily.timer
[Unit]
Description=Daily apt download activities

[Timer]
OnCalendar=*-*-* 6,18:00
RandomizedDelaySec=12h
Persistent=true

[Install]
WantedBy=timers.target

And analyze seems to agree that the syntax is fine:

# systemd-analyze calendar "*-*-* 6,18:00"
  Original form: *-*-* 6,18:00
Normalized form: *-*-* 06,18:00:00
    Next elapse: Sat 2021-01-16 06:00:00 UTC
       From now: 10h left

But they do not fire. I tried running systemctl start apt-daily.timer, systemctl enable --now apt-daily.timer and systemctl restart timers.target, no effect. The command returns without an error, but nothing changes.

I'm at a loss on how to debug this further, any hints would be much appreciated.

EDIT As requested, the content of the apt-daily.service unit:

# /lib/systemd/system/apt-daily.service
[Unit]
Description=Daily apt download activities
Documentation=man:apt(8)
ConditionACPower=true
After=network.target network-online.target systemd-networkd.service NetworkManager.service connman.service

[Service]
Type=oneshot
ExecStartPre=-/usr/lib/apt/apt-helper wait-online
ExecStart=/usr/lib/apt/apt.systemd.daily update

EDIT The service itself is not disabled, either, but it's dead:

# systemctl status apt-daily.service
● apt-daily.service - Daily apt download activities
   Loaded: loaded (/lib/systemd/system/apt-daily.service; static; vendor preset: enabled)
   Active: inactive (dead)
     Docs: man:apt(8)
Tim Stoop
  • 588
  • 5
  • 20

1 Answers1

0

So the solution ended up being exactly the thing I was trying to solve with this... I had to upgrade systemd to the latest version. I guess I ran into a bug that was solved in a later version.

Tim Stoop
  • 588
  • 5
  • 20