You need to pin a package version so routine updates don't upgrade it (e.g. Docker or PostgreSQL). How?
BeginnerScenarioPackages, kernel and boot
Answer
Situation read → Version locking per package manager.
What I'd do →
- RHEL:
sudo dnf install 'dnf-command(versionlock)'thensudo dnf versionlock add docker-ce(dnf versionlock list,deleteto remove). - Debian/Ubuntu:
sudo apt-mark hold docker-ce(apt-mark showhold,unhold).
Why → Uncontrolled major upgrades of stateful software cause outages.
Interview tip → Remember to unhold for security patches; a forgotten hold is technical debt.
More on Packages, kernel and boot
You must upgrade the kernel on 50 production servers and be able to roll back if the new kernel misbehaves. Plan it.AdvancedA package update broke an application. How do you roll it back?IntermediateYour servers can't reach the internet but need packages. How do you provide repositories?IntermediateYou need to compile and install software from source on a server that also uses packages. How do you avoid making a mess?IntermediateYou need to change kernel boot parameters (e.g. add `transparent_hugepage=never`) persistently. How?IntermediateA server must apply kernel security patches without rebooting. What are your options?Advanced