kirktrue commented on code in PR #19537: URL: https://github.com/apache/kafka/pull/19537#discussion_r2055078410
########## tests/docker/ducker-ak: ########## @@ -83,6 +83,8 @@ up [-n|--num-nodes NUM_NODES] [-f|--force] [docker-image] on the host. The argument can be a single port (like 5005), a port range like (5005-5009) or a combination of port/port-range separated by comma (like 2181,9092 or 2181,5005-5008). By default no port is exposed. See README.md for more detail on this option. + + If --ipv6 is specified, we will create a docker network with IPv6 enabled. Review Comment: Super nitpicky... ```suggestion If --ipv6 is specified, we will create a Docker network with IPv6 enabled. ``` ########## tests/docker/ducker-ak: ########## @@ -412,14 +421,23 @@ attempting to start new ones." exec 3<> "${ducker_dir}/build/node_hosts" for n in $(seq -f %02g 1 ${num_nodes}); do local node="ducker${n}" - docker exec --user=root "${node}" grep "${node}" /etc/hosts >&3 + if [[ "${ipv6}" == "true" ]]; then + docker exec --user=root "${node}" grep "${node}" /etc/hosts | grep "${subnet_cidr_prefix}" >&3 + else + docker exec --user=root "${node}" grep "${node}" /etc/hosts >&3 + fi [[ $? -ne 0 ]] && die "failed to find the /etc/hosts entry for ${node}" done exec 3>&- for n in $(seq -f %02g 1 ${num_nodes}); do local node="ducker${n}" docker exec --user=root "${node}" \ bash -c "grep -v ${node} /opt/kafka-dev/tests/docker/build/node_hosts >> /etc/hosts" + # Filter oud ipv4 addresses if ipv6 Review Comment: ```suggestion # Filter out ipv4 addresses if ipv6 ``` ########## tests/docker/ducker-ak: ########## @@ -399,7 +403,12 @@ attempting to start new ones." if docker network inspect ducknet &>/dev/null; then must_do -v docker network rm ducknet fi - must_do -v docker network create ducknet + network_create_args="" + if [[ "${ipv6}" == "true" ]]; then + subnet_cidr_prefix="${DUCKER_SUBNET_CIDR:-"fc00:cf17"}" Review Comment: I'm not knowledgeable about IPv6, so I'm wondering if this is a safe thing to hardcode? -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org