smengcl commented on code in PR #8981:
URL: https://github.com/apache/hadoop/pull/8981#discussion_r4577947849
##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/test/java/org/apache/hadoop/yarn/server/webproxy/TestWebAppProxyServer.java:
##########
@@ -78,6 +78,25 @@ void testStartWithBindHost() {
assertEquals(STATE.STARTED, webAppProxy.getServiceState());
}
+ @Test
+ void testIPv6ProxyAddress() {
+ conf.set(YarnConfiguration.PROXY_ADDRESS, "[2001:db8::1]:" + port);
+ WebAppProxy proxy = new WebAppProxy();
+ proxy.init(conf);
+ assertEquals("[2001:db8::1]:" + port, proxy.getBindAddress());
+ proxy.stop();
+
+ // Bind to the wildcard address so the server can start without an IPv6
interface.
+ conf.set(YarnConfiguration.PROXY_BIND_HOST, "0.0.0.0");
Review Comment:
Added `TestWebAppProxyServer#testIPv6BindHost` (bind-host `[::1]`) and
documented in yarn-default.xml that an IPv6 `yarn.web-proxy.bind-host` needs
brackets (54f8f765f7d). The bare `::1` fails in `Configuration.getSocketAddr`,
which every `*.bind-host` setting (e.g. `yarn.resourcemanager.bind-host`)
shares, so accepting bare literals belongs in a separate hadoop-common change.
_🤖 Addressed by [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]