Bug 2060485 - virtualMachine with duplicate interfaces name causes MACs to be rejected by Kubemacpool
Summary: virtualMachine with duplicate interfaces name causes MACs to be rejected by K...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: Networking
Version: 4.10.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 4.11.0
Assignee: Petr Horáček
QA Contact: Ruth Netser
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-03-03 15:36 UTC by Ram Lavi
Modified: 2023-11-13 08:14 UTC (History)
1 user (show)

Fixed In Version: v4.11.0-156
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-09-14 19:28:43 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker CNV-16728 0 None None None 2023-11-13 08:14:42 UTC
Red Hat Product Errata RHSA-2022:6526 0 None None None 2022-09-14 19:29:07 UTC

Description Ram Lavi 2022-03-03 15:36:15 UTC
Description of problem:
When applying a VM with multiple interfaces with the same name, the VM is rejected but kubemacpool is mishandling the MACs, causing a side effect where that MAC is no longer usable (it is "taken" by the ghost VM).



Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. deploy kubemacpool
2. apply a VM with multiple duplicate interface names. For example
3. try to apply a new VM with the MACs given to the rejected VM.

Actual results:


Expected results:


Additional info:

Comment 2 Adi Zavalkovsky 2022-04-04 08:58:21 UTC
Verified.
OCP 4.11.0-0.nightly-2022-04-01-172551.
CNV bundle - v4.11.0-187

Attempted to deploy a vm with duplicate ifaces:
---
apiVersion: kubevirt.io/v1
kind: VirtualMachine
metadata:
  name: samplevm
spec:
  running: true
  template:
    spec:
      domain:
        devices:
          disks:
          - disk:
              bus: virtio
            name: rootfs
          - disk:
              bus: virtio
            name: cloudinit
          interfaces:
          - name: default
            masquerade: {}
          - bridge: {}
            name: br1
          - bridge: {}
            name: br1
        resources:
          requests:
            memory: 64M
      networks:
      - name: default
        pod: {}
      - multus:
          networkName: br1
        name: br1
      - multus:
          networkName: br1
        name: br1
      volumes:
        - name: rootfs
          containerDisk:
            image: kubevirt/cirros-registry-disk-demo
        - name: cloudinit
          cloudInitNoCloud:
            userDataBase64: SGkuXG4=

Kubemacpool didn't allocate MAC addresses:

[adi@fedora kubeconf]$ oc apply -f ~/Gerrit/bugs/bz2060485 
networkattachmentdefinition.k8s.cni.cncf.io/br1 created
Error from server: error when creating "***/bz2060485": admission webhook "mutatevirtualmachines.kubemacpool.io" denied the request: Failed to create virtual machine allocation error: Failed to allocate mac to the vm object: Failed to mutate virtual machine: every interface must have a unique name

Comment 6 errata-xmlrpc 2022-09-14 19:28:43 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: OpenShift Virtualization 4.11.0 Images security and bug fix update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:6526


Note You need to log in before you can comment on or make changes to this bug.