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

feat: add vsock network type support #1303

Merged
merged 1 commit into from
May 16, 2022

Conversation

eryugey
Copy link
Contributor

@eryugey eryugey commented May 12, 2022

So we support connecting dfdaemon running on host outside of VM via
virtio-vsock device.

Signed-off-by: Eryu Guan [email protected]

Description

Related Issue

Motivation and Context

Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation Update (if none of the other choices apply)

Checklist

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.

@eryugey eryugey requested a review from a team as a code owner May 12, 2022 16:04
@eryugey eryugey force-pushed the for-upstream branch 3 times, most recently from 54823ad to 6f87b99 Compare May 13, 2022 02:23
So we support connecting dfdaemon running on host outside of VM via
virtio-vsock device.

Signed-off-by: Eryu Guan <[email protected]>
Copy link
Member

@jim3ma jim3ma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@gaius-qi gaius-qi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gaius-qi gaius-qi merged commit 0bc0d3b into dragonflyoss:main May 16, 2022
eryugey added a commit to eryugey/Dragonfly2 that referenced this pull request May 31, 2022
Since commit 0bc0d3b ("feat: add vsock network type support
(dragonflyoss#1303)") we have vsock support, which means we could run dfget in a
constrained VM env that only has loopback net interface, and connect to
dfdaemon on host via vsock connection. So it's a valid setup to have no
external IPv4 addr.

Don't panic in this case and use "127.0.0.1" as IPv4.

Signed-off-by: Eryu Guan <[email protected]>
eryugey added a commit to eryugey/Dragonfly2 that referenced this pull request May 31, 2022
Since commit 0bc0d3b ("feat: add vsock network type support
(dragonflyoss#1303)") we have vsock support, which means we could run dfget in a
constrained VM env that only has loopback net interface, and connect to
dfdaemon on host via vsock connection. So it's a valid setup to have no
external IPv4 addr.

Don't panic in this case and use "127.0.0.1" as IPv4.

Signed-off-by: Eryu Guan <[email protected]>
eryugey added a commit to eryugey/Dragonfly2 that referenced this pull request May 31, 2022
Since commit 0bc0d3b ("feat: add vsock network type support
(dragonflyoss#1303)") we have vsock support, which means we could run dfget in a
constrained VM env that only has loopback net interface, and connect to
dfdaemon on host via vsock connection. So it's a valid setup to have no
external IPv4 addr.

Don't panic in this case and use "127.0.0.1" as IPv4.

Signed-off-by: Eryu Guan <[email protected]>
eryugey added a commit to eryugey/Dragonfly2 that referenced this pull request May 31, 2022
Since commit 0bc0d3b ("feat: add vsock network type support
(dragonflyoss#1303)") we have vsock support, which means we could run dfget in a
constrained VM env that only has loopback net interface, and connect to
dfdaemon on host via vsock connection. So it's a valid setup to have no
external IPv4 addr.

Don't panic in this case and use "127.0.0.1" as IPv4.

Signed-off-by: Eryu Guan <[email protected]>
gaius-qi added a commit that referenced this pull request Jun 1, 2022
* feat: use 127.0.0.1 as IPv4 if there's no external IPv4 addr

Since commit 0bc0d3b ("feat: add vsock network type support
(#1303)") we have vsock support, which means we could run dfget in a
constrained VM env that only has loopback net interface, and connect to
dfdaemon on host via vsock connection. So it's a valid setup to have no
external IPv4 addr.

Don't panic in this case and use "127.0.0.1" as IPv4.

Signed-off-by: Eryu Guan <[email protected]>

* Update ip_utils.go

* Update ip_utils.go

Co-authored-by: Gaius <[email protected]>
gaius-qi pushed a commit that referenced this pull request Jun 28, 2023
So we support connecting dfdaemon running on host outside of VM via
virtio-vsock device.

Signed-off-by: Eryu Guan <[email protected]>
gaius-qi added a commit that referenced this pull request Jun 28, 2023
* feat: use 127.0.0.1 as IPv4 if there's no external IPv4 addr

Since commit 0bc0d3b ("feat: add vsock network type support
(#1303)") we have vsock support, which means we could run dfget in a
constrained VM env that only has loopback net interface, and connect to
dfdaemon on host via vsock connection. So it's a valid setup to have no
external IPv4 addr.

Don't panic in this case and use "127.0.0.1" as IPv4.

Signed-off-by: Eryu Guan <[email protected]>

* Update ip_utils.go

* Update ip_utils.go

Co-authored-by: Gaius <[email protected]>
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.

3 participants