smengcl opened a new pull request, #11541:
URL: https://github.com/apache/ozone/pull/11541

   Generated-by: Claude Code (Opus 5.5)
   
   ## What changes were proposed in this pull request?
   
   `HddsServerUtil.getValidInetsForCurrentHost` collects the IP addresses for 
the subject alternative names of a certificate. 
`NetworkInterface.getInetAddresses()` returns every IPv6 address with the 
interface as scope, also global and unique local ones (for example 
`fd00:172:25:0:0:0:0:102%eth0`), and `isScopedOrMaskingIPv6Address` rejects any 
address whose text contains `%`. So no IPv6 address ever reaches a certificate.
   
   On an IPv6-only host the certificates then have DNS names only, and every 
TLS connection that verifies the peer by IP address fails:
   
   ```
   CertificateException: No subject alternative names matching IP address 
fd00:172:25:0:0:0:0:104 found for SNIHostName=null and 
peerHost=[fd00:172:25:0:0:0:0:104] ...
   ```
   
   * Datanode Ratis: no pipeline gets a leader, so SCM stays in safe mode.
   * SCM follower checkpoint download from the leader, since 
`SCMSnapshotProvider` connects to the leader by IP address.
   
   The patch drops the scope from IPv6 addresses that are not link local before 
the existing check. Link-local addresses keep the scope and stay excluded, as 
before.
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-16970
   
   ## How was this patch tested?
   
   * New unit test in `TestHddsServerUtils` for a scoped routable address, a 
scoped link-local address and an IPv4 address.
   * `ozonesecure-ha` compose cluster on an IPv6-only network (the secure smoke 
test of HDDS-16971), with datanodes addressed by IP: certificates now contain 
the IPv6 address (`Adding ip:fd00:172:25:0:0:0:0:102`), SCM leaves safe mode, 
the SCM checkpoint download succeeds, and all 14 suites pass. Without the patch 
the same cluster never leaves safe mode.
   
   🤖 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]

Reply via email to