smengcl opened a new pull request, #8879: URL: https://github.com/apache/hadoop/pull/8879
Generated-by: Claude Code (Opus 5.5) JIRA: https://issues.apache.org/jira/browse/HADOOP-20030 ### Description of PR The default surefire configuration sets `java.net.preferIPv4Stack=true`, so test JVMs cannot use IPv6 and nothing in CI runs servers or clients over IPv6. For example, `TestMiniDFSCluster#testBindHostIPv6Loopback` (HDFS-17998) is always skipped. This change: - Adds an opt-in `ipv6-test` profile in `hadoop-project/pom.xml` that sets `java.net.preferIPv4Stack=false` and `java.net.preferIPv6Addresses=true` for surefire. Other surefire system properties are kept, and the default build is unchanged. - Adds `.github/workflows/ipv6.yml`, which builds `hadoop-common`, `hadoop-hdfs-client` and `hadoop-hdfs` and runs a selected list of tests under the profile. It runs on `pull_request` (filtered to those modules, `hadoop-project/pom.xml` and the workflow itself) and on `workflow_dispatch`, with read-only permissions. It needs only the IPv6 loopback address, so hosted runners work. The list only has tests that pass on an IPv6 preferring JVM. Running more of the IPv6 related tests under the profile showed two existing gaps, which are left for follow-ups: - Most `MiniDFSCluster` based tests (for example `TestWebHdfsDataLocality`, `TestSaslDataTransfer`) fail. `localhost` resolves to `::1`, so DataNodes register with the NameNode as `[::1]`, but their transfer port binds to `127.0.0.1` by default, and clients get "Connection refused". - Some `TestNetUtils` and `TestSecurityUtil` cases expect `localhost` to resolve to `127.0.0.1`. The docker compose smoke test mentioned in the JIRA as optional is not included. ### How was this patch tested? Locally on macOS with JDK 17: - `TestMiniDFSCluster#testBindHostIPv6Loopback` is skipped without the profile and runs and passes with `-Pipv6-test`. - The workflow's Test step command passes for the whole list (10 classes). - With the same Maven arguments, a test that fails under IPv6 (`TestNetUtils#testResolverLoopback`) fails the build. The workflow needs `-Dmaven.test.failure.ignore=false` because `hadoop-project/pom.xml` defaults it to true. The workflow runs on this PR. ### For code changes: - [x] Does the title or this PR starts with the corresponding JIRA issue id (e.g. 'HADOOP-17799. Your PR title ...')? - [ ] Object storage: have the integration tests been executed and the endpoint declared according to the connector-specific documentation? - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? - [ ] If applicable, have you updated the `LICENSE`, `LICENSE-binary`, `NOTICE-binary` files? 🤖 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]
