smengcl opened a new pull request, #11681: URL: https://github.com/apache/ozone/pull/11681
Generated-by: Claude Code (Opus 5.5) ## 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.setupConnection` binds 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 into `bindToWildCardAddress` and computes `bindTo`, but then binds to `localAddr` anyway, 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 uses `NetUtils.bindToLocalAddress(localAddr, bindToWildCardAddress)`, matching upstream Hadoop (available in Hadoop 3.4.3). 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? Compiled `hdds-common` and ran checkstyle locally. CI. 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
