[Bug 1618900] Re: [Xenial/0.90] Systemd dependencies issues when used in "Shutdown mode"
Brian Murray
brian at ubuntu.com
Tue Dec 20 18:54:36 UTC 2016
verification-done for yakkety:
2016-12-20 10:41:41,532 INFO Starting unattended upgrades script
2016-12-20 10:41:41,532 INFO Allowed origins are: ['o=Ubuntu,a=yakkety', 'o=Ubuntu,a=yakkety-security']
2016-12-20 10:43:35,014 INFO Packages that will be upgraded: apport apport-gtk apt apt-transport-https apt-utils bind9-host curl dbus dbus-user-session dbus-x11 dnsutils firefox firefox-locale-en ghostscript ghostscript-x gstreamer1.0-plugins-good gstreamer1.0-pulseaudio imagemagick imagemagick-6.q16 imagemagick-common libapt-inst2.0 libapt-pkg5.0 libbind9-140 libcurl3 libcurl3-gnutls libdbus-1-3 libdns-export162 libdns162 libgd3 libgs9 libgs9-common libgstreamer-plugins-good1.0-0 libisc-export160 libisc160 libisccc140 libisccfg140 liblwres141 libmagickcore-6.q16-2 libmagickcore-6.q16-2-extra libmagickwand-6.q16-2 liboxideqt-qmlplugin liboxideqtcore0 liboxideqtquick0 libsmbclient libwbclient0 linux-generic linux-headers-generic linux-image-generic linux-libc-dev oxideqt-codecs python3-apport python3-cryptography python3-problem-report samba-libs tar thunderbird thunderbird-gnome-support thunderbird-locale-en thunderbird-locale-en-us tzdata vim vim-common vim-runtime vim-tiny
2016-12-20 10:43:35,014 INFO Writing dpkg log to '/var/log/unattended-upgrades/unattended-upgrades-dpkg.log'
2016-12-20 10:45:35,240 INFO All upgrades installed
2016-12-20 10:47:15,408 INFO Initial blacklisted packages:
2016-12-20 10:47:15,409 INFO Initial whitelisted packages:
2016-12-20 10:47:15,409 INFO Starting unattended upgrades script
2016-12-20 10:47:15,409 INFO Allowed origins are: ['o=Ubuntu,a=yakkety', 'o=Ubuntu,a=yakkety-security', 'o=Ubuntu,a=yakkety-updates']
2016-12-20 10:48:57,310 INFO Packages that will be upgraded: cups-browsed cups-filters cups-filters-core-drivers deja-dup file-roller gnome-software gnome-software-common ifupdown im-config libc-bin libc-dev-bin libc6 libc6-dbg libc6-dev libcupsfilters1 libfcitx-config4 libfcitx-gclient0 libfcitx-utils0 libfontembed1 libgail-common libgail18 libgspell-1-1 libgtk2.0-0 libgtk2.0-bin libgtk2.0-common libmetacity0 libnautilus-extension1a libnss-resolve libpam-systemd libpulse-mainloop-glib0 libpulse0 libpulsedsp libsystemd0 libudev1 light-themes locales metacity metacity-common multiarch-support nautilus nautilus-data pulseaudio pulseaudio-module-bluetooth pulseaudio-utils python3-distupgrade qml-module-ubuntu-web qtdeclarative5-ubuntu-web-plugin snapd suru-icon-theme systemd systemd-sysv ubuntu-artwork ubuntu-mobile-icons ubuntu-mono ubuntu-release-upgrader-core ubuntu-release-upgrader-gtk ubuntu-software udev webapp-container webbrowser-app xmir xserver-common xserver-xorg-core
2016-12-20 10:48:57,310 INFO Writing dpkg log to '/var/log/unattended-upgrades/unattended-upgrades-dpkg.log'
2016-12-20 10:50:02,211 INFO All upgrades installed
bdmurray at clean-yakkety-amd64:~$ apt-cache policy unattended-upgrades
unattended-upgrades:
Installed: 0.92ubuntu1.2
Candidate: 0.92ubuntu1.2
Version table:
*** 0.92ubuntu1.2 100
100 /var/lib/dpkg/status
** Tags added: verification-done-yakkety
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to unattended-upgrades in Ubuntu.
https://bugs.launchpad.net/bugs/1618900
Title:
[Xenial/0.90] Systemd dependencies issues when used in "Shutdown mode"
Status in unattended-upgrades package in Ubuntu:
Fix Released
Status in unattended-upgrades source package in Xenial:
Fix Committed
Status in unattended-upgrades source package in Yakkety:
Fix Committed
Bug description:
[Impact]
There are some race conditions in unattended-upgrades when it is used in shutdown mode. It is possible that the network has already been brought down or for a local file system, like /var/, to be unmounted before the unattended-upgrades script is run. This then causes the updates not to be installed thereby making systems less secure - if security updates are enabled.
[Test Case]
Because this is a race condition, I haven't actually been able to recreate the bug. However, the fix is straightforward and testing for regressions should be sufficient.
1) On a freshly installed system.
2) Modify /etc/apt/apt.conf.d/50unattended-upgrades so that
Unattended-Upgrade::InstallOnShutdown "true"; is not commented out.
3) Reboot and watch updates being installed
4) Verify updates were installed by reviewing /var/log/unattended-upgrades/unattended-upgrades.log
5) Uncomment -updates in 50unattended-upgrades
Repeats steps 3 and 4 again. There isn't any need to run unattended-
upgrades in *not* shutdown mode because we have only modified the
systemd service file.
[Regression Potential]
There is little chance of a regression, but because of the change (and this feature now working better) its possible the shutdown process will take longer and surprise users.
Original Description
--------------------
Using unattended-upgrades 0.90 in "Shutdown mode" on Ubuntu Xenial, we encounter the following systemd dependencies issues :
- The network is often down when unattended-upgrades is running, so packages can not be downloaded (can be mitigated by using APT::Periodic::Download-Upgradeable-Packages "1";) :
=> ERROR An error occurred: 'Could not resolve host: ****.fr'
=> ERROR The URI 'https://****.fr:33000/ubuntu-security/pool/main/libi/libidn/libidn11_1.32-3ubuntu1.1_amd64.deb' failed to download, aborting
- Important mountpoints like /boot are unmounted before unattended-upgrades is running, so newer kernels can not be installed properly (ramdisk and grub configuration can not be generated)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/unattended-upgrades/+bug/1618900/+subscriptions
More information about the foundations-bugs
mailing list