Skip to content

fix (MQ): support IPv4-only broker hostnames#8649

Open
hanx-hep wants to merge 1 commit into
DIRACGrid:integrationfrom
hanx-hep:fix-stomp-ipv4-only
Open

fix (MQ): support IPv4-only broker hostnames#8649
hanx-hep wants to merge 1 commit into
DIRACGrid:integrationfrom
hanx-hep:fix-stomp-ipv4-only

Conversation

@hanx-hep

@hanx-hep hanx-hep commented Jul 1, 2026

Copy link
Copy Markdown

Summary

  • resolve STOMP broker addresses with AF_UNSPEC so IPv4-only hostnames work
  • preserve the existing IPv6 preference and randomized order within each address family
  • add unit coverage for IPv4-only, dual-stack, and resolution failure cases

Root cause

The connector queried AF_INET6 before AF_INET. On systems where an IPv4-only
hostname causes the IPv6 lookup to raise socket.gaierror, setup returned early
and never attempted the valid IPv4 addresses.

The same resolution logic is present in rel-v9r0 and rel-v8r0, so this fix
should also be considered for backporting to those maintained release branches.

Validation

79 passed in 0.66s

BEGINRELEASENOTES

*Resources

FIX: Allow STOMP MQ connections to use IPv4-only broker hostnames.

ENDRELEASENOTES

@fstagni

fstagni commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Thank you for the contribution. Any reason for keeping it in draft?

@hanx-hep hanx-hep marked this pull request as ready for review July 7, 2026 09:32
@hanx-hep hanx-hep requested review from atsareg and fstagni as code owners July 7, 2026 09:32
@hanx-hep

hanx-hep commented Jul 7, 2026

Copy link
Copy Markdown
Author

Thank you for the contribution. Any reason for keeping it in draft?

Hi. No specific reason. I opened it as draft while double-checking the contribution flow. It is ready for review now.

@fstagni

fstagni commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Apart from the commit message (see failing check, this LGTM).
But, I think you want to backport this to older branches, meaning rel-v9r0 and rel-v8r0. Once done, I will merge them all together.

@hanx-hep

hanx-hep commented Jul 8, 2026

Copy link
Copy Markdown
Author

Thanks. I removed the merge commit from this PR branch and created the requested backport PRs:

The MessageQueue tests pass on both backport branches.

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.

3 participants