4 ms·
While I like the idea of atomic upgrades, the idea really should be made to work without requiring a full reboot. The update procedure could be something like:
by zokier 13y ago
While I like the idea of atomic upgrades, the idea really should be made to work without requiring a full reboot. The update procedure could be something like:
1) updater makes a private snapshot of the filesystem
2) updater writes its changes to the private snapshot while the rest of the system gets served by unchanged FS
3) updater stops affected services
4) the updated snapshot is swapped in (atomically)
5) services are restarted
- contingencies 13y agoYou outline a good approach, however filesystem is not the only state. Also you have RAM and network connections to deal with. The kernel people have been working on this using the freezer driver for control groups (cgroups). Their ultimate holy-grail type goal is portability to the point where "freeze on host A", "thaw on host B" is possible near-instantly for arbitrary code without issue. In reality, they may never get there. For now, the easiest way to reliably approach the issue is to use applications that can rapidly shut down to known consistent on-disk state, thus limiting the scope of state to block data. Designing applications/services for systems with read-only root filesystems is a good way to enforce known location of on disk state. The above is the strategy I am taking with a personal project used internally by my company which predates docker, works for arbitrary OSs and has far wider scope. With regards to block data, I took a different approach to docker, namely using LVM2 LVs instead of aufs. The limitation of LVM2 LVs is snapshot is possible, but not yet snapshot-of-snapshot. That means whatever you want to spin up either has to be spun up slowly (ie. not from a snapshot) or has to be non-snapshottable when running (due to LVM2's snapshot-of-snapshot limitation). We opt for the latter, which requires that state is not stored within the snapshot-powered system. This is good because you can power them off without fear, like conventional PXE-style diskless systems.
- wmf 13y agoA wise man once said there is no such thing as a bootable system, only systems that have booted. Many OS updates will change something in the boot process (maybe the kernel, maybe some init scripts, etc.) and you need to reboot to be sure that stuff is still working. Likewise any change that would require the user session to logout/login might as well force a full reboot.
- contingencies 13y agoMany OS updates will change something in the boot process (maybe the kernel, maybe some init scripts, etc.) and you need to reboot to be sure that stuff is still working That's precisely why a manual upgrade process should not exist for system environments. Instead of live upgrades, you name, version, and test a newer and known-good image of the environment with the applications required on it on test infrastructure prior to final staging/deployment.
- wmf 13y agoKeep in mind that some of this stuff is designed for near-zero-admin desktops, not just the cloud.
- contingencies 13y agoFair point. Strange anyone would bother though, I always thought PXE was the best desktop solution... maybe for often-offline nodes or laptops.
- wmf 13y agoSure, PXE imaging is great for enterprise desktops but people don't use it at home.