Support Read-Only, systemd-less Systems#382
Conversation
Add flag to skip all host-mutating operations Signed-off-by: Alessandro Vinciguerra <alessandro.vinciguerra@postfinance.ch>
Add flag to skip all systemd operations Signed-off-by: Alessandro Vinciguerra <alessandro.vinciguerra@postfinance.ch>
|
Just want to add my feedback to this. I just tested this with the following setup: Environment:
I had to build a new k8s-mig-manager based on @Arc676 repo. I then pushed it to docker.io/linkages/k8s-mig-manager:v0.14.1. Then when I deploy the gpu-operator, I set the values for the helm chart using this: driver:
enabled: false
toolkit:
enabled: false
hostPaths:
driverInstallDir: /usr/local
mig:
strategy: mixed
migManager:
enabled: true
repository: docker.io/linkages
version: v0.14.1
env:
- name: READONLY_ROOTFS
value: "true"
- name: SYSTEMD_UNAVAILABLE
value: "true"
operator:
cleanupCRD: trueI then set the This was tested on 2 different types of nodes in the same cluster: 2 x Lenovo nodes with 8 x NVIDIA RTX PRO 6000 Blackwell Server Edition GPUs Thank you @Arc676 for this patch. I hope it or a more elegant version of this gets pulled upstream. For now this solves my problem. |
Motivation
Informally, this PR adds (partial) support for Talos. Closes #356.
More formally, this PR adds support for systems with read-only filesystems and systems that do not run
systemd.Description
The MIG manager assumes that it will be able to copy the
mig-partedbinary to the host and usesystemdto restart host-side GPU services. Neither of these is true for Talos, which is an immutable OS that doesn't runsystemd. Proper Talos support would introduce a dependency on the Talos API, but that is beyond the scope of this PR and likely falls beyond the scope of what this tool should support.This PR adds support for systems like Talos by introducing two new flags (both of which are required for Talos):
systemd: tell the manager to skip allsystemdoperations that would otherwise cause the program to hang, since there would be no response on DBusThis PR includes
nil-checks for thesystemdmanager that were not present before. In the original code, these checks are effectively unnecessary because this member is always initialized and the entire program blocks on this initialization ifsystemdis not present.Improvements
This is the simplest possible solution to the problem described in the linked issue. All the MIG- and GPU-related operations work fine1 on Talos. We simply need to skip over the parts that can't work on Talos. The obvious alternatives or improvements over this PR are:
systemd, either by inspecting the running processes or by introducing a timeout on the DBus connection, and adjusting accordingly, instead of requiring a flagCaveats
This PR exists more for discussion than with the goal of being merged. These changes were made based on a very cursory reading and superficial understanding of the MIG manager. There is likely a cleaner and more elegant way to achieve this. However, I'll submit the patch as a proof-of-concept: by disabling the host-copies and all
systemdfeatures, the MIG manager works properly on Talos. This is, at least for us, an important starting point.Footnotes
CUDA validation yields
ERROR: init 250 result=11s. I haven't yet figured out what this means, but so far it hasn't impacted the use of the GPU. The GPU workloads still run fine, as does the CUDA validation pod. ↩