In #10 the log shows that unattended-upgrades is asked to stop after 30
seconds and this is expected with the default configuration, when the
configuration is changed only to enable InstallOnShutdown.

Please note that the behaviour of unattended-upgrades changed as
described in the NEWS file.

$ zless /usr/share/doc/unattended-upgrades/NEWS.Debian.gz

unattended-upgrades (1.1ubuntu1.18.04.7~16.04.0) xenial; urgency=medium

  When InstallOnShutdown was configured unattended-upgrades in
  versions before 1.1ubuntu1.18.04.7~16.04.0 installed updates _after_ the
  shutdown transaction is started by systemd making maintainer scripts
  restarting services fail or wait in a deadlock until being killed by
  shutdown's timeout leaving a broken installation behind.

  Starting with version 1.1ubuntu1.18.04.7~16.04.0 configuring
  InstallOnShutdown makes unattended-upgrades start package installations
  _before_ the shutdown transaction is started, when PrepareForShutdown()
  signal is received via DBus.

  Unattended-upgrades 1.1ubuntu1.18.04.7~16.04.0 also increases logind's
  InhibitDelayMaxSec to 30 seconds. This allows more time for
  unattended-upgrades to shut down gracefully or even install a few
  packages in InstallOnShutdown mode, but is still a big step back from
  the 30 minutes allowed for InstallOnShutdown previously.

  Users enabling InstallOnShutdown mode are advised to increase
  InhibitDelayMaxSec even further, possibly to 30 minutes.

In newer versions the configuration file also points this out, but the 
configuration file comment change was not SRU-d to avoid conflicts with locally 
changed configuration files:
...
// Install all updates when the machine is shutting down
// instead of doing it in the background while the machine is running.
// This will (obviously) make shutdown slower.
// Unattended-upgrades increases logind's InhibitDelayMaxSec to 30s.
// This allows more time for unattended-upgrades to shut down gracefully
// or even install a few packages in InstallOnShutdown mode, but is still a
// big step back from the 30 minutes allowed for InstallOnShutdown previously.
// Users enabling InstallOnShutdown mode are advised to increase
// InhibitDelayMaxSec even further,q possibly to 30 minutes.
//Unattended-Upgrade::InstallOnShutdown "false
...

The problem on the system is that even preprocessing the available
updates takes longer than 30 seconds, thus none of the updates can be
applied. Speeding up the preprocessing part is ongoing, but it will
still be recommended to bump logind's timeout.

** Changed in: unattended-upgrades (Ubuntu)
       Status: Confirmed => Invalid

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1843099

Title:
  Unattended upgrades does not work on shutdown

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/unattended-upgrades/+bug/1843099/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to