Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accept multi-token interchange launch commands #3543

Merged
merged 2 commits into from
Jul 30, 2024

Conversation

rjmello
Copy link
Member

@rjmello rjmello commented Jul 25, 2024

Description

We now accept a string or a list of strings for interchange_launch_cmd to support multi-token commands.

We also no longer encode the interchange launch command before passing it to subprocess.Popen() because strings are sufficient.

Type of change

  • Bug fix

@rjmello rjmello added bug executor:htex globus-compute Issues that globus-compute team might be interested in fixing labels Jul 25, 2024
@benclifford
Copy link
Collaborator

this is repeatedly failing in CI with failures that look race-condition like to me - for example, like #3540

Maybe it's bad luck, maybe this change happens to stir up those race conditions a bit more.

@rjmello rjmello force-pushed the rjmello-ix-proc-shell branch from a544153 to 2683059 Compare July 29, 2024 21:44
@rjmello rjmello changed the title Accept more complex interchange launch commands Accept multi-token interchange launch commands Jul 29, 2024
@rjmello rjmello force-pushed the rjmello-ix-proc-shell branch 2 times, most recently from c22fa60 to 2033cd5 Compare July 30, 2024 13:19
@rjmello
Copy link
Member Author

rjmello commented Jul 30, 2024

Maybe it's bad luck, maybe this change happens to stir up those race conditions a bit more.

Yeah, I think you're right; the additional shell process could be the culprit. I went this route to match how the LocalChannel launches the worker pool, but I think the simpler, more secure approach is to accept a list of command tokens rather than rely on an additional shell process to interpret the command. We may want to consider doing the same for the worker pool launch command.

@benclifford
Copy link
Collaborator

I don't have any strong opinions either way - security wise from a pure Parsl perspective the config is trusted, although I appreciate that in Globus Compute multi-user land that might not be so (and there you have to make your own arguments).

I do feel that the Parsl test suite should be resilient to this kind of change though - it's shouldn't be breaking just because of some irrelevant process related administrivia like this.

@rjmello
Copy link
Member Author

rjmello commented Jul 30, 2024

I agree, but I think we should address that longstanding issue in a subsequent PR.

@benclifford
Copy link
Collaborator

benclifford commented Jul 30, 2024

could make this only take a sequence of strings, and remove the before-this-PR accept-one-string behaviour? I don't think backwards compatibility matters too much here and it would remove the complexity of having two options - one option that isn't very interesting and is probably confusing for a user trying to specify "my-interchange --myopt" as a string, which doesn't work but does typecheck.

rjmello added 2 commits July 30, 2024 11:13
`Popen` does not require byte strings.
`subprocess.Popen()` requires that multi-token commands be expressed as
a sequence of strings.
@rjmello rjmello force-pushed the rjmello-ix-proc-shell branch from 2033cd5 to 06fc17d Compare July 30, 2024 15:21
@rjmello
Copy link
Member Author

rjmello commented Jul 30, 2024

If we aren't worried about backwards compatibility, then I definitely agree. Just pushed an update.

@benclifford
Copy link
Collaborator

i don't think it's a concern -- this only appears in #3514 released earlier this month and I haven't heard of or imagined anyone wanting to use it apart from the specific use case you are trying to address with Globus Compute.

@benclifford benclifford removed the bug label Jul 30, 2024
@benclifford benclifford merged commit 64e163c into master Jul 30, 2024
7 checks passed
@benclifford benclifford deleted the rjmello-ix-proc-shell branch July 30, 2024 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
executor:htex globus-compute Issues that globus-compute team might be interested in fixing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants