Skip to content

Instantly share code, notes, and snippets.

@back-2-95
Last active August 4, 2023 10:38
Show Gist options
  • Save back-2-95/6ec9a8d9a133801146b990c1c101197d to your computer and use it in GitHub Desktop.
Save back-2-95/6ec9a8d9a133801146b990c1c101197d to your computer and use it in GitHub Desktop.
Wodby: Upgrade Debian 9 to 11

Instructions on how to do dist upgrade for Debian 9 servers used by Wodby:

First, stop all Docker related services:

systemctl stop kube-apiserver
systemctl stop kube-controller
systemctl stop kube-kubelet
systemctl stop kube-proxy
systemctl stop kube-scheduler
systemctl stop docker

Update repositories in /etc/apt/sources.list with:

deb http://deb.debian.org/debian bullseye main
deb-src http://deb.debian.org/debian bullseye main
deb http://security.debian.org/debian-security bullseye-security main
deb-src http://security.debian.org/debian-security bullseye-security main
deb http://deb.debian.org/debian bullseye-updates main
deb-src http://deb.debian.org/debian bullseye-updates main
deb http://deb.debian.org/debian bullseye-backports main
deb-src http://deb.debian.org/debian bullseye-backports main

And the do the dist upgrade (when prompted, answer YES or select default option):

apt update
apt dist-upgrade -y

Update iptables path in /etc/systemd/system/docker.service.d/iptables.conf

Validate dist upgrade and check the it says "Debian GNU/Linux 11 (bullseye)":

cat /etc/os-release

Debian 11 has cgroup2 enabled that not currently supported by the docker version Wodby uses, so you should disable it:

  • Edit /etc/default/grub and add systemd.unified_cgroup_hierarchy=0 to GRUB_CMDLINE_LINUX_DEFAULT (or GRUB_CMDLINE_LINUX if it's not present)
  • Run update-grub
  • Also check that /lib/systemd/system/kube-kubelet.service has a flag --cgroups-per-qos=false

And lastly, reboot:

reboot now

After getting back to server with SSH:

Check that services are starting:

docker ps --format "table {{.Names}}\t{{.Status}}"

On the Wodby UI check that server Status is Ok

Finally you can do cleanup:

apt --purge autoremove
apt purge `dpkg -l | grep "deb9" | awk '{print $2}'`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment