gardener / gardener-extension-os-gardenlinux

Gardener extension controller for the Garden Linux operating system
Apache License 2.0
9 stars 30 forks source link

In-Place Node OS Updates #120

Open vlerenc opened 1 year ago

vlerenc commented 1 year ago

Story

Motivation

We were approached by parties that, for performance reasons, use locally attached disks with data. While the data is replicated, rolling a node and re-building/syncing the local data may take hours. Doing that during a cluster rolling update may therefore take many days, which is difficult for them.

This feature is also useful in cases where the used machine type is scarce (very special machine types) and it isn't easy / guaranteed to get new machines (no reserved instances).

GardenLinux is currently developing the capability to do that. Reminiscent of CoreOS' FastPatch updates, it will have 2 partitions, run on one, prepare the other one, reboot into the other one. Persistent data is stored on yet another and preserved. This may not work with every update, but with many. The GardenLinux developers expect full rolling only to happen later every 1-2 years, but all other updates could be handled in-place once they and we are done.

This ticket here is about Gardener's part, because we do not support in-place OS updates as of now and do need to think it through and do it then, if feasible. Just for historic reference, please see here one of our very first Gardener tickets when we implemented full automated cluster updates (no. 14 for K8s v1.5 -> v1.6 - time flies) and decided at first against FastPatch (https://github.com/gardener/gardener/issues/14).

Labels

/area os /kind enhancement /os garden-linux /topology shoot

Acceptance Criteria

Enhancement/Implementation Proposal (optional)

This will require a GEP (https://github.com/gardener/gardener/tree/master/docs/proposals) as conceptional and core changes will be necessary and everything else up until the update of the versioning guide/docs. The question is also what the main actor is, i.e. will we handle this use case like we handle Kubernetes patch updates, i.e. carried out by the maintenance controller? That's probably preferred for multiple reasons (means to opt out, shoot spec lists exact version, time scatter/jiggle resp. coordinated update, etc.) over the OS doing it itself.

Further Considerations

Resources (optional)

Definition of Done

vlerenc commented 1 year ago

@unmarshall had two very valuable comments I will incorporate above:

Rolling updates provides some sort of safety net. Only when the new node is running will the old node be drained and subsequently deleted. In-place updates obviously does not offer this level of availability.

If we could have this option at machine-deployment level then that would be nice. Then for more expensive machines or machines which have lesser quota (either due to specialised extensions or high demand) can then be marked for in-place updates. For other machine-deployments it could be a std rolling-update.