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

Make ldms_xprt_listen_by_name() prefers IPv6. #1333

Merged

Conversation

narategithub
Copy link
Collaborator

ldms_xprt_listen_by_name() listened to 0.0.0.0 IPv4 address by default if host is NULL. This patch made
ldms_xprt_listen_by_name() to fully rely on getaddrinfo() in resolving the addresses, and then we pick the first IPv6 address. If no IPv6 addresses available, the first address returned by getaddrinfo() is used.

This has been tested with ldmsd on IPv4-only machine, and IPv4+6 machine.

On IPv4+6 machine, if the users only to listen on IPv4 addresses, they have to either provide listening address on the CLI (e.g. -x sock:411:0.0.0.0), or specify the host in config file (e.g. listen port=411 xprt=sock host=0.0.0.0).

`ldms_xprt_listen_by_name()` listened to 0.0.0.0 IPv4 address by
default if `host` is `NULL`. This patch made
`ldms_xprt_listen_by_name()` to fully rely on `getaddrinfo()` in
resolving the addresses, and then we pick the first IPv6 address. If no
IPv6 addresses available, the first address returned by `getaddrinfo()`
is used.

This has been tested with `ldmsd` on IPv4-only machine, and IPv4+6
machine.

On IPv4+6 machine, if the users only to listen on IPv4 addresses, they
have to either provide listening address on the CLI (e.g.
`-x sock:411:0.0.0.0`), or specify the host in config file (e.g.
`listen port=411 xprt=sock host=0.0.0.0`).
@narategithub narategithub requested a review from tom95858 January 19, 2024 17:05
@narategithub
Copy link
Collaborator Author

This is a patch to address #1311 .

@narategithub
Copy link
Collaborator Author

NOTE: Compatibility test failed due to ldms_ls-4.3.3 to ldmsd-4 (top-of-tree) having an issue with munge authentication. This is because ldmsd-4 sent back IPv6 munge payload, but ldms_ls-4.3.3 expects IPv4 in the payload. I'm looking into it.

@tom95858 tom95858 merged commit 1c7a8db into ovis-hpc:OVIS-4 Jan 23, 2024
14 checks passed
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.

2 participants