-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
add macvtap BindingMechanism #2935
add macvtap BindingMechanism #2935
Conversation
Hi @maiqueb. Thanks for your PR. I'm waiting for a kubevirt member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
f505eb1
to
122dca2
Compare
/retest |
/ok-to-test |
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.
notably missing are e2e tests and documentation (yes, I know it is only a draft right now)
122dca2
to
12700ac
Compare
I didn't look deeply into the code yet, however, I'm wondering... if this work is relying on a device plugin, perhaps we should handle this assignment the same way we handle SRIOV devices instead of using a Binding mechanism? |
One reason I can think of right now is that one of the parameters we need to set on the VM's domxml is the MAC address of the interface; that's easily extracted from the Not sure that's easily retrieved from the |
Can't the device plug-in pass the mac address to the pod, via an env. variable? |
AFAIK the binding mechanism is there to learn the mac address of the macvtap interface in case none has been explicitly configured (via the VMI) so that it can then be passed to libvirt later on. The mac address seen by the device plugin might not be final if one has been configured in the VMI. The configured mac address is passed to the CNI via multus annotation and then set by the CNI overriding the auto-generated one in the device plugin. The discovered mac address in the binding mechanism is the final one, after the CNI has configured the interface. |
12700ac
to
db71c37
Compare
970d503
to
13dee8a
Compare
/retest |
/lgtm |
/retest |
Add a new macvtap based bind mechanism, which allows the VM to be plugged directly into the host's network. This new bind mechanism requires multus CNI. Signed-off-by: Miguel Duarte Barroso <mdbarroso@redhat.com>
Added unit tests for: - converter (api pkg) - podinterface (network pkg) Signed-off-by: Miguel Duarte Barroso <mdbarroso@redhat.com>
Signed-off-by: Miguel Duarte Barroso <mdbarroso@redhat.com>
Since the `net-attach-def` objects would only exist in the CNAO lane, we cannot panic on error when removing them fails; we list them, then delete them one by one. Signed-off-by: Miguel Duarte Barroso <mdbarroso@redhat.com>
Assure that a vm with a custom MAC address on a macvtap interface can be started. Signed-off-by: Miguel Duarte Barroso <mdbarroso@redhat.com>
VMs based on Cirros images require sudo to configure the IP address. A follow up patch will reuse this function for cirros based VMs. Signed-off-by: Miguel Duarte Barroso <mdbarroso@redhat.com>
Signed-off-by: Miguel Duarte Barroso <mdbarroso@redhat.com>
Provide a function to create a cirros based VM with a single macvtap interface with static IP addresses. Then, one of the VMs (clientVM) pings the other (serverVM). Signed-off-by: Miguel Duarte Barroso <mdbarroso@redhat.com>
Add tests to check the admitter, thus ensuring the feature works only when the feature gate is enabled, and when a multus network is used. Signed-off-by: Miguel Duarte Barroso <mdbarroso@redhat.com>
Signed-off-by: Miguel Duarte Barroso <mdbarroso@redhat.com>
Signed-off-by: Miguel Duarte Barroso <mdbarroso@redhat.com>
Since the 2 VMs are placed in an isolated subnet, whose routes are not configured, and as a result it doesn't have inter-node communication. As such, we must ensure both VMs are co-located in the same k8s node. Signed-off-by: Miguel Duarte Barroso <mdbarroso@redhat.com>
Add to the factory means of generating: - a multus network - a macvtap interface Signed-off-by: Miguel Duarte Barroso <mdbarroso@redhat.com>
Signed-off-by: Miguel Duarte Barroso <mdbarroso@redhat.com>
The migration of VMIs with macvtap interfaces is possible *if* the mac address of the VMI is defined. This leaves a gap in the feature set, where migrating a VMI with a randomly generated mac address fails. A follow-up PR will address this gap, by making sure the newly instantiated VMI honors the mac address it had before migration. Signed-off-by: Miguel Duarte Barroso <mdbarroso@redhat.com>
cd45540
to
9a8edb0
Compare
/lgtm |
/retest |
1 similar comment
/retest |
@maiqueb: The following tests failed, say
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. |
/retest |
Signed-off-by: Miguel Duarte Barroso mdbarroso@redhat.com
What this PR does / why we need it:
This PR adds a new binding mechanism for macvtap interfaces.
Using the macvtap plugin the VM can be directly connected to a host interface, with no intermediary devices such as veth pairs and in-pod bridge. This provides a more reliable connection, with better performance.
The macvtap devices are created by the macvtap device-plugin, and configured by the macvtap-cni, both of which make part of the macvtap-cni repository.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #
Special notes for your reviewer:
The CNI plugin is responsible for creating & configuring the macvtap interface.
Release note: