-
Notifications
You must be signed in to change notification settings - Fork 604
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
Support for configurable network address for user-v2 #1626
Conversation
97d34d8
to
765b1b8
Compare
@@ -6,6 +6,10 @@ images: | |||
- location: "https://cloud-images.ubuntu.com/releases/22.04/release/ubuntu-22.04-server-cloudimg-arm64.img" | |||
arch: "aarch64" | |||
|
|||
hostResolver: | |||
enabled: 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.
Could you add a comment line to explain this?
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.
Done. But am still looking for a way to maintain the config more cleaner.
Using hostResolver.hosts without hostResolver.enabled doesn't look clean.
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.
@AkihiroSuda - Is the current model looking good for you ??
The other approach i had in mind was to use our custom hostResolver only for qemu slirp network and in all other cases we will use gvisor-tap-vsock. If this enabled is false, we will simply use vm dns resolver
Note: In the second approach we will loose support for IPv6 resolution
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.
@jandubois PTAL
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.
The other approach i had in mind was to use our custom hostResolver only for qemu slirp network and in all other cases we will use gvisor-tap-vsock.
Will this work for VPN users?
If so, we can just ignore hostResolver for user-v2 mode.
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.
Will this work for VPN users?
Yes yes, user-v2 will also work for VPN users as far as i checked
If so, we can just ignore hostResolver for user-v2 mode.
So basically whether hostResolver is present or not we will not consider it right ?
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.
So basically whether hostResolver is present or not we will not consider it right ?
Right, assuming that nobody needs hostResolver.enabled = true
for user-v2 mode
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.
To fully understand,
hostResolver.hosts will still be used right ?? To set the custom host names.
With this option the goal is that we will remove support for enable / disable and handle internally for user-v2
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.
To fully understand, hostResolver.hosts will still be used right ?? To set the custom host names.
Yes 👍
With this option the goal is that we will remove support for enable / disable and handle internally for user-v2
👍
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.
Done the changes
b345133
to
953dfa4
Compare
Is this still a draft? |
Its good for review now. I was just waiting for the other issue to get closed. But we can proceed further. |
953dfa4
to
ff25aa5
Compare
It appears that the referenced gvisor pr's have been merged. Is this good to review? |
@raja Yes its up for review. I will address any new review comments and merge conflicts over next week. |
ff25aa5
to
af037ec
Compare
Needs rebase |
af037ec
to
1ad3ca4
Compare
Done :) |
CI is failing |
1ad3ca4
to
287ef5c
Compare
https://github.com/lima-vm/lima/pull/1626/checks?check_run_id=15421021585 |
I have fixed this but for some reason its failing in systemd strict check. Will try to fix early next week |
ea4353d
to
7576107
Compare
23d43a1
to
6e62020
Compare
Signed-off-by: Balaji Vijayakumar <[email protected]>
6e62020
to
fd62a15
Compare
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.
Thanks
@@ -6,6 +6,9 @@ images: | |||
- location: "https://cloud-images.ubuntu.com/releases/22.04/release/ubuntu-22.04-server-cloudimg-arm64.img" | |||
arch: "aarch64" | |||
|
|||
hostResolver: | |||
hosts: | |||
host.docker.internal: host.lima.internal |
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.
Not sure if this is necessary here
Fixes #1551 #1333
Keep the PR as draft for the following to be resolved
What's done
The user-v2 now honours gateway and netmask properties.
With the support of configurable subnet, we also required to provided support for dynamic DNS for user-v2
Changes to DNS resolving for usernet
Before
VM <-> gvisor-tap-vsock <-> hostagent dns resolver
Now
VM <-> gvisor-tap-vsock
No UDP or TCP forwarding will happen. So DNS lookup's will be faster now
How to enable new way of DNS resolver ?
Disabling the hostResolver will enable this new DNS for vz driver and for user-v2 network.
Need opinion on this, as we will still use
hostResolver.hosts
even after enabled is false.Behaviour change
lima-default
tolima-default.internal
TODO