Skip to content

Conversation

@mynameis180
Copy link

Description of PR

This PR fixes HDFS-17834: HDFS NameNode Web UI generates invalid HTTP links for DataNodes in IPv6 environment.

Problem

The NameNode Web UI incorrectly handles IPv6 addresses in DataNode links:

  1. Fails to encapsulate IPv6 addresses in square brackets [] as required by RFC 2732
  2. Incorrectly parses IPv6 addresses, mistaking parts of the address for port numbers
  3. Generates malformed, unclickable links that don't point to the DataNode's web interface

Solution

  • Properly wrap IPv6 addresses in square brackets for URL construction
  • Fix the address parsing logic to correctly separate IPv6 addresses from port numbers
  • Ensure generated links follow RFC 2732 standards for IPv6 literal addresses in URLs

Example

Before: https://datanodeHostname:30 (invalid)
After: https://[1172:30:0:0:0:0:8a34]:50010 (valid)

How was this patch tested?

  • Added unit tests for IPv6 address formatting in URL generation
  • Tested with existing IPv4 addresses to ensure no regression
  • Manual testing with IPv6 DataNode configurations
  • Verified generated links are clickable and point to correct DataNode web interfaces

For code changes:

  • Does the title or this PR starts with the corresponding JIRA issue id?
  • 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?
  • If applicable, have you updated the LICENSE, LICENSE-binary, NOTICE-binary files?

Note: This PR only contains code changes and no new dependencies were added.

@mynameis180
Copy link
Author

retry pull

@hadoop-yetus
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 20m 16s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+0 🆗 jshint 0m 0s jshint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
_ branch-3.4 Compile Tests _
+0 🆗 mvndep 2m 48s Maven dependency ordering for branch
+1 💚 mvninstall 39m 59s branch-3.4 passed
+1 💚 shadedclient 82m 46s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 34s Maven dependency ordering for patch
+1 💚 mvninstall 1m 45s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 shadedclient 38m 51s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 asflicense 0m 38s The patch does not generate ASF License warnings.
146m 35s
Subsystem Report/Notes
Docker ClientAPI=1.52 ServerAPI=1.52 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8080/1/artifact/out/Dockerfile
GITHUB PR #8080
Optional Tests dupname asflicense shadedclient codespell detsecrets jshint
uname Linux 32bbff8fa0ba 5.15.0-160-generic #170-Ubuntu SMP Wed Oct 1 10:06:56 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision branch-3.4 / e94407a
Max. process+thread count 527 (vs. ulimit of 5500)
modules C: hadoop-hdfs-project/hadoop-hdfs hadoop-hdfs-project/hadoop-hdfs-rbf U: hadoop-hdfs-project
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8080/1/console
versions git=2.25.1 maven=3.6.3
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

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.

2 participants