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

Allow empty list of nameservers #443

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jandubois
Copy link

gvisor-tap-vsock is used by the Lima project to provide networking support when using the Apple Virtualization framework (VZ).

Up to version gvisor-tap-vsock 0.7.5 this worked fine to start a virtual machine even when the host is offline. In 0.8.0 this fails with a fatal error because /etc/resolv.conf is empty (#420), making it impossible to use Lima while offline (lima-vm/lima#3050).

This check and error code seems to have been added to avoid a panic when accessing nameservers[0] (#417). At the time #420 was merged, the panicking code seems to already have been replaced. As far as I can tell, the only access is now via range nameservers, which automatically does the right thing for an empty slice.

I would like to see #420 reverted (conceptually) so that Lima can work offline again.

PS: The test passes cd pkg/services/dns && go test ./..., but I haven't found any documentation on how to run the full set of tests (my naïve attempts showed failures even when running make test on the main branch, so I guess it needs some additional setup).

DNS will obviously not find anything, but at least it still spins up
on an offline machine.

Signed-off-by: Jan Dubois <[email protected]>
Copy link
Contributor

openshift-ci bot commented Dec 24, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: jandubois
Once this PR has been reviewed and has the lgtm label, please assign baude for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant