-
Notifications
You must be signed in to change notification settings - Fork 68
orte: Expand the application of !orte_keep_fqdn_hostnames #1354
Conversation
Test PASSed. |
@jjhursey My apologies - I missed this on the master commit. There is a function for checking if a hostname is an IP address: |
So the suggestion is to replace this logic: if (0 == inet_pton(AF_INET, node_name, &buf) && 0 == inet_pton(AF_INET6, node_name, &buf)) {
if (NULL != (ptr = strchr(node_name, '.'))) {
*ptr = '\0';
}
} With this logic: if ( !opal_net_isaddr(node_name) ) {
if (NULL != (ptr = strchr(node_name, '.'))) {
*ptr = '\0';
}
} That seems cleaner to me. I didn't know about the |
@rhc54 I have a PR for I'll wait for CI, then work on bringing it into this PR. |
@jjhursey Do you have any tests for this behavior, perchance? |
* Expand the use of the `orte_keep_fqdn_hostnames` MCA parameter when it is set to false. * If that parameter is set to false (default) then short hostnames (e.g., `node01`) will match with the long hostnames (e.g., `node01.mycluster.org`). This allows a user (or resource manager) to mix the use of short and long hostnames. - Note that this mechanism does _not_ perform a DNS lookup, but instead strips off the FQDN by truncating the hostname string at the first `.` character (when not an IP address). - By default (`false`) the following is true: `node01 == node01.mycluster.org == node01.bogus.com` since we use `node01` as the hostname. (cherry picked from commit open-mpi/ompi@d26dd2c)
* Switch to use opal_net_isaddr() for checking if a name is an IP address - as it is a bit cleaner, and uses common functionality. (cherry picked from commit open-mpi/ompi@fe937d1)
I just applied the cherry-pick of open-mpi/ompi#2047 into this PR. We should probably keep these as 2 commits, since they are on the |
Test PASSed. |
I don't have any automated tests for this, but you can recreate it using rankfiles, hostfiles, and Rankfile
Dash Host (
hostfile
|
@rhc54 I think this is ready for a final review. |
Signed-off-by: Jeff Squyres <[email protected]> (cherry picked from commit open-mpi/ompi@722d5ee)
Added @jsquyres commit from PR open-mpi/ompi#2060 |
Test FAILed. |
bot:mellanox:retest |
Test FAILed. |
The mellanox failures do not look related. Mellanox CI was passing before I added Jeff's removal of an unused variable. Now it is failing in different locations all after the build when running tests. I think this is a Mellanox CI machine issue. |
bot:mellanox:retest |
Test PASSed. |
👍 |
@jsquyres I think this is ready to merge in. |
Test FAILed. |
orte_keep_fqdn_hostnames
MCA parameter whenit is set to false.
(e.g.,
node01
) will match with the long hostnames (e.g.,node01.mycluster.org
). This allows a user (or resource manager)to mix the use of short and long hostnames.
instead strips off the FQDN by truncating the hostname string at
the first
.
character (when not an IP address).false
) the following is true:node01 == node01.mycluster.org == node01.bogus.com
since we use
node01
as the hostname.(cherry picked from commit open-mpi/ompi@d26dd2c)
bot:assign: @rhc54
bot:label:enhancement
bot:milestone:v2.0.2