Verified with unattended-upgrades 1.5ubuntu3.18.10.0:

oot@cc-uu-onshutdown:~# service unattended-upgrades status
● unattended-upgrades.service - Unattended Upgrades Shutdown
   Loaded: loaded (/lib/systemd/system/unattended-upgrades.service; enabled; 
vendor preset: enabled)
   Active: active (running) since Tue 2018-11-27 22:05:20 UTC; 6s ago
     Docs: man:unattended-upgrade(8)
 Main PID: 2198 (unattended-upgr)
    Tasks: 2 (limit: 4915)
   Memory: 8.1M
   CGroup: /system.slice/unattended-upgrades.service
           └─2198 /usr/bin/python3 
/usr/share/unattended-upgrades/unattended-upgrade-shutdown --wait-for-signal

Nov 27 22:05:20 cc-uu-onshutdown systemd[1]: Started Unattended Upgrades 
Shutdown.
root@cc-uu-onshutdown:~# vi /etc/apt/sources.list
root@cc-uu-onshutdown:~# echo 'Unattended-Upgrade::InstallOnShutdown "true";' > 
/etc/apt/apt.conf.d/51unattended-upgrades-on-shutdown
root@cc-uu-onshutdown:~# dbus-send --system --print-reply 
--dest=org.freedesktop.login1 /org/freedesktop/login1 
"org.freedesktop.login1.Manager.Reboot" boolean:false
method return time=1543356364.788282 sender=:1.4 -> destination=:1.14 serial=32 
reply_serial=2
root@cc-uu-onshutdown:~# logout
rbalint@yogi:~/tmp$ lxc shell cc-uu-onshutdown
mesg: ttyname failed: No such device
root@cc-uu-onshutdown:~# uptime 
 22:06:50 up 0 min,  0 users,  load average: 0.39, 0.44, 0.36
root@cc-uu-onshutdown:~# journalctl -l | grep -B5 -A5 Unatt
Nov 27 22:05:20 cc-uu-onshutdown systemd[1]: snapd.seeded.service: Failed to 
reset devices.list: Operation not permitted
Nov 27 22:05:20 cc-uu-onshutdown systemd[1]: systemd-user-sessions.service: 
Failed to reset devices.list: Operation not permitted
Nov 27 22:05:20 cc-uu-onshutdown systemd[1]: systemd-sysctl.service: Failed to 
reset devices.list: Operation not permitted
Nov 27 22:05:20 cc-uu-onshutdown systemd[1]: snap.mount: Failed to reset 
devices.list: Operation not permitted
Nov 27 22:05:20 cc-uu-onshutdown systemd[1]: unattended-upgrades.service: 
Failed to reset devices.list: Operation not permitted
Nov 27 22:05:20 cc-uu-onshutdown systemd[1]: Started Unattended Upgrades 
Shutdown.
Nov 27 22:06:06 cc-uu-onshutdown systemd-logind[190]: System is rebooting.
Nov 27 22:06:06 cc-uu-onshutdown systemd[1]: Stopping Availability of block 
devices...
Nov 27 22:06:06 cc-uu-onshutdown systemd[1]: Removed slice system-getty.slice.
Nov 27 22:06:06 cc-uu-onshutdown systemd[1]: Stopping Session c1 of user root.
Nov 27 22:06:06 cc-uu-onshutdown su[1160]: pam_unix(su:session): session closed 
for user root
--
...
root@cc-uu-onshutdown:~# cat /var/log/unattended-upgrades/unattended-upgrades
unattended-upgrades-dpkg.log      unattended-upgrades-shutdown.log  
unattended-upgrades.log           
root@cc-uu-onshutdown:~# cat 
/var/log/unattended-upgrades/unattended-upgrades-shutdown.log 
2018-11-27 22:06:04,792 WARNING - Running unattended-upgrades in shutdown mode
2018-11-27 22:06:04,804 WARNING - Unattended-upgrade in progress during 
shutdown, please don't turn off the computer
2018-11-27 22:06:06,457 WARNING - Unattended-upgrade in progress during 
shutdown, please don't turn off the computer
2018-11-27 22:06:06,473 INFO - All upgrades installed
root@cc-uu-onshutdown:~# cat 
/var/log/unattended-upgrades/unattended-upgrades.log 
2018-11-27 22:06:05,014 WARNING System is on battery power, stopping
root@cc-uu-onshutdown:~# vi /etc/apt/apt.conf.d/50
50command-not-found    50unattended-upgrades  
root@cc-uu-onshutdown:~# vi /etc/apt/apt.conf.d/50unattended-upgrades 
root@cc-uu-onshutdown:~# dbus-send --system --print-reply 
--dest=org.freedesktop.login1 /org/freedesktop/login1 
"org.freedesktop.login1.Manager.Reboot" boolean:false
method return time=1543356568.325178 sender=:1.4 -> destination=:1.13 serial=32 
reply_serial=2
root@cc-uu-onshutdown:~# dpkg -l unattended-upgrades 
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                   Version          Architecture     Description
+++-======================-================-================-==================================================
ii  unattended-upgrades    1.5ubuntu3.18.10 all              automatic 
installation of security upgrades
root@cc-uu-onshutdown:~# dpkg -l unattended-upgrades  | cat
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                Version            Architecture Description
+++-===================-==================-============-===========================================
ii  unattended-upgrades 1.5ubuntu3.18.10.0 all          automatic installation 
of security upgrades
root@cc-uu-onshutdown:~# 
logout
Session terminated, terminating shell... ...terminated.
rbalint@yogi:~/tmp$ lxc shell cc-uu-onshutdown
mesg: ttyname failed: No such device
root@cc-uu-onshutdown:~# cat 
/var/log/unattended-upgrades/unattended-upgrades.log 
2018-11-27 22:06:05,014 WARNING System is on battery power, stopping
2018-11-27 22:09:28,550 INFO Initial blacklisted packages: 
2018-11-27 22:09:28,550 INFO Initial whitelisted packages: 
2018-11-27 22:09:28,550 INFO Starting unattended upgrades script
2018-11-27 22:09:28,550 INFO Allowed origins are: o=Ubuntu,a=cosmic, 
o=Ubuntu,a=cosmic-security, o=UbuntuESM,a=cosmic
2018-11-27 22:09:32,528 INFO Packages that will be upgraded: git git-man 
libnss-systemd libpam-systemd libsystemd0 libudev1 systemd systemd-sysv udev
2018-11-27 22:09:32,528 INFO Writing dpkg log to 
/var/log/unattended-upgrades/unattended-upgrades-dpkg.log
2018-11-27 22:09:55,195 INFO All upgrades installed
root@cc-uu-onshutdown:~# 


** Tags removed: verification-needed-cosmic
** Tags added: verification-done-cosmic

** Tags removed: verification-needed
** Tags added: verification-done

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

Title:
  Unattended-upgrades may keep running after unmounting local
  filesystems in InstallOnShutdown mode

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

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

Reply via email to