[Bug 1887655] Re: unattended-upgrades triggers reboot despite configuration
Andy Kasp
1887655 at bugs.launchpad.net
Fri Mar 5 15:46:54 UTC 2021
Hi, why this has expired without any confirmation/non-confirmation? This
sounds like a terrible way to resolve bugs?!
I just had the same on a pretty vanilla 20.04 server which kernel was/is
compiled Nov 13 11:40:37 UTC 2020.
below command returns nothing:
apt-config dump | grep Reboot
also:
fgrep -i reboot /etc/apt/apt.conf.d/50unattended-upgrades
// Automatically reboot *WITHOUT CONFIRMATION* if
// the file /var/run/reboot-required is found after the upgrade
//Unattended-Upgrade::Automatic-Reboot "false";
// Automatically reboot even if there are users currently logged in
// when Unattended-Upgrade::Automatic-Reboot is set to true
//Unattended-Upgrade::Automatic-Reboot-WithUsers "true";
// If automatic reboot is enabled and needed, reboot at the specific
//Unattended-Upgrade::Automatic-Reboot-Time "02:00";
The only way I found out about this reboot was by looking into /var/log/syslog
Mar 5 12:57:44 ip-192-168-141-181 systemd[1]: unattended-upgrades.service: Succeeded.
After reboot I see packages are still pending so unlikely have updated anything:
The following NEW packages will be installed:
amd64-microcode intel-microcode iucode-tool linux-aws-headers-5.4.0-1038 linux-headers-5.4.0-1038-aws linux-image-5.4.0-1038-aws linux-modules-5.4.0-1038-aws microcode-initrd python3-pexpect python3-ptyprocess
The following packages will be upgraded:
alsa-ucm-conf apt apt-utils base-files bind9-dnsutils bind9-host bind9-libs bolt bsdutils busybox-initramfs busybox-static cloud-init containerd cryptsetup cryptsetup-bin cryptsetup-initramfs cryptsetup-run dirmngr docker.io ec2-hibinit-agent ec2-instance-connect
fdisk finalrd friendly-recovery gnupg gnupg-l10n gnupg-utils gpg gpg-agent gpg-wks-client gpg-wks-server gpgconf gpgsm gpgv grub-common grub-pc grub-pc-bin grub2-common initramfs-tools initramfs-tools-bin initramfs-tools-core jq language-selector-common
libapt-pkg6.0 libasound2 libasound2-data libblkid1 libc-bin libc6 libcryptsetup12 libdrm-common libdrm2 libefiboot1 libefivar1 libfdisk1 libglib2.0-0 libglib2.0-bin libglib2.0-data libjq1 libmount1 libnetplan0 libnss-systemd libpam-systemd libparted2 libplymouth5
libruby2.7 libsmartcols1 libsystemd0 libudev1 libuuid1 linux-aws linux-headers-aws linux-image-aws locales lshw lsof mdadm motd-news-config mount netplan.io open-vm-tools parted plymouth plymouth-theme-ubuntu-text pollinate python-apt-common python3-apt
python3-distupgrade python3-software-properties python3-twisted python3-twisted-bin python3-update-manager ruby2.7 software-properties-common sosreport systemd systemd-sysv systemd-timesyncd ubuntu-release-upgrader-core udev update-manager-core
update-notifier-common util-linux uuid-runtime zlib1g
105 upgraded, 10 newly installed, 0 to remove and 0 not upgraded.
Need to get 142 MB of archives.
After this operation, 172 MB of additional disk space will be used.
/var/log/dpkg.log empty today (05-Mar-2021)
latest entries
2021-02-26 06:04:04 trigproc install-info:amd64 6.7.0.dfsg.2-5 <none>
2021-02-26 06:04:04 status half-configured install-info:amd64 6.7.0.dfsg.2-5
2021-02-26 06:04:04 status installed install-info:amd64 6.7.0.dfsg.2-5
2021-02-26 06:04:04 trigproc systemd:amd64 245.4-4ubuntu3.2 <none>
2021-02-26 06:04:04 status half-configured systemd:amd64 245.4-4ubuntu3.2
2021-02-26 06:04:04 status installed systemd:amd64 245.4-4ubuntu3.2
unattended-upgrades-shutdown.log latest entry in 2020-10-20
unattended-upgrades-dpkg.log 2021-02-26
unattended-upgrades.log:
2021-03-05 05:50:36,537 INFO Starting unattended upgrades script
2021-03-05 05:50:36,538 INFO Allowed origins are: o=Ubuntu,a=focal, o=Ubuntu,a=focal-security, o=UbuntuESMApps,a=focal-apps-security, o=UbuntuESM,a=focal-infra-security
2021-03-05 05:50:36,538 INFO Initial blacklist:
2021-03-05 05:50:36,538 INFO Initial whitelist (not strict):
2021-03-05 05:50:38,646 WARNING package linux-aws upgradable but fails to be marked for upgrade (E:Unable to correct problems, you have held broken packages.)
2021-03-05 06:13:35,658 INFO Starting unattended upgrades script
2021-03-05 06:13:35,659 INFO Allowed origins are: o=Ubuntu,a=focal, o=Ubuntu,a=focal-security, o=UbuntuESMApps,a=focal-apps-security, o=UbuntuESM,a=focal-infra-security
2021-03-05 06:13:35,659 INFO Initial blacklist:
2021-03-05 06:13:35,659 INFO Initial whitelist (not strict):
2021-03-05 06:13:37,940 WARNING package linux-aws upgradable but fails to be marked for upgrade (E:Unable to correct problems, you have held broken packages.)
2021-03-05 06:13:40,008 INFO No packages found that can be upgraded unattended and no pending auto-removals
2021-03-05 06:13:40,189 INFO Package linux-aws is kept back because a related package is kept back or due to local apt_preferences(5).
2021-03-05 06:13:40,194 INFO Package linux-headers-aws is kept back because a related package is kept back or due to local apt_preferences(5).
2021-03-05 06:13:40,197 INFO Package linux-image-aws is kept back because a related package is kept back or due to local apt_preferences(5).
--
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/1887655
Title:
unattended-upgrades triggers reboot despite configuration
Status in unattended-upgrades package in Ubuntu:
New
Bug description:
I've been having problems with my Ubuntu machine suddenly rebooting
without any warning. To my knowledge Ubuntu Desktop is not supposed
to reboot without warning by default.
I believe this is being triggered by unattended-upgrades
unattended-upgrades 2.3 (amd64)
Ubuntu Desktop:
Description: Ubuntu 20.04 LTS
Release: 20.04
One pattern that emerges is that the reboot happens right after
unattended-upgrades completes successfully. There are multiple
examples in my /var/log/syslog, but all show "unattended-
upgrades.service: Succeeded." the same second everything begins to
shut down, with nothing for a minute or two prior. Example:
Jul 15 11:17:01 pc systemd[2065]: Starting Notification regarding a new release of Ubuntu...
Jul 15 11:17:14 pc charon: 08[IKE] sending keep alive to 10.10.10.10[4500]
Jul 15 11:17:22 pc check-new-release-gtk[71843]: /usr/lib/ubuntu-release-upgrader/check-new-release-gtk:30: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk'
, '3.0') before import to ensure that the right version gets loaded.
Jul 15 11:17:22 pc check-new-release-gtk[71843]: from gi.repository import Gtk
Jul 15 11:17:22 pc check-new-release-gtk[71843]: WARNING:root:timeout reached, exiting
Jul 15 11:17:22 pc systemd[2065]: update-notifier-release.service: Succeeded.
Jul 15 11:17:22 pc systemd[2065]: Finished Notification regarding a new release of Ubuntu.
Jul 15 11:17:48 pc mysql-workbench[33350]: gtk_tree_view_unref_tree_helper: assertion 'node != NULL' failed
Jul 15 11:17:54 pc charon: 09[IKE] sending keep alive to 10.10.10.10[4500]
Jul 15 11:18:03 pc systemd[1]: unattended-upgrades.service: Succeeded.
Jul 15 11:18:03 pc systemd[1]: Stopping Session 3 of user philip.
Jul 15 11:18:03 pc systemd[1]: Removed slice system-clean\x2dmount\x2dpoint.slice.
Jul 15 11:18:03 pc systemd[1]: Removed slice system-getty.slice.
Jul 15 11:18:03 pc systemd[1]: Removed slice system-modprobe.slice.
Jul 15 11:18:03 pc systemd[1]: Stopped target Block Device Preparation for /dev/mapper/ubuntu.
Jul 15 11:18:03 pc systemd[2065]: Stopped target GNOME Wayland Session (session: gnome).
From memory I've never edited the contents of /etc/apt/apt.conf.d/ and
the configuration for unattended upgrades claims to be default (NOT to
reboot):
$ grep -irnC4 reboot /etc/apt/apt.conf.d/
/etc/apt/apt.conf.d/50unattended-upgrades-88-// Do automatic removal of unused packages after the upgrade
/etc/apt/apt.conf.d/50unattended-upgrades-89-// (equivalent to apt-get autoremove)
/etc/apt/apt.conf.d/50unattended-upgrades-90-//Unattended-Upgrade::Remove-Unused-Dependencies "false";
/etc/apt/apt.conf.d/50unattended-upgrades-91-
/etc/apt/apt.conf.d/50unattended-upgrades:92:// Automatically reboot *WITHOUT CONFIRMATION* if
/etc/apt/apt.conf.d/50unattended-upgrades:93:// the file /var/run/reboot-required is found after the upgrade
/etc/apt/apt.conf.d/50unattended-upgrades:94://Unattended-Upgrade::Automatic-Reboot "false";
/etc/apt/apt.conf.d/50unattended-upgrades-95-
/etc/apt/apt.conf.d/50unattended-upgrades:96:// Automatically reboot even if there are users currently logged in
/etc/apt/apt.conf.d/50unattended-upgrades:97:// when Unattended-Upgrade::Automatic-Reboot is set to true
/etc/apt/apt.conf.d/50unattended-upgrades:98://Unattended-Upgrade::Automatic-Reboot-WithUsers "true";
/etc/apt/apt.conf.d/50unattended-upgrades-99-
/etc/apt/apt.conf.d/50unattended-upgrades:100:// If automatic reboot is enabled and needed, reboot at the specific
/etc/apt/apt.conf.d/50unattended-upgrades-101-// time instead of immediately
/etc/apt/apt.conf.d/50unattended-upgrades-102-// Default: "now"
/etc/apt/apt.conf.d/50unattended-upgrades:103://Unattended-Upgrade::Automatic-Reboot-Time "02:00";
/etc/apt/apt.conf.d/50unattended-upgrades-104-
/etc/apt/apt.conf.d/50unattended-upgrades-105-// Use apt bandwidth limit feature, this example limits the download
/etc/apt/apt.conf.d/50unattended-upgrades-106-// speed to 70kb/sec
/etc/apt/apt.conf.d/50unattended-upgrades-107-//Acquire::http::Dl-Limit "70";
journalctl -u unattended-upgrades
Jul 10 07:52:31 PC systemd[1]: Started Unattended Upgrades Shutdown.
Jul 14 10:03:03 PC systemd[1]: unattended-upgrades.service: Succeeded.
-- Reboot --
Jul 14 10:04:11 PC systemd[1]: Started Unattended Upgrades Shutdown.
Jul 15 11:18:03 PC systemd[1]: unattended-upgrades.service: Succeeded.
-- Reboot --
Jul 15 11:19:10 PC systemd[1]: Started Unattended Upgrades Shutdown.
It's not clear to me what other information I can offer to help.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/unattended-upgrades/+bug/1887655/+subscriptions
More information about the foundations-bugs
mailing list