Teemu Likonen [2017-06-22 09:12:03+03] wrote:
> Systemd service apt-daily-upgrade.service can't do its job because it
> tries to run on boot before network connection. The associated timer is
> scheduled to run on
>
> [Timer]
> OnCalendar=*-*-* 6:00
> RandomizedDelaySec=60m
> Persistent=true
>
> and because my computer is usually off at that moment the
> Persistent=true rule makes the timer run the service immediately at
> boot. That fails because network is not configured yet.
Systemd's dependencies seem to be correct:
$ systemd-analyze critical-chain apt-daily-upgrade.service
The time after the unit is active or started is printed after the
"@" character. The time the unit takes to start is printed after the
"+" character.
apt-daily-upgrade.service +6.696s
└─apt-daily-upgrade.timer @7.496s
└─apt-daily.timer @7.496s
└─network-online.target @7.496s
└─NetworkManager-wait-online.service @1.695s +5.800s
└─NetworkManager.service @1.657s +37ms
└─dbus.service @1.633s
└─basic.target @1.620s
[...]
So apt-daily-upgrade.service is started immediately after
network-online.target (@7.496s) but network is not really ready yet.
Should we blame NetworkManager-wait-online.service?
Attachment:
signature.asc
Description: PGP signature