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

Merged
merged 1 commit into from
Jan 14, 2025

Conversation

jandubois
Copy link
Contributor

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).

@cfergeau
Copy link
Collaborator

cfergeau commented Jan 8, 2025

@evidolob can you take a look?

@evidolob
Copy link
Collaborator

@jandubois Could you rebase your PR to latest main? It will allow to run test on this PR.

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

Signed-off-by: Jan Dubois <jan.dubois@suse.com>
@jandubois
Copy link
Contributor Author

@evidolob Rebase done

@evidolob evidolob requested a review from cfergeau January 14, 2025 09:57
@cfergeau
Copy link
Collaborator

/approve

Copy link
Contributor

openshift-ci bot commented Jan 14, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cfergeau, evidolob, jandubois

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

The pull request process is described 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

@cfergeau
Copy link
Collaborator

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Jan 14, 2025
@openshift-merge-bot openshift-merge-bot bot merged commit ed3693f into containers:main Jan 14, 2025
20 checks passed
@evidolob
Copy link
Collaborator

/approve

@jandubois jandubois deleted the empty-resolv-conf branch January 14, 2025 18:15
@jandubois
Copy link
Contributor Author

@cfergeau Just for planning purposes, do you have a rough idea when you will have the next release?

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

Successfully merging this pull request may close these issues.

3 participants