[Bug 1886161] Re: Unattended upgrades should work on roaming laptops
Julian Andres Klode
1886161 at bugs.launchpad.net
Tue May 25 14:14:40 UTC 2021
@Robin You should be able to just run `systemctl start apt-daily.service
apt-daily-upgrade.service` from the hook. This will start those two
services - which run update / upgrade - in the same transaction, and
hence ordering will work correctly.
The timer will still run again, so it's not _optimal_, but oh well. An
optimal solution would just make the timer "catch up" when the
conditions apply. We'll be able to simulate that I guess by moving away
from ConditionACPower=true to checking battery state ourself, then
exiting with a special error code and retrying on that.
systemd at least was fixed to allow retrying oneshot units a while ago,
but we've not had the chance to rework the apt integration to do
retries.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to apt in Ubuntu.
https://bugs.launchpad.net/bugs/1886161
Title:
Unattended upgrades should work on roaming laptops
Status in apt package in Ubuntu:
New
Status in gnome-settings-daemon package in Ubuntu:
Invalid
Bug description:
For many if not most laptop computers, Unattended Upgrades seems all
but useless by design.
For upgrades to happen, with default config, 3 conditions must be met:
- an internet connection must be up and running when the timer or cron or anacron tries the unattended upgrade
- the connection must not be metered, whatever that means (Skip-Updates-On-Metered-Connections "true")
- the computer must be plugged in (OnlyOnACPower "true")
These are insurmountable problems for many laptops on the go.
Inevitably, security upgrades will almost never run unattended on such
computers. I discovered with shock that Unattended Upgrades had almost
never run on my laptop. I tried all possible config tweaks. Nothing
worked reliably and in the end I gave up and wrote a upgrade script
which uses Network Manager's connection-up hook. Unattended Upgrades
needs to do something like this out of the box. Users should not need
to write scripts to ensure security upgrades.
Unattended upgrades is an excellent project for servers. But it really
needs to work, out of the box, on laptops too.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1886161/+subscriptions
More information about the foundations-bugs
mailing list