Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 viarange 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 runningmake test
on themain
branch, so I guess it needs some additional setup).