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

Adding the support of Linux bridge interface for VM setup #158

Merged
merged 3 commits into from
Jan 20, 2025

Conversation

capolrik
Copy link
Collaborator

@capolrik capolrik commented Nov 14, 2024

Use the --bridge option to create a NAD that will be attached to the VMs

Type of change

  • New feature

Description

Adding the support for bridge interface using VMs.
A NNCP needs to be defined before running the test to defined the linux bridge.
Then, the bridge name should be passed to the option:

k8s-netperf --debug --vm --bridge br0

with the following NNCP (nmstate operator required)

apiVersion: nmstate.io/v1alpha1
kind: NodeNetworkConfigurationPolicy
metadata:
  name: br0-eth1
spec:
  desiredState:
    interfaces:
      - name: br0
        description: Linux bridge with eno2 as a port
        type: linux-bridge
        state: up
        ipv4:
          dhcp: true
          enabled: true
        bridge:
          options:
            stp:
              enabled: false
          port:
            - name: eno2

Related Tickets & Documents

Checklist before requesting a review

  • I have performed a self-review of my code.
  • If it is a core feature, I have added thorough tests.

Testing

On OCP 4.17, 4.18.0.rc

k8s-netperf --debug --vm --bridge br0

and

k8s-netperf --debug --vm

@capolrik
Copy link
Collaborator Author

@jtaleric @rsevilla87 this change has been tested on 4.17 and 4.18 and is stable, it is ready for review.

pkg/k8s/kubevirt.go Outdated Show resolved Hide resolved
@jtaleric
Copy link
Member

@capolrik hey! Lets get a rebase for this patchset and try to close out so we can begin adding this to our CPT pipelines.

@capolrik capolrik requested a review from jtaleric January 16, 2025 09:35
@capolrik capolrik force-pushed the vm-bridge branch 3 times, most recently from ed33937 to aaff0c4 Compare January 20, 2025 13:24
Copy link
Member

@jtaleric jtaleric left a comment

Choose a reason for hiding this comment

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

/lgtm

VMHost string
Udn bool
Bridge bool
BridgeServerNetwork string

Choose a reason for hiding this comment

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

BridgeServerAddress ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I prefer Network, as it include the subnet mask, like '10.10.10.12/24'

@josecastillolema
Copy link

/lgtm

@jtaleric jtaleric merged commit 747be21 into cloud-bulldozer:main Jan 20, 2025
5 checks passed
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