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
Touch seeded packages, which is subscribed to unattended-upgrades in
Ubuntu.
https://bugs.launchpad.net/bugs/1843099

Title:
  Unattended upgrades does not work on shutdown

Status in unattended-upgrades package in Ubuntu:
  Invalid

Bug description:
  1) The release of Ubuntu you are using, via 'lsb_release -rd' or System -> 
About Ubuntu
   * Ubuntu Xenial 16.04.6 LTS
  2) The version of the package you are using, via 'apt-cache policy pkgname' 
or by checking in Software Center
   * 1.1ubuntu1.18.04.7~16.04.3
  3) What you expected to happen
   * Packages to be upgraded on reboot / shutdown.
  4) What happened instead
   * The host just rebooted.  Didn't perform upgrades.  No useful output either 
until I enabled debug logging in the systemd unit file.

  I'm reporting a new bug but this is very similar to #1806487 and I'm
  actually wondering if it resurfaced somehow.

  We're running Ubuntu Xenial 16.04.6 which has
  1.1ubuntu1.18.04.7~16.04.3 installed.

  I see that #1806487 was resolved with 1.1ubuntu1.18.04.7~16.04.2.
  However I'm seeing similar behavior.

  So far I've modified systemd to see if anything stands out.  I do have
  an strace and then just debug mode.

  Unless needed, simply put, this is what a reboot with debug logging
  looks like (i.e. unattended-upgrades-shutdown.log):

  2019-09-06 09:20:04,871 DEBUG - Waiting for signal to start operation
  2019-09-06 09:20:43,996 WARNING - SIGTERM or SIGHUP received, stopping 
unattended-upgradesonly if it is running
  2019-09-06 09:20:43,996 DEBUG - Starting countdown of 25.0 minutes
  2019-09-06 09:20:43,997 DEBUG - get_lock returned 7
  2019-09-06 09:20:43,997 DEBUG - lock not taken

  I hope that helps, please let me know if you need anything else from
  me or if I can provide any more information.

  I've done this many times before, this is the first time it hasn't
  worked.  When I patched around the end of May, all went well.  My
  other variants worked, well mainly Trusty but that's EOL for public
  access.  Bionic doesn't seem to have anything it needs to update.

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

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to