Skip to content
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

dns addon can fail to configure correctly with ipv6 #4327

Closed
al8ba opened this issue Dec 4, 2023 · 3 comments
Closed

dns addon can fail to configure correctly with ipv6 #4327

al8ba opened this issue Dec 4, 2023 · 3 comments
Labels
inactive kind/bug Something isn't working

Comments

@al8ba
Copy link

al8ba commented Dec 4, 2023

I've noticed when using microk8s 1.27/stable and 1.28/stable, that microk8s can fail to configure coredns to use /etc/exports as expected on systems that use ipv6.

The issue comes about because the microk8s snap is using python 3.8.

On the systems that fail, the system's resolv.conf contains ipv6 addresses with scope ids, like so:

nameserver 192.168.121.1
nameserver fe80::5054:ff:fe00:b61d%2

The microk8s script, scripts/find-resolv-conf.py, tries to check that none of these addresses are loopbacks (they aren't), but fails because feeding an ipv6 address with a scope id (the trailing '%2') into ipaddress.ip_address(address) explodes with an address validation error, despite it being a perfectly valid ipv6 address. This causes the script to determine that there is no valid resolv.conf on the system, which results in coredns falling back to use 8.8.8.8 etc.

The snap need to use at least python 3.9 to prevent ipaddress.ip_address(address) of a scoped ipv6 address from failing.

@neoaggelos
Copy link
Contributor

Hi @al8ba thank you for raising this. I have opened #4328 which should address the problem.

@al8ba
Copy link
Author

al8ba commented Dec 4, 2023

Thanks!

Copy link

stale bot commented Oct 29, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the inactive label Oct 29, 2024
@stale stale bot closed this as completed Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
inactive kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants