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

Update gvisor-tap service by using nmcli and binary from container image #673

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

praveenkumar
Copy link
Member

This patch do following

  • Create a tap device using nmcli with a hard coded mac address, this mac address is mapped in the crc daemon lease which provide 192.168.127.2 IP address to the VM.
  • copy the vm binary from container image and put it to /usr/local/bin
  • modify gvisor-tap-vsock service to use the vm binary instead running the container using podman

@openshift-ci openshift-ci bot requested review from anjannath and cfergeau March 24, 2023 12:25
@openshift-ci
Copy link

openshift-ci bot commented Mar 24, 2023

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from praveenkumar. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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

@praveenkumar
Copy link
Member Author

Trying this patch right now with microshift bundle and so far so good tried 3 time start/stop in loop and worked everytime have to test this in system mode networking and also for podman/openshift preset.

/hold

This patch do following
- Create a tap device using nmcli with a hard coded mac address, this
mac address is mapped in the crc daemon lease which provide
`192.168.127.2` IP address to the VM.
- copy the `vm` binary from container image and put it to /usr/local/bin
- modify gvisor-tap-vsock service to use the `vm` binary instead running
the container using podman
@praveenkumar
Copy link
Member Author

With the current change now it takes around 40-50 sec extra. I have to dig more. ( still hold)

Copy link
Contributor

@cfergeau cfergeau left a comment

Choose a reason for hiding this comment

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

Had these comments around, never posted them apparently :(

podman create --name=gvisor-tap-vsock quay.io/crcont/gvisor-tap-vsock:latest
podman cp gvisor-tap-vsock:/vm /usr/local/bin/
podman rm gvisor-tap-vsock
tee /etc/systemd/system/gvisor-tap-vsock.service <<ETE
Copy link
Contributor

Choose a reason for hiding this comment

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

Does ETE have any special meaning/is this typical to use this?

Copy link
Collaborator

Choose a reason for hiding this comment

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

first time I see this

[Unit]
Description=gvisor-tap-vsock traffic forwarder
Wants=network-online.target
After=network-online.target
Copy link
Contributor

Choose a reason for hiding this comment

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

When the network-online target is reached, it means the system has some kind of external network connectivity. In our bundles, with usermode networking, gvisor-tap-vsock is required before we have external network connectivity.
This unit file tells systemd to first wait for network-online.target, and then to start gvisor-tap-vsock.service, I don't think this is correct, the order should be the opposite.

@cfergeau
Copy link
Contributor

containers/gvisor-tap-vsock#202 is exploring something similar.

@cfergeau
Copy link
Contributor

I've done some work on this in https://github.com/cfergeau/snc/tree/gvisor_service
However for testing I used the podman branch and https://github.com/cfergeau/snc/tree/podman-gvisor-service , which worked fine. I'll have to test the openshift changes ^^

@openshift-ci
Copy link

openshift-ci bot commented Jul 12, 2023

@praveenkumar: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-snc 45c5117 link true /test e2e-snc
ci/prow/e2e-microshift 45c5117 link true /test e2e-microshift

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

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

Successfully merging this pull request may close these issues.

3 participants