Extend listener thread port specification to support ranges#3686
Merged
rhc54 merged 1 commit intoopenpmix:masterfrom Oct 3, 2025
Merged
Extend listener thread port specification to support ranges#3686rhc54 merged 1 commit intoopenpmix:masterfrom
rhc54 merged 1 commit intoopenpmix:masterfrom
Conversation
Particularly when the host system is closing ports for security purposes, we can face a situation where we know the range of ports available for the server's listener thread, but not necessarily the specific port to be used. So extend the port specification interface to allow passing of a comma-delimited set of port ranges, and then try those until we find the first one that works. Note that the MCA param method for passing the port did not require any change as that is always just a string that we parse to extract the port number(s). However, we have extended the value for the PMIX_TCP_IPV4_PORT and PMIX_TCP_IPV6_PORT attributes so that: * if the value is of type PMIX_INT, then treat the value as a distinct port number to be used * if the value is of type PMIX_STRING, then treat it as a comma-delimited list of port ranges (e.g., "2,13-25,32") In other words, those two attributes can now contain either a PMIX_INT or a PMIX_STRING value. Signed-off-by: Ralph Castain <rhc@pmix.org>
Contributor
Author
|
@lipixx Per your request |
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.
Particularly when the host system is closing ports for security purposes, we can face a situation where we know the range of ports available for the server's listener thread, but not necessarily the specific port to be used. So extend the port specification interface to allow passing of a comma-delimited set of port ranges, and then try those until we find the first one that works.
Note that the MCA param method for passing the port did not require any change as that is always just a string that we parse to extract the port number(s). However, we have extended the value for the PMIX_TCP_IPV4_PORT and PMIX_TCP_IPV6_PORT attributes so that:
if the value is of type PMIX_INT, then treat the value as a distinct port number to be used
if the value is of type PMIX_STRING, then treat it as a comma-delimited list of port ranges (e.g., "2,13-25,32")
In other words, those two attributes can now contain either a PMIX_INT or a PMIX_STRING value.