The new version in zesty-proposed resolves the issue for me.

bdmurray@clean-zesty-amd64:~$ sudo apt-get install unattended-upgrades
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-headers-4.10.0-19 linux-headers-4.10.0-19-generic 
linux-image-4.10.0-19-generic linux-image-extra-4.10.0-19-generic
Use 'sudo apt autoremove' to remove them.
Suggested packages:
  bsd-mailx mail-transport-agent needrestart
The following packages will be upgraded:
  unattended-upgrades
1 upgraded, 0 newly installed, 0 to remove and 43 not upgraded.
Need to get 34.7 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://192.168.10.7/ubuntu zesty-proposed/main amd64 unattended-upgrades 
all 0.93.1ubuntu2.4 [34.7 kB]
Fetched 34.7 kB in 0s (1,556 kB/s)       
Preconfiguring packages ...
(Reading database ... 259925 files and directories currently installed.)
Preparing to unpack .../unattended-upgrades_0.93.1ubuntu2.4_all.deb ...
Unpacking unattended-upgrades (0.93.1ubuntu2.4) over (0.93.1ubuntu2.3) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for systemd (232-21ubuntu7.1) ...
Setting up unattended-upgrades (0.93.1ubuntu2.4) ...
Processing triggers for man-db (2.7.6.1-2) ...
bdmurray@clean-zesty-amd64:~$ sudo unattended-upgrades --dry-run
bdmurray@clean-zesty-amd64:~$ sudo touch /var/run/reboot-required
bdmurray@clean-zesty-amd64:~$ sudo unattended-upgrades --dry-run
bdmurray@clean-zesty-amd64:~$ 


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

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to unattended-upgrades in
Ubuntu.
https://bugs.launchpad.net/bugs/1269177

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

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 Zesty:
  Fix Committed
Status in unattended-upgrades source package in Artful:
  Fix Committed
Status in unattended-upgrades source package in Bionic:
  Fix Released

Bug description:
  Impact
  ------
  An Ubuntu system will unexpectedly reboot if reboot-required exists and you 
run unattended-upgrades in dry-run mode.

  Test Case
  ---------
  1) modify /etc/apt/apt.conf.d/50unattended-upgrades so that Automatic-Reboot 
is true
  2) Ensure all updates are installed
  3) sudo touch /var/run/reboot-required
  4) run 'sudo unattended-upgrades --dry-run'
  5) watch the system reboot

  With the version of unattended-upgrades from -proposed the system will
  not reboot.

  Regression Potential
  --------------------
  This checks to see if the --dry-run switch is passed to unattended-upgrades 
before calling the reboot function. I guess it would be a regression to people 
who expect the system to reboot but that seems like a very strange corner case.

  Original Description
  --------------------
  Much to my surprise, when I did a dry-run test of unattended-upgrades my 
server was forcibly rebooted. I must have had the file 
'/var/run/reboot-required' present.

  But needless to say: a --dry-run should NOT perform a reboot of the
  server with zero warning. Seriously.

  Output from /var/log/unattended-upgrades.log

  2014-01-15 11:14:26,474 INFO Initial blacklisted packages:
  2014-01-15 11:14:26,474 INFO Starting unattended upgrades script
  2014-01-15 11:14:26,475 INFO Allowed origins are: 
['o=Ubuntu,a=precise-security']
  2014-01-15 11:14:35,846 INFO Option --dry-run given, *not* performing real 
actions
  2014-01-15 11:14:35,846 INFO Packages that are upgraded: bind9-host dnsutils 
libbind9-80 libdns81 libisc83 libisccc80 libisccfg82 liblwres80 libssl1.0.0 
linux-generic-pae linux-headers-generic-pae linux-image-generic-pae 
linux-libc-dev openssl
  2014-01-15 11:14:35,847 INFO Writing dpkg log to 
'/var/log/unattended-upgrades/unattended-upgrades-dpkg_2014-01-15_11:14:35.846820.log'
  2014-01-15 11:15:10,610 INFO All upgrades installed
  2014-01-15 11:15:10,611 WARNING Found /var/run/reboot-required, rebooting

  Version: 0.76ubuntu1

  As an aside, it makes a lot of sense to me to put the reboot on a
  timer, even if it's only a one minute (i.e. shutdown -r 1). That would
  have at least given me a chance to prevent the reboot if I had seen
  the warning. If that's a configuration setting I don't see it
  anywhere.

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

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to