Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@nirdothan
Copy link
Member

@nirdothan nirdothan commented Sep 1, 2025

What this PR does

In some testing setups, KubeVirt is configured by external operators e.g
HCO.
In those setups, this e2e suite should not override preconfigured
values, in particular network binding plugins.
This change makes this suite respect existing configuration, and it only
registers network binding plugins, if they are not already registered.

The decision to override or not is only based on the name of the
plugin (they do not have a type definition) as it appears in the test,
hence external setups that wish to utilize this functionality,
must align the plugin names that they register with those
that are used by VMs in the test code.
For example: passt binding is called passt in the test, so do not
register it with the name passtBinding.

Before this PR:

After this PR:

References

Why we need it and why it was done in this way

The following tradeoffs were made:

The following alternatives were considered:

Links to places where the discussion took place:

Special notes for your reviewer

Checklist

This checklist is not enforcing, but it's a reminder of items that could be relevant to every PR.
Approvers are expected to review this list.

Release note

NONE

@kubevirt-bot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@kubevirt-bot kubevirt-bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note Denotes a PR that will be considered when it comes time to generate release notes. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. size/S labels Sep 1, 2025
@nirdothan nirdothan force-pushed the conditional-register branch from d38abcb to bd17d4d Compare September 1, 2025 07:42
@nirdothan
Copy link
Member Author

/test pull-kubevirt-e2e-k8s-1.33-sig-network

@nirdothan nirdothan force-pushed the conditional-register branch from bd17d4d to 92da9af Compare September 1, 2025 18:05
@nirdothan nirdothan marked this pull request as ready for review September 1, 2025 18:09
@kubevirt-bot kubevirt-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 1, 2025
@nirdothan
Copy link
Member Author

/cc @frenzyfriday @EdDev

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey there - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@nirdothan
Copy link
Member Author

/retest-required

@nirdothan nirdothan changed the title e2e, netbinding: Dont override binding registration e2e, netbinding: Don't override binding registration Sep 1, 2025
@kubevirt-bot kubevirt-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 5, 2025
@kubevirt-bot kubevirt-bot added size/M and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/S labels Sep 11, 2025
@nirdothan
Copy link
Member Author

Fixed lint error.

@kubevirt-bot kubevirt-bot removed the lgtm Indicates that a PR is ready to be merged. label Sep 30, 2025
@nirdothan
Copy link
Member Author

Removed second commit which was meant to improve readability but reviewers disgreed that it did.

Copy link
Contributor

@frenzyfriday frenzyfriday left a comment

Choose a reason for hiding this comment

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

/lgtm

But lets wait for Orel's ack

)

func WithNetBindingPlugin(name string, netBindingPlugin v1.InterfaceBindingPlugin) KvChangeOption {
func WithNetBindingPluginNoOverride(name string, netBindingPlugin v1.InterfaceBindingPlugin) KvChangeOption {
Copy link
Contributor

Choose a reason for hiding this comment

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

ack, kind of makes sense. Maybe we can call it WithNetBindingPluginIfNotPresent or something (but I cannot think of a better name though)

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Oct 8, 2025
Copy link
Member

@orelmisan orelmisan left a comment

Choose a reason for hiding this comment

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

Thank you @nirdothan!

Please consider adding a doc string to clarify the function's behavior.
@frenzyfriday's naming suggestion is also reasonable IMO.
Feel free to unhold.

/approve
/hold

@kubevirt-bot kubevirt-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 15, 2025
@kubevirt-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: orelmisan

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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

@kubevirt-bot kubevirt-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 15, 2025
@kubevirt-commenter-bot
Copy link

Required labels detected, running phase 2 presubmits:
/test pull-kubevirt-e2e-k8s-1.34-windows2016
/test pull-kubevirt-e2e-kind-1.33-vgpu
/test pull-kubevirt-e2e-kind-sriov
/test pull-kubevirt-e2e-k8s-1.34-ipv6-sig-network
/test pull-kubevirt-e2e-k8s-1.32-sig-network
/test pull-kubevirt-e2e-k8s-1.32-sig-storage
/test pull-kubevirt-e2e-k8s-1.32-sig-compute
/test pull-kubevirt-e2e-k8s-1.32-sig-operator
/test pull-kubevirt-e2e-k8s-1.33-sig-network
/test pull-kubevirt-e2e-k8s-1.33-sig-storage
/test pull-kubevirt-e2e-k8s-1.33-sig-compute
/test pull-kubevirt-e2e-k8s-1.33-sig-operator

In some testing setups, KubeVirt is configured by external operators e.g
[HCO](https://github.com/kubevirt/hyperconverged-cluster-operator).
In those setups, this e2e suite should not override preconfigured
values, in particular network binding plugins.
This change makes this suite respect existing configuration, and only
registering network binding plugins, if they are not already registered.

Signed-off-by: Nir Dothan <[email protected]>
@nirdothan nirdothan force-pushed the conditional-register branch from 464260a to 59caf0a Compare October 15, 2025 11:04
@kubevirt-bot kubevirt-bot removed the lgtm Indicates that a PR is ready to be merged. label Oct 15, 2025
@nirdothan
Copy link
Member Author

Rebased and implemented comments from @frenzyfriday and @orelmisan in the same push (sorry).

Copy link
Contributor

@frenzyfriday frenzyfriday left a comment

Choose a reason for hiding this comment

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

/lgtm
Thanks!

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Oct 15, 2025
@kubevirt-commenter-bot
Copy link

Required labels detected, running phase 2 presubmits:
/test pull-kubevirt-e2e-k8s-1.34-windows2016
/test pull-kubevirt-e2e-kind-1.33-vgpu
/test pull-kubevirt-e2e-kind-sriov
/test pull-kubevirt-e2e-k8s-1.34-ipv6-sig-network
/test pull-kubevirt-e2e-k8s-1.32-sig-network
/test pull-kubevirt-e2e-k8s-1.32-sig-storage
/test pull-kubevirt-e2e-k8s-1.32-sig-compute
/test pull-kubevirt-e2e-k8s-1.32-sig-operator
/test pull-kubevirt-e2e-k8s-1.33-sig-network
/test pull-kubevirt-e2e-k8s-1.33-sig-storage
/test pull-kubevirt-e2e-k8s-1.33-sig-compute
/test pull-kubevirt-e2e-k8s-1.33-sig-operator

@nirdothan
Copy link
Member Author

/unhold
Per #15552 (review)

@kubevirt-bot kubevirt-bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 15, 2025
@nirdothan
Copy link
Member Author

/test pull-kubevirt-e2e-k8s-1.31-sig-monitoring
/test pull-kubevirt-e2e-k8s-1.31-sig-performance
/test pull-kubevirt-verify-rpms
/test pull-kubevirt-prom-rules-verify
/test pull-kubevirt-e2e-kind-1.33-sev

@kubevirt-commenter-bot
Copy link

/retest-required
This bot automatically retries required jobs that failed/flaked on approved PRs.
Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

@kubevirt-bot
Copy link
Contributor

kubevirt-bot commented Oct 16, 2025

@nirdothan: 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
pull-kubevirt-e2e-k8s-1.31-sig-monitoring 7b57fa0 link true /test pull-kubevirt-e2e-k8s-1.31-sig-monitoring
pull-kubevirt-e2e-k8s-1.31-sig-performance 7b57fa0 link true /test pull-kubevirt-e2e-k8s-1.31-sig-performance
pull-kubevirt-e2e-kind-1.33-sev 464260a link true /test pull-kubevirt-e2e-kind-1.33-sev
pull-kubevirt-e2e-k8s-1.32-sig-storage 59caf0a link unknown /test pull-kubevirt-e2e-k8s-1.32-sig-storage
Details

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-sigs/prow repository. I understand the commands that are listed here.

@kubevirt-bot kubevirt-bot merged commit 4759041 into kubevirt:main Oct 16, 2025
43 of 44 checks passed
nirdothan added a commit to nirdothan/kubevirt that referenced this pull request Oct 20, 2025
Some downstream systems pre-regiter the passt network
binding plugin. In such cases respect the original registration
and do not override it with a localized registration.
This is essentially a scaled down backport of
kubevirt#15552
for version 1.6 only.

Signed-off-by: Nir Dothan <[email protected]>
nirdothan added a commit to nirdothan/kubevirt that referenced this pull request Oct 20, 2025
Some downstream systems pre-regiter the passt network
binding plugin. In such cases respect the original registration
and do not override it with a localized registration.
This is essentially a scaled down backport of
kubevirt#15552
for version 1.6 only.

Signed-off-by: Nir Dothan <[email protected]>
nirdothan added a commit to nirdothan/kubevirt that referenced this pull request Oct 20, 2025
Some downstream systems pre-register the passt network
binding plugin. In such cases respect the original registration
and do not override it with a localized registration.
This is essentially a scaled down backport of
kubevirt#15552
for version 1.6 only.

Signed-off-by: Nir Dothan <[email protected]>
@kubevirt-bot kubevirt-bot added release-note-none Denotes a PR that doesn't merit a release note. and removed release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Nov 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. area/controller area/handler area/launcher area/virtctl dco-signoff: yes Indicates the PR's author has DCO signed all their commits. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. sig/buildsystem Denotes an issue or PR that relates to changes in the build system. sig/compute sig/network sig/observability Denotes an issue or PR that relates to observability. sig/storage size/S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants