Ubuntu upgrades / unattended upgrades

Apologies if this is a bit off topic for this channel - if anyone knows a good linux discord server I'll happily ask there! šŸ™‚ If not though: - I've started serving sites from ubuntu on digital ocean droplets. I'm using unattended-upgrades, and it seems to be running:
ā— apt-daily-upgrade.timer - Daily apt upgrade and clean activities
Loaded: loaded (/lib/systemd/system/apt-daily-upgrade.timer; enabled; vendor preset: enabled)
Active: active (waiting) since Tue 2023-03-21 18:28:14 UTC; 16min ago
Trigger: Wed 2023-03-22 06:12:51 UTC; 11h left
Triggers: ā— apt-daily-upgrade.service
ā— apt-daily-upgrade.timer - Daily apt upgrade and clean activities
Loaded: loaded (/lib/systemd/system/apt-daily-upgrade.timer; enabled; vendor preset: enabled)
Active: active (waiting) since Tue 2023-03-21 18:28:14 UTC; 16min ago
Trigger: Wed 2023-03-22 06:12:51 UTC; 11h left
Triggers: ā— apt-daily-upgrade.service
and it has upgraded something today (I think): -rw-r--r-- 1 root root 0 Mar 21 06:14 unattended-upgrades-stamp but logging into the server today shows:
28 updates can be applied immediately.
13 of these updates are standard security updates.
28 updates can be applied immediately.
13 of these updates are standard security updates.
I'm really new to linux, especially from the cli, but from reading, shouldn't those security updates be handled? The lines in /etc/apt/apt.conf.d/50unattended-upgrades under Unattended-Upgrade::Allowed-Origins with -security in them are uncommented šŸ¤·ā€ā™‚ļø I feel a bit overwhelmed/worried about messing this up, given that I too frequently mess up my development environment with upgrades šŸ˜† As for the other non-security updates, should I just cross my fingers and run sudo apt upgrade? Sorry if this is a bit rambling, sums up my knowledge on this!
12 Replies
Joao
Joaoā€¢16mo ago
Only the lines with "security"? Do you have "${distro_id}:${distro_codename}"; commented out? It may be that some of those packages require non-security dependencies and is not allowing them to install. Also, you can just run sudo apt upgrade and read the list of updates without accepting them. More often than not you'd still want to install them, but take a note to see if any of those should've been installed in the first place. It may not be obvious right now but it's good to get used to seeing these names, and perhaps useful in case you need to report a bug or something
JWode
JWodeā€¢16mo ago
Sorry @joao6246, I don't know how I missed this! Thanks for the reply though šŸ™‚ Anyway, nah, that line is uncommented:
Unattended-Upgrade::Allowed-Origins {
"${distro_id}:${distro_codename}";
"${distro_id}:${distro_codename}-security";
// Extended Security Maintenance; doesn't necessarily exist for
// every release and this system may not have it installed, but if
// available, the policy for updates is such that unattended-upgrades
// should also install from here by default.
"${distro_id}ESMApps:${distro_codename}-apps-security";
"${distro_id}ESM:${distro_codename}-infra-security";
// "${distro_id}:${distro_codename}-updates";
// "${distro_id}:${distro_codename}-proposed";
// "${distro_id}:${distro_codename}-backports";
};
Unattended-Upgrade::Allowed-Origins {
"${distro_id}:${distro_codename}";
"${distro_id}:${distro_codename}-security";
// Extended Security Maintenance; doesn't necessarily exist for
// every release and this system may not have it installed, but if
// available, the policy for updates is such that unattended-upgrades
// should also install from here by default.
"${distro_id}ESMApps:${distro_codename}-apps-security";
"${distro_id}ESM:${distro_codename}-infra-security";
// "${distro_id}:${distro_codename}-updates";
// "${distro_id}:${distro_codename}-proposed";
// "${distro_id}:${distro_codename}-backports";
};
Just logged in again:
9 updates can be applied immediately.
To see these additional updates run: apt list --upgradable

7 additional security updates can be applied with ESM Apps.
Learn more about enabling ESM Apps service at https://ubuntu.com/esm
9 updates can be applied immediately.
To see these additional updates run: apt list --upgradable

7 additional security updates can be applied with ESM Apps.
Learn more about enabling ESM Apps service at https://ubuntu.com/esm
At least this time that's just for additional paid-for security updates. Is my best bet just to have a duplicate/dev server running and just apply updates there to see if they break the server? I'd like to start replicating this for different websites, but it seems pretty brittle :/
Joao
Joaoā€¢16mo ago
You know, I'm not entirely sure either. I have to run the upgrade command manually from time to time as well (which personally I prefer since it gives me the chance to review what's being installed/updated). It may very well be that something being installed has dependencies that need manual intervention? But, I rarely I skip any updates regardless of this and never had any issues in terms of stability. Unless you know or suspect that something like this will pose a stability issue to your sites, having secondary staging server may be overkill. You may have other reasons why having that setup may be a good idea though, for example as staging ground for upcoming updates to some of the sites you have, etc., but that's up to you. If you run apt list --upgradable do you see anything that stands out as not security related?
JWode
JWodeā€¢16mo ago
Well that's good to know about the chances of updates breaking my sites. I guess because I'm new to linux I'm confusing OS updates with updates to npm packages (that frequently break my builds) šŸ˜ Anyway, another 5 'standard security updates' just popped up. Here's the list showing that it's mainly vim this time:
apparmor/focal-updates 2.13.3-7ubuntu5.2 amd64 [upgradable from: 2.13.3-7ubuntu5.1]
bind9-dnsutils/focal-updates 1:9.16.1-0ubuntu2.14 amd64 [upgradable from: 1:9.16.1-0ubuntu2.12]
bind9-host/focal-updates 1:9.16.1-0ubuntu2.14 amd64 [upgradable from: 1:9.16.1-0ubuntu2.12]
bind9-libs/focal-updates 1:9.16.1-0ubuntu2.14 amd64 [upgradable from: 1:9.16.1-0ubuntu2.12]
bolt/focal-updates 0.9.1-2~ubuntu20.04.2 amd64 [upgradable from: 0.9.1-2~ubuntu20.04.1]
cloud-init/focal-updates 23.1.1-0ubuntu0~20.04.1 all [upgradable from: 22.4.2-0ubuntu0~20.04.2]
libapparmor1/focal-updates 2.13.3-7ubuntu5.2 amd64 [upgradable from: 2.13.3-7ubuntu5.1]
libunwind8/focal-updates 1.2.1-9ubuntu0.1 amd64 [upgradable from: 1.2.1-9build1]
update-notifier-common/focal-updates 3.192.30.17 all [upgradable from: 3.192.30.16]
vim-common/focal-security 2:8.1.2269-1ubuntu5.13 all [upgradable from: 2:8.1.2269-1ubuntu5.12]
vim-runtime/focal-security 2:8.1.2269-1ubuntu5.13 all [upgradable from: 2:8.1.2269-1ubuntu5.12]
vim-tiny/focal-security 2:8.1.2269-1ubuntu5.13 amd64 [upgradable from: 2:8.1.2269-1ubuntu5.12]
vim/focal-security 2:8.1.2269-1ubuntu5.13 amd64 [upgradable from: 2:8.1.2269-1ubuntu5.12]
xxd/focal-security 2:8.1.2269-1ubuntu5.13 amd64 [upgradable from: 2:8.1.2269-1ubuntu5.12]
apparmor/focal-updates 2.13.3-7ubuntu5.2 amd64 [upgradable from: 2.13.3-7ubuntu5.1]
bind9-dnsutils/focal-updates 1:9.16.1-0ubuntu2.14 amd64 [upgradable from: 1:9.16.1-0ubuntu2.12]
bind9-host/focal-updates 1:9.16.1-0ubuntu2.14 amd64 [upgradable from: 1:9.16.1-0ubuntu2.12]
bind9-libs/focal-updates 1:9.16.1-0ubuntu2.14 amd64 [upgradable from: 1:9.16.1-0ubuntu2.12]
bolt/focal-updates 0.9.1-2~ubuntu20.04.2 amd64 [upgradable from: 0.9.1-2~ubuntu20.04.1]
cloud-init/focal-updates 23.1.1-0ubuntu0~20.04.1 all [upgradable from: 22.4.2-0ubuntu0~20.04.2]
libapparmor1/focal-updates 2.13.3-7ubuntu5.2 amd64 [upgradable from: 2.13.3-7ubuntu5.1]
libunwind8/focal-updates 1.2.1-9ubuntu0.1 amd64 [upgradable from: 1.2.1-9build1]
update-notifier-common/focal-updates 3.192.30.17 all [upgradable from: 3.192.30.16]
vim-common/focal-security 2:8.1.2269-1ubuntu5.13 all [upgradable from: 2:8.1.2269-1ubuntu5.12]
vim-runtime/focal-security 2:8.1.2269-1ubuntu5.13 all [upgradable from: 2:8.1.2269-1ubuntu5.12]
vim-tiny/focal-security 2:8.1.2269-1ubuntu5.13 amd64 [upgradable from: 2:8.1.2269-1ubuntu5.12]
vim/focal-security 2:8.1.2269-1ubuntu5.13 amd64 [upgradable from: 2:8.1.2269-1ubuntu5.12]
xxd/focal-security 2:8.1.2269-1ubuntu5.13 amd64 [upgradable from: 2:8.1.2269-1ubuntu5.12]
Joao
Joaoā€¢16mo ago
The whole point of distributions like Debian and Ubuntu is that they are very stable. You will not get the latest packages out of the default repositories precisely because of this, which is both good and bad depending on how you look at it (good for stability, bad for latest and greatest features of packages). In production servers, I prefer stability but on my local machine I have what's known as a "rolling distribution" which is the opposite: frequent updates with latest patches that from time to time do break things.
JWode
JWodeā€¢16mo ago
nice one, thanks šŸ™‚
Joao
Joaoā€¢16mo ago
I actually got the same, the only ones that show for me are vim and xdd as manual updates (I'm running Ubuntu 20.04 still so that may explain the difference). vim is just a text editor and xxd if I'm not mistaken it's used for debugging? I'm not sure never really used it. So there's not security involved there (unless nothing that I would consider critical). The other dependencies looks more "critical" in the sense that are much more involved and used by other programs in the background, but again they may be minor updates not directly related to security. In short, I would not worry too much about it šŸ™‚
I guess because I'm new to linux I'm confusing OS updates with updates to npm packages (that frequently break my builds) šŸ˜
I missed this part actually. When it comes to updating your app, that may be a good reason to have a separate environment where you test these updates. One thing that may pose an issue here is if you are running Node.js version 16.x but you just updated some package that uses a feature only available on Node 18.x, for example. So yeah, it's important to keep track of these things to understand what causes compatibility and security issues. If you are using Docker this can be handled much better because you can use containers with very specific package versions running, as needed. But that's a whole other topic and you'd still have to watch out for OS-level updates anyway.
JWode
JWodeā€¢16mo ago
Yeah, but I'm skilled at breaking my node apps XD Not so much with Linux (which is why it worries me more) But god, yeah I'm going to have to look into a Docker/k8, because there's no way I'm manually updating each site I make, especially given that i'll probably be dealing with older dev environments. There has to be a better way!
Unknown User
Unknown Userā€¢15mo ago
Message Not Public
Sign In & Join Server To View
JWode
JWodeā€¢15mo ago
@zoetsullivan nah I didn't i'm afraid. when i do i'll try to remember to pop it in here
Joao
Joaoā€¢15mo ago
@zoetsullivan @NickW I missed the first line where you asked for linux discord servers šŸ˜„ But you can try these ones: https://discord.gg/machine-701530051140780102 https://discord.gg/engineerman
JWode
JWodeā€¢15mo ago
Ah nice, thanks @joao6246