Understanding Linux Releases and Upgrades

Posted in software by Christopher R. Wirz on Tue Aug 03 2021

I have recently decided to update my edge computing cluster to get to modern releases of Docker and Kubernetes. That's good practice, right? I can benefit from security and performance updates. TLDR; I'm not up and running with the latest stable release.

A few things surprised me. First, I had to upgrade the Ubuntu operating system (do-release-upgrade), but that shouldn't have surprised me too much. Second, Docker's release notes are still stating compatibility with Ubuntu 18.x. I mean; don't get me wrong. I am happy that they still support a 3 year old operating system, but it seems the community is very mixed on this. Third, despite having the documented compatible operating system installed, both Docker and Kubernetes now fail to launch after upgrading to the latest stable relase.

Okay, so what is up? I'm playing by the rules. Or am I? Well, despite upgrading the operating system to Ubuntu 18.04, the Linux kernel did not update as well. Why would that be?

When you think about it, the kernel is the main component of a Linux operating system that is the core interface between a computer's hardware and its processes. It is basically the API for a Linux-based operating system to use to talk to the hardware and core (high-speed) features. It communicates between the operating system and hardware, managing resources as efficiently as possible. The kernel controls all the major functions of the hardware, whether a phone, laptop, server, or any other kind of computer. So should it upgrade with the operating system? Maybe not by default.

By definition, upgrading the operating system is not upgrading a kernel. In most cases you don't compile kernels for Ubuntu because Ubuntu kernels and mainline kernels are available as binaries. You need to compile a kernel only if you want to change something in the sources. Generally it is not recommended to install another major kernel version without a specific reason.

sudo apt dist-upgrade doesn't upgrade Ubuntu release. It upgrades all packages including kernel to the latest version for the current release.

As it turns out, while my hardware hasn't changed, some high-speed features of the kernel have changed (mainly added). You can check your kernel version using uname -r in Ubuntu or uname -a in Red Hat. You can re-compile your kernel and add features you need - increasing functionality at the cost of speed. While this might add a few things that the latest Kubernetes and Docker releases need, it won't get you features that only exist in later versions of the kernel.

So why is Docker targeting Ubuntu 18.x (still)? Let's see the version history of the Linux Kernel, Ubuntu, and Red Hat (the two main Linux flavors I use). Ubuntu takes a strategy of targeting the latest and greatest kernel with each release while RedHat picks a kernel and doesn't change it thought each major RedHat release. This means software that works in RedHat 8.x will probably work in any RedHat 8.x instance, while you really need to stick with a specific Ubuntu version just to be safe.



Linux KernelLinux Kernel
Release Date
Ubuntu VersionUbuntu
Release Date
RHEL versionRHEL
Release Date
5.192022-07-3122.102022-10-20
5.152021-10-3122.042022-04-21
5.142021-08-299.x2022-05-17
5.112021-02-1421.042021-04-22
5.082020-08-0220.12020-10-22
5.042019-11-2420.042020-04-23
5.032019-09-1519.12019-10-17
52019-03-0319.042019-04-18
4.182018-08-1218.12018-10-188.x2019-05-07
4.152018-01-2818.042018-07-26
4.132017-09-0317.12017-10-19
4.102017-02-1917.042017-04-13
4.082016-09-2516.12016-10-13
4.042016-01-1016.042016-04-21
4.022015-08-3015.12015-10-22
3.192015-02-0815.042015-04-23
3.162014-08-0314.12014-10-23
3.132014-01-1914.042014-04-17
3.112013-09-0213.12013-10-17
3.102013-06-307.x2014-06-09
3.082013-02-1813.042013-04-25
3.052012-07-2112.12012-10-18
3.022012-01-0412.042012-04-26
32011-07-2111.12011-10-13
2.6.382011-03-1411.042011-04-28
2.6.352010-08-0110.12011-04-28
2.6.322009-12-0210.042010-04-296.x2010-11-09
2.6.312009-09-099.12009-10-29
2.6.282008-12-249.042009-04-23
2.6.272008-10-098.12008-10-30
2.6.242008-01-248.042008-04-24
2.6.222007-07-087.12007-10-18
2.6.202007-02-047.042007-04-19
2.6.182006-09-205.x2007-03-15
2.6.172006-06-176.12006-10-26
2.6.152006-01-026.062006-06-01
2.6.122005-06-185.12005-10-12
2.6.102004-12-175.042005-04-08
2.6.092004-11-084.x2005-02-15
2.6.082004-08-134.12004-10-20


Now things are a little more clear. Instead of stating compatibility with Ubuntu 18.x, Docker and Kubernetes are actually compatible with Linux Kernel >=4.15. This is probably so they will work with RedHat 8.x. I guess we know which part of the Docker community isn't upset by documented compatibility with Ubuntu 18.x - but then again they might be upset because the documentation isn't more focused on RedHat.

Oh, and if the folks at Docker are reading this, please update your documentation.

References

https://askubuntu.com/questions/517136/list-of-ubuntu-versions-with-corresponding-linux-kernel-version
https://wiki.ubuntu.com/Releases
https://en.wikipedia.org/wiki/Ubuntu_version_history
https://access.redhat.com/articles/3078