Fix MPS config-manager PROCESS_TO_SIGNAL target matching#1827
Open
justinas-wix wants to merge 1 commit into
Open
Fix MPS config-manager PROCESS_TO_SIGNAL target matching#1827justinas-wix wants to merge 1 commit into
justinas-wix wants to merge 1 commit into
Conversation
Match PROCESS_TO_SIGNAL against argv[0] basename so the sidecar can SIGHUP mps-control-daemon when shareProcessNamespace is enabled (enableHostPID: false). Use "mps-control-daemon" in the MPS control daemon Helm template instead of "/usr/bin/mps-control-daemon". Co-authored-by: Cursor <cursoragent@cursor.com> Signed-off-by: Justinas Koreiva <justinask@wix.com>
34f3f81 to
e432698
Compare
Author
|
Hey not sure who to tag for review so just trying: |
Contributor
|
Thanks @justinas-wix ! This looks good to me. Can you update your PR branch and also ensure your commits are signed? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes
mps-control-daemon-sidecar(config-manager) exiting when it sends SIGHUP after updating the MPS config symlink.Problem
Helm sets
PROCESS_TO_SIGNAL=/usr/bin/mps-control-daemon, but the container runscommand: [mps-control-daemon], soargv[0]ismps-control-daemon.findPidToSignalcomparescmdline[0]to the target with an exact string match. That fails, returnsno process found, and the sidecar crashes (CrashLoopBackOff). This happens wheneverSEND_SIGNALruns after a real config update (including common startup races where the sidecar briefly appliesDEFAULT_CONFIGbefore the node label is seen).Fix
cmd/config-manager/main.go: match by exact string or basename (mps-control-daemon↔/usr/bin/mps-control-daemon)PROCESS_TO_SIGNALtomps-control-daemonRelated
/procentries with empty cmdline: fix index out of range panic in findPidToSignal #1822Test plan
nvidia.com/device-plugin.configset toconfig-1andconfig-2mps-control-daemon-sidecaris 2/2 Ready after pod create (nono process found)readlink -f /config/config.yamlinmps-control-daemon-ctrmatches the node label