Repository navigation
HDDS-17195. Ozone RPC client ignores ipc.client.bind.wildcard.addr when binding to the Kerberos principal host - #11681
Conversation
…en binding to the Kerberos principal host Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@smengcl I added a test-only regression commit on top of this PR: jojochuang@e8ec942 Branch:
Confirmed regression: restoring the original line makes the Generated-by: Codex (GPT-6) |
Co-authored-by: Codex (GPT-6) Change-Id: I6c11c3eb1d588d236a3e47116c0e3bb5f227cf1e
|
@jojochuang Thanks for the test! |
|
I triggered CI 3 times, all ended up time out after 2.5 hr. |
Looks to be the change breaking ozone client on Hadoop 2. let me check |
…ress NetUtils.bindToLocalAddress does not exist in Hadoop 2, which the Ozone filesystem jar for Hadoop 2 uses at runtime. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks @jojochuang for the review. |
Generated-by: Claude Code (Opus 5.5), Codex (GPT-6)
What changes were proposed in this pull request?
Ozone carries its own copy of the Hadoop RPC client (
org.apache.hadoop.ipc_.Client). In secure mode, when the protocol has@KerberosInfo,Connection.setupConnectionbinds the client socket to the local address of the host in the caller's Kerberos principal before connecting.Hadoop lets operators turn that off with
ipc.client.bind.wildcard.addr=true. Ozone's copy reads the flag intobindToWildCardAddressand computesbindTo, but then binds tolocalAddranyway, so the flag has no effect.On a dual stack host this breaks service to service RPC (OM to SCM, datanode to SCM, SCM to SCM) when the target is configured with an IPv6 literal: the principal's host name resolves to IPv4 first, so the socket is bound to an IPv4 address and then connects to an IPv6 address. The reverse combination fails the same way.
This change binds the socket to the existing
bindTovariable, which isnull(wildcard) when the flag is set. Upstream Hadoop callsNetUtils.bindToLocalAddressfor this, but that method is missing in Hadoop 2, and the Ozone filesystem jar for Hadoop 2 uses the Hadoop 2NetUtilsat runtime. With the default (false), behavior is unchanged.What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-17195
How was this patch tested?
Added
TestClient.testKerberosSocketBinding, which runs the real connection setup with a mocked socket and Kerberos identity for both values ofipc.client.bind.wildcard.addr. Without the fix, thetruecase fails. Checkstyle passes locally. CI.🤖 Generated with Claude Code