unattended-upgrade hangs on shutdown when network is required for updates
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apt (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
unattended-upgrades (Ubuntu) |
Fix Released
|
High
|
Unassigned |
Bug Description
Recently an update for flashplugin-
During the installation of this package a blob is downloaded from Adobe servers, which requires network connectivity/
Because the network interface(s) have already stopped when this package is installed, the server cannot be reached, thus blocking the shutdown process until a timeout kills the unattended-upgrades process.
On my machines the shutdown takes about 30 minutes in this case. The systemd configuration is standard here, except for a few additional services.
A possible fix could be adding After=network-
As a workaround I pinned the flashplugin-
#echo >/etc/apt/
Package: flashplugin-
Pin: release *
Pin-Priority: -1";
Changed in apt (Ubuntu): | |
status: | Triaged → In Progress |
There are two modes of running u-u chosen by setting Unattended- Upgrade: :InstallOnShutd own to "false" (default) or "true".
When InstallOnShutdown is "false" apt's apt-daily- upgrade. service runs u-u thus this service needs to ensure that network is still up, to not break similar packages.
Note that while vast majority of packages do not need network connection during installation a small fraction of them do perform downloads thus apt's service should try to keep the network up.
When InstallOnShutdown is "true" unattended- upgrades. service is responsible for keeping the network connection up and I believe versions starting with 0.93.1+nmu1 are fixed.