-
Bug
-
Resolution: Unresolved
-
Undefined
-
None
Description of problem:
When using ovn-kubernetes primary networks the default pod network get deletaged to a infrastructure role, and the proper IP to access the VM is the one living at a non eth0 interface with the passt binding. This means that the VM status IPs will still show default pod network eth0 address but should show the udn primary network addresses configured by ovn-kubernetes.
Version-Release number of selected component (if applicable):
4.17
How reproducible:
Always
Steps to Reproduce:
1. Configure passt binding at Kubevirt CR #!/bin/bash -xe sidecar_image=quay.io/ellorent/kubevirt-passt-binding sidecar_image_sha=$(skopeo inspect docker://$sidecar_image | jq -r .Digest)kubectl patch kubevirts -n kubevirt kubevirt --type=json -p="[{\"op\": \"add\", \"path\": \"/spec/configuration/network\", \"value\": { \"binding\": { \"passt\": { \"networkAttachmentDefinition\": \"netbindingpasst\", \"sidecarImage\": \"${sidecar_image}@${sidecar_image_sha}\", \"downwardAPI\": \"device-info\", \"migration\": { \"method\": \"link-refresh\" } } } }}]"kubectl apply -f - <<EOF --- apiVersion: kubevirt.io/v1 kind: KubeVirt metadata: name: kubevirt namespace: kubevirt spec: configuration: developerConfiguration: featureGates: - NetworkBindingPlugins EOFfor node in $(kubectl get node --no-headers -o custom-columns=":metadata.name"); do docker cp ./kubevirt-passt-binding $node:/opt/cni/bin/kubevirt-passt-binding docker cp ./kubevirt-ovn-kubernetes-tune $node:/opt/cni/bin/kubevirt-ovn-kubernetes-tune done 2. Apply following manifests --- apiVersion: v1 kind: Namespace metadata: name: passt-poc --- apiVersion: k8s.cni.cncf.io/v1 kind: NetworkAttachmentDefinition metadata: namespace: passt-poc name: netbindingpasst spec: config: |2 { "cniVersion": "1.0.0", "name": "net-binding-passt", "plugins": [ { "type": "kubevirt-passt-binding" }, { "type": "kubevirt-ovn-kubernetes-tune" } ] } --- apiVersion: k8s.cni.cncf.io/v1 kind: NetworkAttachmentDefinition metadata: namespace: passt-poc name: ovn-layer2 spec: config: |2 { "cniVersion": "1.0.0", "name": "net-ovn-layer2", "type": "ovn-k8s-cni-overlay", "topology":"layer2", "subnets": "10.100.200.0/24", "mtu": 1300, "role": "primary", "netAttachDefName": "passt-poc/ovn-layer2" } --- apiVersion: kubevirt.io/v1 kind: VirtualMachine metadata: labels: kubevirt.io/vm: vm-net-binding-passt name: vm-net-binding-passt namespace: passt-poc spec: running: true template: metadata: labels: kubevirt.io/vm: vm-net-binding-passt spec: domain: devices: disks: - disk: bus: virtio name: containerdisk - disk: bus: virtio name: cloudinitdisk interfaces: - name: passtnet binding: name: passt ports: - name: http port: 80 protocol: TCP rng: {} resources: requests: memory: 1024M networks: - name: passtnet pod: {} terminationGracePeriodSeconds: 0 volumes: - containerDisk: image: quay.io/kubevirt/alpine-container-disk-demo:v1.1.0 name: containerdisk - cloudInitNoCloud: networkData: | version: 2 ethernets: eth0: dhcp4: true name: cloudinitdisk
Actual results:
VMI.status.IPs do not belong to 10.100.200.0/16
Expected results:
VMI.status.IPs should belong to 10.100.200.0/16
Additional info:
- depends on
-
CNV-45050 Report IP from network binding plugin
- New
- links to
-
RHEA-2024:139653 OpenShift Virtualization 4.18.0 Images