Bug 2222971 - [vm-cloning] Validation of VM macAddress does not work with mixed delimiters (":" and "-")
Summary: [vm-cloning] Validation of VM macAddress does not work with mixed delimiters ...
Keywords:
Status: NEW
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: Virtualization
Version: 4.14.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
: 4.15.0
Assignee: sgott
QA Contact: Kedar Bidarkar
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-07-14 16:34 UTC by Denys Shchedrivyi
Modified: 2023-07-19 13:01 UTC (History)
0 users

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker CNV-30974 0 None None None 2023-07-14 16:36:43 UTC

Description Denys Shchedrivyi 2023-07-14 16:34:42 UTC
Description of problem:
 There is a validation of macAddress field when creating VMs and it works good when both macs have same delimiter (e.g. ":"), when the mac already in use - second VM can't be created
 
 But if the VMs have different macAddress delimiters (first ":", second "-") - the validation does not work
 As result it is possible to have 2 VMIs with the same mac address:

> $ oc describe vmi vm-fedora | grep "Mac:"
>    Mac:                             02:f2:8c:00:00:1a
> $ oc describe vmi vm-fedora-2 | grep "Mac:"
>    Mac:                             02:f2:8c:00:00:1a

> [fedora@vm-fedora ~]$ ip a | grep ether
>    link/ether 02:f2:8c:00:00:1a brd ff:ff:ff:ff:ff:ff

> [fedora@vm-fedora-2 ~]$ ip a | grep ether
>    link/ether 02:f2:8c:00:00:1a brd ff:ff:ff:ff:ff:ff

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

How reproducible:
100%

Steps to Reproduce:
1. create first VM with macAddress using ":" as delimiters (e.g. "02:f2:8c:00:00:1a")
2. create second VM with same macAddress but "-" as delimiter (e.g. "02-f2-8c-00-00-1a")
3.

Actual results:
 Both VMs created

Expected results:
 VMs with the same mac address should not be created.

Additional info:


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