Skip to content

Conversation

@mynameis180
Copy link

NOTICE

This is a backport of HDFS-17834 from branch-3.4 to trunk.

What changes were proposed in this pull request?

This PR fixes HDFS-17834: HDFS Router Federation Health page generates invalid HTTP links for DataNodes in IPv6 environment.

Problem

The Router Federation Health page incorrectly handles IPv6 addresses when constructing DataNode HTTP links:

  • Fails to properly parse IPv6 addresses from infoAddr and infoSecureAddr fields
  • Incorrectly splits IPv6 addresses, mistaking address segments for port numbers
  • Generates malformed URLs that don't conform to RFC 2732 standards for IPv6 literal addresses
  • Results in unclickable links that prevent access to DataNode web interfaces

Solution

  • Enhance address parsing logic to correctly handle both IPv4 and IPv6 address formats
  • Properly extract port numbers from IPv6 addresses formatted as [address]:port
  • Maintain backward compatibility with existing IPv4 address handling
  • Ensure generated URLs follow RFC 2732 standards for IPv6 literal addresses

Example

Before: https://fe80:0:0:0:215:5dff:fe00:3110:50075 (invalid)
After: https://[fe80:0:0:0:215:5dff:fe00:3110]:50075 (valid)

How was this patch tested?

  • Unit tests: Verified address parsing logic for both IPv4 and IPv6 formats
  • Regression testing: Confirmed no impact on existing IPv4 functionality
  • Manual testing: Validated in IPv6-enabled environments
  • Link verification: Verified generated URLs are correctly formatted and accessible

Code Change Verification

  • PR title starts with corresponding JIRA issue id (HDFS-17834)
  • No new dependencies added
  • Existing tests pass
  • Code follows Hadoop coding standards

Original PR

This change was already committed and tested in branch-3.4.

Please review @slfan1989 @Hexiaoqiao

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 1m 4s 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.
_ trunk Compile Tests _
+0 🆗 mvndep 8m 12s Maven dependency ordering for branch
+1 💚 mvninstall 28m 27s trunk passed
+1 💚 shadedclient 63m 13s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 30s Maven dependency ordering for patch
+1 💚 mvninstall 2m 24s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 shadedclient 25m 0s patch has no errors when building and testing our client artifacts.
_ Other Tests _
-1 ❌ asflicense 0m 37s /results-asflicense.txt The patch generated 1 ASF License warnings.
95m 11s
Subsystem Report/Notes
Docker ClientAPI=1.52 ServerAPI=1.52 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8097/1/artifact/out/Dockerfile
GITHUB PR #8097
Optional Tests dupname asflicense shadedclient codespell detsecrets jshint
uname Linux 3521285cdc58 5.15.0-161-generic #171-Ubuntu SMP Sat Oct 11 08:17:01 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 3111927
Max. process+thread count 612 (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-8097/1/console
versions git=2.25.1 maven=3.9.11
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

@mynameis180
Copy link
Author

@steveloughran please fix you HADOOP-19696 ,the word "License" which was misspelled as "Li2cense" in the
license header of hadoop-cloud-storage.xml. This typo was causing the
ASF License check to fail.
@Hexiaoqiao

@steveloughran
Copy link
Contributor

ooh, let me do that asap as a followup.

(actually, looks like this typo was in two other assembly xml files, I'd just copied it over from them. will fix everywhere)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants