After rebooting for updates, reboot is still required.

Bug #1626345 reported by Barry Kolts
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
One Hundred Papercuts
Confirmed
High
Unassigned
unattended-upgrades (Ubuntu)
Incomplete
High
Unassigned

Bug Description

Yesterday unattended-upgrades required a reboot for kernel updates as expected. But today unattended-upgrades required a reboot even though there were no updates.

2016-09-20 05:20:10,409 INFO Initial blacklisted packages:
2016-09-20 05:20:10,410 INFO Initial whitelisted packages:
2016-09-20 05:20:10,411 INFO Starting unattended upgrades script
2016-09-20 05:20:10,411 INFO Allowed origins are: ['o=Ubuntu,a=xenial-security', 'o=Ubuntu,a=xenial-updates']
2016-09-20 05:21:13,118 INFO Packages that will be upgraded: linux-generic linux-headers-generic linux-image-generic linux-libc-dev
2016-09-20 05:21:13,119 INFO Writing dpkg log to '/var/log/unattended-upgrades/unattended-upgrades-dpkg.log'
2016-09-20 05:24:17,405 INFO All upgrades installed
2016-09-20 05:24:24,959 WARNING Found /var/run/reboot-required, rebooting
2016-09-21 05:10:54,080 INFO Initial blacklisted packages:
2016-09-21 05:10:54,088 INFO Initial whitelisted packages:
2016-09-21 05:10:54,089 INFO Starting unattended upgrades script
2016-09-21 05:10:54,089 INFO Allowed origins are: ['o=Ubuntu,a=xenial-security', 'o=Ubuntu,a=xenial-updates']
2016-09-21 05:11:02,624 INFO No packages found that can be upgraded unattended and no pending auto-removals
2016-09-21 05:11:02,624 WARNING Found /var/run/reboot-required, rebooting

On this machine (16.04 server) unattended-upgrades is configured to reboot automatically.

This also happened on another 16.04 server with default unattended-upgrades configuration. It displayed the *******System restart required******* message. The same on a 14.04 server and a 14.04 desktop.

Expected behaviour: Not to do an unnecessary reboot.

Let me know what other information I can provide.

Tags: reboot xenial
Revision history for this message
Barry Kolts (bhkolts) wrote :
tags: added: xenial
Revision history for this message
Brian Murray (brian-murray) wrote :

The file /var/log/apt/history.log might be useful in sorting out why the file still exists. Could you please add it as an attachment?

Changed in unattended-upgrades (Ubuntu):
status: New → Incomplete
Revision history for this message
Barry Kolts (bhkolts) wrote :

Brian,
File attached.

Revision history for this message
Brian Murray (brian-murray) wrote :

The autoremove would have created the reboot-required file.

Start-Date: 2016-09-20 06:56:26
Commandline: apt autoremove
Requested-By: barry (1000)
Remove: linux-image-extra-4.4.0-34-generic:amd64 (4.4.0-34.53), linux-headers-4.4.0-34-generic:amd64 (4.4.0-34.53), linux-headers-4.4.0-34:amd64 (4.4.0-34.53), linux-image-4.4.0-34-generic:amd64 (4.4.0-34.53)
End-Date: 2016-09-20 06:56:55

Do you have a '/var/run/reboot-required.pkgs' file? If so does it contain anything?

Revision history for this message
Barry Kolts (bhkolts) wrote :

Brian,
I don't have that file as it was removed by the reboot, but I do believe it said "Linux base", same as the day before.

Revision history for this message
Alexandre Cavaco (alexcavaco) wrote :

Hello,

Brian, I do have that '/var/run/reboot-required.pkgs', it's contents are simply:

linux-base

Changed in unattended-upgrades (Ubuntu):
status: Incomplete → Confirmed
Changed in unattended-upgrades (Ubuntu):
importance: Undecided → High
Changed in hundredpapercuts:
status: New → Confirmed
importance: Undecided → High
Revision history for this message
Brian Murray (brian-murray) wrote :

@Alexandre - Could you add your /var/log/apt/history.log entries from before the reboot-required.pkgs file was created?

In Barry's case I believe the reboot-required was created because of running 'apt autoremove' which removed older kernels and triggered a run of update-initramfs.

Changed in unattended-upgrades (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Alexandre Cavaco (alexcavaco) wrote :

Sure Brian, here it is.

I think my case was exactly the same, as I also did a 'apt-get autoremove'.

But, the strange think is that the reboot file vanished and the system is no longer asking me for reboots (probably since yesterday), but I didn't do anything specific to try to solve the problem.

Revision history for this message
Barry Kolts (bhkolts) wrote :

Brian,
This weekend we had updates for libssl and a libssl regression. Both required a reboot and no second reboot. In other words worked as expected.

Perhaps the bug only occurs for kernel updates. I have had this happen a few times in the past. So the next time it happens I will not run autoremove manually, to see what happens.
What files and logs can I provide at that time that will help?

Revision history for this message
Barry Kolts (bhkolts) wrote :

Brian,

Yesterday we had kernel updates. My server, which is set to automatically reboot, reboot fine and no /var/run/reboot-required. This morning there was no second reboot, so everything was as expected. The I ran autoremove to remove the stale kernel. Then I had /var/run/reboot-required and /var/run/reboot-required.pkgs contained linux-base. So I wouldn't think removing a kernel should require a reboot. So is this a bug or am I not understand how this should work?

I confirmed this on a second 16.04 server

Attached are the /var/log/apt/history.logs from before autoremove and after.

Revision history for this message
Barry Kolts (bhkolts) wrote :

And the after autoremove log

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.