-
Notifications
You must be signed in to change notification settings - Fork 18
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
Feature: allow IPv6 DNS #378
Conversation
@@ -388,9 +390,13 @@ async def _setup_configuration( | |||
ipv6 = self.get_vm_ipv6() | |||
ipv6_gateway = self.get_vm_ipv6_gateway() | |||
|
|||
if not settings.DNS_NAMESERVERS: | |||
dns_servers = settings.DNS_NAMESERVERS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be great to have a dns_servers()
method in Settings
that uses ipaddress
to perform the conversion to `IPv4/IPv6 address objects only once.
vm_supervisor/conf.py
Outdated
@@ -285,6 +285,19 @@ def display(self) -> str: | |||
f"{attribute:<27} = {value}" for attribute, value in attributes.items() | |||
) | |||
|
|||
def dns_servers(self, ipv4_only: bool) -> Optional[List[str]]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is there no explaination on what this function does as docstring ?
vm_supervisor/conf.py
Outdated
if not dns_servers: | ||
raise ValueError("Invalid configuration: DNS nameservers missing") | ||
|
||
# Apply DNS IPv6 filtering here if needed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does "DNS IPv6 filtering" mean and why do it ?
|
||
if not settings.DNS_NAMESERVERS: | ||
raise ValueError("Invalid configuration: DNS nameservers missing") | ||
dns_servers = settings.dns_servers(False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How can a node operator disable DNS servers for tests ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I'm new here so I'm missing a lot of context, could you please explain to me what problem this is resolving and how the new feature is used?
@olethanh This re-enables IPv6 DNS inside VMs. For a while, VMs only supported IPv4 networking and could therefore not reach IPv6 DNS. As we copied the list of DNS from the host, it could happen that the host used an IPv6 DNS, meaning that the VM would not be able to resolve domain names. Long story short, we simply filtered out IPv6 DNS. This PR removes this workaround. |
@odesenfans Thanks for the answer but I still don't understand. I cannot find in the code in the main branch where the filtering was done before and where it is removed now? |
if not self.NETWORK_INTERFACE: | ||
self.NETWORK_INTERFACE = get_default_interface() | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that intender or was this removed by error ?
@olethanh The filtering is performed here. Seems like a lot of code has moved since this PR was opened so a rebase is much needed. Regarding your other comment, you are right that this should be done on a per-VM config, checking first if the supervisor configuration allows for it and then whether the VM runtime supports IPv6. |
Superseded by #455 |
No description provided.