I was able to reproduce it in a freshly installed VM (VMware).

----------------------
root@ubuntu:~# egrep -v '(^\s*//.*$|^\s*$)' 
/etc/apt/apt.conf.d/50unattended-upgrades 
Unattended-Upgrade::Allowed-Origins {
        "${distro_id}:${distro_codename}";
        "${distro_id}:${distro_codename}-security";
        "${distro_id}ESM:${distro_codename}";
};
Unattended-Upgrade::Package-Blacklist {
};
Unattended-Upgrade::Automatic-Reboot "true";

root@ubuntu:~# uname -a
Linux ubuntu 4.4.0-104-generic #127-Ubuntu SMP Mon Dec 11 12:16:42 UTC 2017 
x86_64 x86_64 x86_64 GNU/Linux

root@ubuntu:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.3 LTS
Release:        16.04
Codename:       xenial

root@ubuntu:~# apt-get update && apt-get dist-upgrade -y
Get:1 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Hit:2 http://us.archive.ubuntu.com/ubuntu xenial InRelease
Get:3 http://us.archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]     
   
Get:4 http://us.archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]   
             
Fetched 306 kB in 2s (146 kB/s)                              
Reading package lists... Done
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

root@ubuntu:~# file /var/run/reboot-required
/var/run/reboot-required: cannot open `/var/run/reboot-required' (No such file 
or directory)

root@ubuntu:~# touch /var/run/reboot-required

root@ubuntu:~# unattended-upgrades --dry-run

(ssh disconnects, system reboots)

root@ubuntu:~# cat /var/log/unattended-upgrades/unattended-upgrades.log 
2017-12-16 09:59:17,772 INFO Initial blacklisted packages: 
2017-12-16 09:59:17,773 INFO Initial whitelisted packages: 
2017-12-16 09:59:17,773 INFO Starting unattended upgrades script
2017-12-16 09:59:17,773 INFO Allowed origins are: ['o=Ubuntu,a=xenial', 
'o=Ubuntu,a=xenial-security', 'o=UbuntuESM,a=xenial']
2017-12-16 09:59:21,610 INFO No packages found that can be upgraded unattended 
and no pending auto-removals
2017-12-16 09:59:21,611 WARNING Found /var/run/reboot-required, rebooting

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

Title:
  Running 'unattended-upgrades --dry-run' reboots the machine

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

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to