Page MenuHomePhabricator

Automated removal of obsolete kernels
Open, MediumPublic

Description

Kernel ABIs change quite often, which means that new linux-image-VERSION-ABI-amd64 packages get released which are co-installable.

We have some servers which have /boot on a separate partition, which may fill up (for most other servers it's just a bit of wasted space, but for small Ganeti VMs it can also be an issue).

We should automate the removal so that one kernel in addition to the currently running is preserved (for falling back) and unused ones are cleared. One case to consider is that some servers get rebooted less often, so there can be cases where e.g. -12- is running and -11-, -13- and -14- are installed, but unused. In this case the running kernel needs to be kept and -11- and -13- can be dropped.

With bullseye apt even does this automatically and for older apt releases we most probably grab the information from "apt-get autoremove". This should also initially be opt-in to testdrive on some systems first.

Event Timeline

With bullseye apt even does this automatically

wonder if we could backport this to buster, ignore stretch and call it done?

With bullseye apt even does this automatically

wonder if we could backport this to buster, ignore stretch and call it done?

With Buster being around for nine months (and many migrations happening much earlier) we could even focus on building this based on apt/bullseye entirely. After all, the problem has been around for quite a while and still having it for some more months on a small subset of the fleet seems fine. Backporting would be a little tricky since it's a feature in apt itself and there are no backports for dpkg.

With bullseye apt even does this automatically

wonder if we could backport this to buster, ignore stretch and call it done?

With Buster being around for nine months (and many migrations happening much earlier) we could even focus on building this based on apt/bullseye entirely. After all, the problem has been around for quite a while and still having it for some more months on a small subset of the fleet seems fine. Backporting would be a little tricky since it's a feature in apt itself and there are no backports for dpkg.

SGTM :)