slfan1989 commented on code in PR #8981:
URL: https://github.com/apache/hadoop/pull/8981#discussion_r4576855733


##########
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:
   Could we also cover an IPv6 `yarn.web-proxy.bind-host` override? With 
`yarn.web-proxy.address=[::1]:0`, `WebAppProxyServer` starts with 
`bind-host=[::1]`, but fails during initialization with `bind-host=::1`. Could 
we accept the bare IPv6 literal here or document that this setting requires 
brackets?



-- 
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