Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Unattended-Upgrades on Jessie - Reboots

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
SEPDON
Posts: 3
Joined: 2019-09-03 09:36

Unattended-Upgrades on Jessie - Reboots

#1 Post by SEPDON »

Hi there,

Relative beginner with Linux - I have a Debian 8 / Jessie machine (supplied as an 'appliance' by the vendor) but I have to apply OS updates myself.

Currently, I have scripts written that set security sources and then print and apply updates when run manually. However, I wish to automate this.

I have installed the 'unattended-upgrades' package and have configured it to run daily as per numerous blogs / articles and this looks to be running fine and installing the updates.

However, I don't think that the reboot functionality is working. I have read several articles and the following is stated:

1. Originally, you needed update-notifier-common or reboot-notifier packages installed in order for the automated reboot to function but these have been removed from Jessie and later
2. Unattended-Upgrades then included this functionality natively so that the above packages were not required.
3. However, I see that there was a bug reported back in 2015 where this did not work (https://bugs.debian.org/cgi-bin/bugrepo ... bug=788358). The detail says that this was fixed in version 0.83.4
4. When I look at the newly installed version on my machine, I get the following, which suggests that it is not a version that includes the bug fix:

unattended-upgrades/oldoldstable,now 0.83.3.2+deb8u1 all [installed]

Am I missing something or is it that the new version never got added to the stable release repository (if that's the correct terminology)?

Is it that most security updates would require a reboot or is that not typically the case?

What are the options? I'm thinking of running unattended upgrades daily and then also doing a nightly reboot a few hours after.

Best Regards, Steve

Dai_trying
Posts: 1100
Joined: 2016-01-07 12:25
Has thanked: 5 times
Been thanked: 16 times

Re: Unattended-Upgrades on Jessie - Reboots

#2 Post by Dai_trying »

I'm not sure if this is definitive or not, I guess it would depend on the package, but I check to see if /var/run/reboot-required exits which would tell me the system requires a reboot, you could easily write a cron job to check this and let you know (by email/on-screen notification/play a sound/ any other method) and then would know to reboot, or of course you could set the script to reboot the machine but I would not do this as it removes the ability to wait until I am ready. Obviously if you are a more experienced scripter you might be able to script something that would only trigger if certain conditions were met (depending on your requirements), but I would use email notification.

SEPDON
Posts: 3
Joined: 2019-09-03 09:36

Re: Unattended-Upgrades on Jessie - Reboots

#3 Post by SEPDON »

Thanks for the reply. Thing is, I've read that it's the update-notifier-common or reboot-notifier packages that create that file and if they don't exist (as they are not available on Jessie) then the file won't get created.

Hence, why the updated version of unattended-upgrades was produced but then it seems that this wasn't then released.

Dai_trying
Posts: 1100
Joined: 2016-01-07 12:25
Has thanked: 5 times
Been thanked: 16 times

Re: Unattended-Upgrades on Jessie - Reboots

#4 Post by Dai_trying »

I'm think either apt or the package being updated (probably apt) put the file there as I have no notifier packages installed but get the reboot-required file placed even on a very minimal installation, but I'm no expert on it so maybe somebody has a more knowledgeable answer.

SEPDON
Posts: 3
Joined: 2019-09-03 09:36

Re: Unattended-Upgrades on Jessie - Reboots

#5 Post by SEPDON »

Hmmm, that's interesting, run it in debug mode this morning from the prompt (unattended-upgrades -d) and I saw the following at the end of the info stream, so looks as though it is picking up the reboot OK.

Code: Select all

All upgrades installed
Extracting content from '/var/log/unattended-upgrades/unattended-upgrades-dpkg.log' since '2019-09-04 10:11:25.341939'
Found /var/run/reboot-required, rebooting
Though when I let it run overnight via the daily cron job, it said there were no updates available in the log file. Will have to do some more testing and try to see how robust it is.

Dai_trying
Posts: 1100
Joined: 2016-01-07 12:25
Has thanked: 5 times
Been thanked: 16 times

Re: Unattended-Upgrades on Jessie - Reboots

#6 Post by Dai_trying »

You could always try tricking it into rebooting by placing the file there yourself and see if it gets picked up (sudo touch /var/run/reboot-required), I do not know if it (UA) will still check for the file if no updates are applied though...

Post Reply