You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Browse filesBrowse the repository at this point in the historyBrowse files
committed
Wait for MPS daemon .ready before advertising shared resources
The device plugin's waitForDaemon only ran a single AssertHealthy check
before serving and registering the resource with kubelet. AssertHealthy
issues get_default_active_thread_percentage, which only proves the MPS
control pipe is responsive — and the pipe becomes responsive at
Daemon.Start (mpsControlBin -d) before the per-device pinned memory
limits and active thread percentage are applied. A pod scheduled in
that window starts against MPS with the daemon defaults (no pinned
memory limit, 100% threads) rather than the configured limits,
silently bypassing the intended isolation.
The MPS control daemon already creates a node-global .ready file, but
only after every daemon's full initialization completes. Nothing
consumed it (the two TODOs in waitForDaemon noted exactly this), so the
readiness signal was unused.
Gate readiness on that file:
- Add Root.ReadyFilePath so the marker path has a single definition,
and use it in the MPS control daemon for both create and remove
instead of the hardcoded "/mps/.ready".
- Add Daemon.Ready, which reports whether the .ready file exists.
- Rewrite waitForDaemon to poll checkDaemonReady (Ready AND
AssertHealthy) every 5s up to a 5m bound, replacing the single
unconditional AssertHealthy. On timeout the caller fails and is
retried by the plugin manager, so the bound is per-attempt.
This closes both TODOs and ensures shared MPS resources are not
advertised until the daemon is fully configured.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: runatom-ai <258621014+runatom-ai@users.noreply.github.com>
Signed-off-by: Jonathan Meiri <33288957+Meiri28@users.noreply.github.com>
0 commit comments