Provide the ability to use SSH-forwarded Unix Domain Sockets to connect to a job agent (e.g. on NERSC) - #7620
Open
himanshugoel2797 wants to merge 11 commits into
Open
Conversation
himanshugoel2797
marked this pull request as ready for review
July 31, 2025 19:37
Member
|
@himanshugoel2797 I created branch 7640-ssh-job-agent which has big TODO's in its commit. The code has not been tested at all. Here are some bullets:
I don't have more time to spend on this right now. sim_db_file is a showstopper. To test, create a custom SRW magnet file, and try to use that. It will fail when it tries to connect to the supervisor uri. Adding a test for this case would be very useful. Global resources is not as important, but it's all using the same code (agent_supervisor_api) so both cases are fixed by changing that to use the resolver. The code will need to be shared with job_agent. |
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.
In some setups, it may not be possible to open a port to the internet for the job agent to communicate to the Sirepo server. Using SSH to forward a port can be a nice fallback for this situation. This can also eventually allow users to connect to clusters while running Sirepo locally.
We use Unix Domain Sockets (UDS) for this instead of port-to-port forwarding. This eliminates the possibility of port conflicts on the cluster, and provides better security, as the UDS can only be accessed by the user that owns it.
Instead of adding another configuration option, if the supervisor URI points to localost, while the SLURM host is not localhost, the supervisor URI is likely inaccessible and we should try to setup an SSH port forwarding over SSH.