[Draft] feat : support tmpfs provisioned volumes - #12631
Conversation
|
Hey @smira, This works just fine, But to do a test on ephemeral volume to be setup as tmpfs, we'd have to add that config before boot , i.e. during cluster creation, Any suggestions where should I look in does ephemeral volume have any role with kubelet being setup during boot 🤔 |
|
I don't think user volumes backed by The reason why |
| VolumeTypeTmpfs // tmpfs | ||
| VolumeTypeDirectory // directory | ||
| VolumeTypeSymlink // symlink | ||
| VolumeTypeOverlay // overlay | ||
| VolumeTypeExternal // external | ||
| VolumeTypeMemory // memory |
There was a problem hiding this comment.
What's the reasoning about adding memory instead reusing tmpfs? Is there functionality that will be hard to split?
There was a problem hiding this comment.
To keep validation and lifecycle semantics separate for different kinds of volumes. See #11446 (comment)
f4878c4 to
bb13a55
Compare
|
There was an issue with I'm worried that the For now, sticking in working logs for tmpfs provisioned EPHEMERAL volumes: Starting the cluster with a simple config patch as: Let me know if this approach is correct or needs changes as an initial draft , before proceeding with |
|
This PR is stale because it has been open 45 days with no activity. |
ba6acc0 to
6082ec9
Compare
| false) | ||
| ;; | ||
| *) | ||
| # Fully ephemeral node: STATE and EPHEMERAL on tmpfs. Forced single-node cluster. |
There was a problem hiding this comment.
I guess if we want to be closer to real usecase, we should have tmpfs only for workers
I think we should still test a cluster (that is more than a single worker, and at least a single controlplane)
| result := map[string]any{ | ||
| "disk": d.Disk, | ||
| "disk": d.Disk, | ||
| "system_disk": false, |
There was a problem hiding this comment.
Irrelevant changes, that was me trying to remove some warning/error noise during boot, can be removed.
6082ec9 to
ae6cc5d
Compare
| return fmt.Errorf("memory volume requires size parameter") | ||
| } | ||
|
|
||
| manager := mount.NewManager(slices.Concat( |
There was a problem hiding this comment.
do we re-create tmpfs every time we mount? this sounds wrong, e.g. for STATE: we should create tmpfs probably as part of Volume provisioning, and only mount to the tree/unmount for the lifetime of the volume
There was a problem hiding this comment.
Yes that's true.
A bit confused atm, @shanduur have you taken over the PR? I don’t want to step on your toes. Am I expected to make this change?
There was a problem hiding this comment.
@pranav767, thank you for your contribution!
We had some internal discussions about the direction where should we take it, and I had some spare time to check your branch and experiment on it a bit. It had drifted quite a bit, so I thought it might be easier if I push rebased PR with some fixes.
Do you want to continue work on this? Or do you want me to fully take it over and finish the implementation?
There was a problem hiding this comment.
I'd love to continue the work here, if explaining the internal discussions is not too much trouble for you.
There was a problem hiding this comment.
Sure! So there are two goals:
-
Tests
We need to make sure the ephemeral node is working correctly. There are two main use-cases that need to be tested. We need to go through the existing tests and find fix (or skip) tests that should not work on tmpfs-backedEPHEMERALandSTATEpartitions.- Ephemeral worker nodes in clusters - this is not tested yet - we need to add new
integration/miscsuite; - Ephemeral single node cluster - this has some basic tests already added - we need to move them to
integration/miscsuite;
- Ephemeral worker nodes in clusters - this is not tested yet - we need to add new
-
In-memory Talos
Right now there is still some space for improvement that should be deferred to next PR. Right now Talos will attempt to install itself when there is noMETApartition. This means we will still require some form of storage. But the end goal is to run Talos on devices with no storage whatsoever. This means that talos performs network boot, and if themachine.installconfig (or newv1alpha1equivalent) is missing, it proceeds to start up as a fully ephemeral in memory node acquiring it's configuration from e.g. a HTTP server. This should work only for worker nodes.
|
This PR is stale because it has been open 45 days with no activity. |
|
Hi @pranav767 ! Any updates on this PR? Should we take it over? |
|
Apologies for the delay @shanduur , you can take over. |
ae6cc5d to
0b2913c
Compare
|
Rebasing it step by step to accommodate newer features (#13655 will enable more useful configs, such as put META/STATE/ETCD on the persistent storage, but EPHEMERAL in RAM) |
Signed-off-by: Pranav Patil <pranavppatil767@gmail.com> Signed-off-by: Mateusz Urbanek <mateusz.urbanek@siderolabs.com> Signed-off-by: Dmitrii Sharshakov <dmitry.sharshakov@siderolabs.com>
0b2913c to
f3e29a6
Compare
|
The fixup commit I've added migrates to the current Kubernetes config documents |
Pull Request
Closes #11446
What? (description)
Why? (reasoning)
Acceptance
Please use the following checklist:
make conformance)make fmt)make lint)make docs)make unit-tests)