apt/unattended-upgrades stalls shutdown
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
unattended-upgrades (Ubuntu) |
Confirmed
|
High
|
Unassigned |
Bug Description
When unattended-upgrades is installed, 9 out of 10 shutdowns/reboots hang while "starting unattended upgrades shutdown". This hang stalls the shutdown process for 5-10 mins.
If I disable unnattended-
If I terminate the service before shutdown/reboot (sudo service unattended-upgrades stop) the problem still occurs.
If I remove the package (sudo apt remove unattended-
This occurs on a freshly installed version of Ubuntu Server 16.04.1 (both unattended-upgrades installed via install GUI or manual install of unattended-
Both Kern.log & syslog do not show the shutdown process (I believe because the filesystems have already unmounted)
Original report: http://
Changed in unattended-upgrades (Ubuntu): | |
importance: | Undecided → High |
status: | Confirmed → Triaged |
Solution:
- fix /usr/share/ unattended- upgrades/ unattended- upgrades- shutdown to expect "false" instead of "False"
patching /usr/share/ unattended- upgrades/ unattended- upgrade- shutdown:
--- /tmp/unattended -upgrade- shutdown 2017-02-03 14:53:03.238103238 +0100 -upgrade- shutdown_ fix 2017-02-03 14:53:17.685589001 +0100 pkg.init_ config( ) config. find_b( "Unattended- Upgrade: :InstallOnShutd own", False): config. find_b( "Unattended- Upgrade: :InstallOnShutd own", false): os.environ)
env[" UNATTENDED_ UPGRADES_ FORCE_INSTALL_ ON_SHUTDOWN" ] = "1"
logging. debug(" starting unattended-upgrades in shutdown mode")
+++ /tmp/unattended
@@ -117,7 +117,7 @@
# run it
p = None
apt_
- if apt_pkg.
+ if apt_pkg.
env = copy.copy(
The above solves the issue for me.