fix(swebench-service): let srun find its config and honour proxy policy - #452
fix(swebench-service): let srun find its config and honour proxy policy#452leopck wants to merge 1 commit into
Conversation
|
MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅ |
d8d8f73 to
3b9ccf5
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #452 +/- ##
=======================================
Coverage ? 80.98%
=======================================
Files ? 150
Lines ? 20208
Branches ? 0
=======================================
Hits ? 16366
Misses ? 3842
Partials ? 0 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
The Pyxis runtime builds each container step's environment from an explicit allow-list, and two variables that srun and enroot genuinely need were missing. Neither failure is visible in a unit test, because both live in the environment handed to a subprocess we mock. SLURM_CONF. Without it the child srun falls back to /etc/slurm/slurm.conf. On a configless site that file does not exist and srun aborts with "Could not establish a configuration source"; on a multi-cluster site it exists but is a different cluster's file whose plugins are not installed locally, and srun aborts with "failed to initialize cli_filter plugin". Either way every step dies before a container is created, and the run reports only the generic "Pyxis infrastructure failure before the command completed". The remaining SLURM_* variables stay out of the allow-list deliberately: inheriting SLURM_JOB_ID / SLURM_STEP_ID is exactly what breaks a nested srun, which is why the allow-list exists. Proxy policy. enroot performs the registry pull inside the step, so it needs the same proxy configuration as the caller. A site that pins a container-cache proxy system-wide will 403 the CONNECT for any registry outside that cache's allow-list, and every per-instance image import fails with "curl: (56) CONNECT tunnel failed, response 403" -- including the SWE-bench task images this runtime is built to pull. Verified on a GB200 cluster whose enroot pins a container cache: before the change no sweb.eval.arm64 image could be imported from any node; after it, the image imports and the container starts.
3b9ccf5 to
eb6330c
Compare
tianmu-li
left a comment
There was a problem hiding this comment.
Comments can be trimmed a bit.
arekay-nv
left a comment
There was a problem hiding this comment.
One aspect to think about is not passing the variables to the SWEBench environment which can further harden it.
Also, can you add some tests to ensure that the env-vars are being passed as expected. And if we want to isolate the SWEBench environment, the corresponding tests there too.
| "no_proxy", | ||
| "HTTP_PROXY", | ||
| "HTTPS_PROXY", | ||
| "NO_PROXY", |
There was a problem hiding this comment.
minor : missing all_proxy/ALL_PROXY which can be set in some envs.
There was a problem hiding this comment.
oh thanks, forgot about them
The Pyxis runtime builds each container step's environment from an explicit allow-list, and two variables that srun and enroot genuinely need were missing. Neither failure is visible in a unit test, because both live in the environment handed to a subprocess we mock.
SLURM_CONF. Without it the child srun falls back to /etc/slurm/slurm.conf. On a configless site that file does not exist and srun aborts with "Could not establish a configuration source"; on a multi-cluster site it exists but is a different cluster's file whose plugins are not installed locally, and srun aborts with "failed to initialize cli_filter plugin". Either way every step dies before a container is created, and the run reports only the generic "Pyxis infrastructure failure before the command completed". The remaining SLURM_* variables stay out of the allow-list deliberately: inheriting SLURM_JOB_ID / SLURM_STEP_ID is exactly what breaks a nested srun, which is why the allow-list exists.
Proxy policy. enroot performs the registry pull inside the step, so it needs the same proxy configuration as the caller. A site that pins a container-cache proxy system-wide will 403 the CONNECT for any registry outside that cache's allow-list, and every per-instance image import fails with "curl: (56) CONNECT tunnel failed, response 403" -- including the SWE-bench task images this runtime is built to pull.
Verified on a GB200 cluster whose enroot pins a container cache: before the change no sweb.eval.arm64 image could be imported from any node; after it, the image imports and the container starts.
What does this PR do?
Type of change