Skip to content

MINOR: support ipv6 in ducker-ak #19537

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: trunk
Choose a base branch
from

Conversation

kevin-wu24
Copy link
Contributor

@kevin-wu24 kevin-wu24 commented Apr 22, 2025

add ipv6 support to ducker-ak

@github-actions github-actions bot added triage PRs from the community tests Test fixes (including flaky tests) small Small PRs and removed triage PRs from the community labels Apr 22, 2025
Copy link
Contributor

@cmccabe cmccabe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@kirktrue kirktrue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @kevin-wu24. Just a few points. Thanks!

@@ -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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super nitpicky...

Suggested change
If --ipv6 is specified, we will create a docker network with IPv6 enabled.
If --ipv6 is specified, we will create a Docker network with IPv6 enabled.

[[ $? -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Filter oud ipv4 addresses if ipv6
# Filter out ipv4 addresses if ipv6

must_do -v docker network create ducknet
network_create_args=""
if [[ "${ipv6}" == "true" ]]; then
subnet_cidr_prefix="${DUCKER_SUBNET_CIDR:-"fc00:cf17"}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not knowledgeable about IPv6, so I'm wondering if this is a safe thing to hardcode?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
small Small PRs tests Test fixes (including flaky tests)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants