Comment 7 for bug 1806487

Revision history for this message
Balint Reczey (rbalint) wrote :

Verifed 1.1ubuntu1.18.04.7~16.04.1 on Xenial:

root@x-lp-1806487-uu:~# ln -s /dev/null /etc/systemd/system/systemd-logind.service
root@x-lp-1806487-uu:~# service systemd-logind stop1.1ubuntu1.18.04.7~16.04.1
root@x-lp-1806487-uu:~# vi /etc/apt/sources.list
root@x-lp-1806487-uu:~# apt update -qq
23 packages can be upgraded. Run 'apt list --upgradable' to see them.
root@x-lp-1806487-uu:~# apt install -qq unattended-upgrades
The following package was automatically installed and is no longer required:
  libfreetype6
Use 'apt autoremove' to remove it.
Suggested packages:
  bsd-mailx default-mta | mail-transport-agent needrestart
The following packages will be upgraded:
  unattended-upgrades
1 upgraded, 0 newly installed, 0 to remove and 22 not upgraded.
Need to get 40.2 kB of archives.
After this operation, 69.6 kB of additional disk space will be used.
Preconfiguring packages ...
(Reading database ... 25709 files and directories currently installed.)
Preparing to unpack .../unattended-upgrades_1.1ubuntu1.18.04.7~16.04.1_all.deb ...
Unpacking unattended-upgrades (1.1ubuntu1.18.04.7~16.04.1) over (0.90ubuntu0.9) ...
Processing triggers for systemd (229-4ubuntu21.10) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up unattended-upgrades (1.1ubuntu1.18.04.7~16.04.1) ...
Installing new version of config file /etc/kernel/postinst.d/unattended-upgrades ...
Installing new version of config file /etc/pm/sleep.d/10_unattended-upgrades-hibernate ...
root@x-lp-1806487-uu:~# systemctl daemon-reload
root@x-lp-1806487-uu:~# service systemd-logind status
● systemd-logind.service
   Loaded: masked (/dev/null; bad)
   Active: inactive (dead) since Wed 2018-12-19 18:41:11 UTC; 1min 14s ago
 Main PID: 376 (code=killed, signal=TERM)
   Status: "Processing requests..."

Dec 19 14:19:03 x-lp-1806487-uu systemd-logind[376]: New seat seat0.
Dec 19 14:19:03 x-lp-1806487-uu systemd[1]: Started Login Service.
Dec 19 18:40:20 x-lp-1806487-uu systemd-logind[376]: New session c1 of user root.
Dec 19 18:41:11 x-lp-1806487-uu systemd[1]: Stopping Login Service...
Dec 19 18:41:11 x-lp-1806487-uu systemd[1]: Stopped Login Service.
root@x-lp-1806487-uu:~# /usr/share/unattended-upgrades/unattended-upgrade-shutdown --debug
root@x-lp-1806487-uu:~# tail /var/log/unattended-upgrades/unattended-upgrades-shutdown.log
2018-12-19 18:42:33,848 WARNING - Could not get delay inhibitor lock
2018-12-19 18:42:33,849 DEBUG - Skip waiting for signals, starting operation now
2018-12-19 18:42:33,849 DEBUG - Starting countdown of 25.0 minutes
2018-12-19 18:42:33,850 DEBUG - Initializing apt_pkg configuration
2018-12-19 18:42:33,850 DEBUG - get_lock returned 7
2018-12-19 18:42:33,851 DEBUG - lock not taken
root@x-lp-1806487-uu:~# rm /etc/systemd/system/systemd-logind.service
root@x-lp-1806487-uu:~# systemctl daemon-reload
root@x-lp-1806487-uu:~# service unattended-upgrades restart
root@x-lp-1806487-uu:~# service unattended-upgrades restart
root@x-lp-1806487-uu:~# 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 Wed 2018-12-19 18:43:05 UTC; 6s ago
     Docs: man:unattended-upgrade(8)
 Main PID: 1505 (unattended-upgr)
    Tasks: 2
   Memory: 8.4M
      CPU: 66ms
   CGroup: /system.slice/unattended-upgrades.service
           └─1505 /usr/bin/python3 /usr/share/unattended-upgrades/unattended-upgrade-shutdown --wait-for-signal

Dec 19 18:43:05 x-lp-1806487-uu systemd[1]: Started Unattended Upgrades Shutdown.
root@x-lp-1806487-uu:~# tail /var/log/unattended-upgrades/unattended-upgrades-shutdown.log
2018-12-19 18:42:33,848 WARNING - Could not get delay inhibitor lock
2018-12-19 18:42:33,849 DEBUG - Skip waiting for signals, starting operation now
2018-12-19 18:42:33,849 DEBUG - Starting countdown of 25.0 minutes
2018-12-19 18:42:33,850 DEBUG - Initializing apt_pkg configuration
2018-12-19 18:42:33,850 DEBUG - get_lock returned 7
2018-12-19 18:42:33,851 DEBUG - lock not taken
2018-12-19 18:43:05,014 WARNING - SIGTERM or SIGHUP received, stopping unattended-upgradesonly if it is running
root@x-lp-1806487-uu:~#