-
Notifications
You must be signed in to change notification settings - Fork 81
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
net: Allow creating vsocks in listen mode. #246
Conversation
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! Any readily-available testing methods?
Build the linked PR from muvm, and launch a second command in the same vm. The second one will use this feature to send the launch request. |
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.
This looks great, thanks. I only requested a minor change to force the library users to provide a healthy path for the unix socket.
Thanks, I'll try to test this later, but for now I realized something: If I am not mistaken, this only starts listening on the socket once the vsock device is activated, so if you want to connect to the socket from host, you would have to wait until the guest boot process initializes the vsock device. |
Yes, the socket file appearing only after the vm is ready to process incoming connection is desired, that way the vm can wait for the file to appear before sending the requests. |
Previously all vsocks were expected to be connected from the guest. This patch adds support for sockets that are listened to by the guest and are connected from the host. Signed-off-by: Sasha Finkelstein <[email protected]>
09c6753
to
6721606
Compare
@mtjhrc Do you want to take a second look or can we merge it already? |
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.
Sorry for the delay. I managed to test this just by adding a listening vsock in chroot_vm
and using it in the guest.
Now I understand how it's meant to be used. Still I am unsure if we generally want to bind the sockets at the device initialization stage, but if It works for you this is fine for now, and we could always add another API later.
So for me this is good to merge! Thanks
Previously all vsocks were expected to be connected from the guest. This patch adds support for sockets that are listened to by the guest and are connected from the host.