Skip to content

Extend listener thread port specification to support ranges#3686

Merged
rhc54 merged 1 commit intoopenpmix:masterfrom
rhc54:topic/ptl
Oct 3, 2025
Merged

Extend listener thread port specification to support ranges#3686
rhc54 merged 1 commit intoopenpmix:masterfrom
rhc54:topic/ptl

Conversation

@rhc54
Copy link
Contributor

@rhc54 rhc54 commented Oct 3, 2025

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.

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>
@rhc54
Copy link
Contributor Author

rhc54 commented Oct 3, 2025

@lipixx Per your request

@rhc54 rhc54 merged commit 421f60b into openpmix:master Oct 3, 2025
26 checks passed
@rhc54 rhc54 deleted the topic/ptl branch October 3, 2025 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant