Skip to content

Conversation

RamLavi
Copy link
Contributor

@RamLavi RamLavi commented Sep 1, 2025

This PR is a followup PR to #30010, adding tests to check duplicate MAC and IP detection:

  • create VM with Preconfigured IPs, assert you can't have IP collision
  • create VM with Preconfigured MAC, assert you can't have MAC collision

RamLavi and others added 3 commits September 1, 2025 15:07
Validates that KubeVirt VMs with preconfigured MAC and IP addresses
maintain those addresses correctly before and after a vmi with duplicate
IP/MAC request is made, and that the vmi with the duplicate address get
the appropriate address conflict error event.

Co-authored-by: Miguel Duarte Barroso <[email protected]>
Signed-off-by: Ram Lavi <[email protected]>
The requested IPs for the primary UDN attachment are not in the VMI
spec, but in an annotation in the VMI. Hence, we need to fetch that
particular annotation, and set it in the duplicate VMI.

This was implemented using the builder pattern, since I suspect in the
future we will need to further customize the VMI spec / metadata; this
will make it simpler to extend the framework in the future.

Signed-off-by: Miguel Duarte Barroso <[email protected]>
This way we can ensure the MAC conflict and IP conflicts are caught, and
in a generic way. With it, we can safely expect to find:
- IP conflicts when there are duplicate IPs in the network
- MAC conflicts when there are duplicate MACs in the network

Co-authored-by: Ram Lavi <[email protected]>
Signed-off-by: Miguel Duarte Barroso <[email protected]>
@RamLavi RamLavi changed the title PreconfiguredUDNAddresses: Add duplicate MAC and IP detection tests CORENET-6363: Add PreconfiguredUDNAddresses duplicate MAC and IP detection tests Sep 1, 2025
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Sep 1, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Sep 1, 2025

@RamLavi: This pull request references CORENET-6363 which is a valid jira issue.

In response to this:

This PR is a followup PR to #30010, adding tests to check duplicate MAC and IP detection:

  • create VM with Preconfigured IPs, assert you can't have IP collision
  • create VM with Preconfigured MAC, assert you can't have MAC collision

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 openshift-eng/jira-lifecycle-plugin repository.

Copy link
Contributor

openshift-ci bot commented Sep 1, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: RamLavi
Once this PR has been reviewed and has the lgtm label, please assign kyrtapz for approval. For more information see the Code Review Process.

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

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

@RamLavi
Copy link
Contributor Author

RamLavi commented Sep 2, 2025

/test e2e-metal-ipi-ovn-bgp-virt-dualstack-techpreview
running this as baseline, expecting it to fail both tests.

@RamLavi
Copy link
Contributor Author

RamLavi commented Sep 2, 2025

/test e2e-metal-ipi-ovn-bgp-virt-dualstack-techpreview running this as baseline, expecting it to fail both tests.

failed as expected

Copy link
Contributor

openshift-ci bot commented Sep 2, 2025

@RamLavi: 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
ci/prow/e2e-metal-ipi-ovn-dualstack 6b6dfb1 link false /test e2e-metal-ipi-ovn-dualstack
ci/prow/e2e-azure 6b6dfb1 link false /test e2e-azure
ci/prow/okd-scos-images 6b6dfb1 link true /test okd-scos-images
ci/prow/e2e-aws-ovn-microshift 6b6dfb1 link true /test e2e-aws-ovn-microshift
ci/prow/e2e-aws-ovn-single-node-upgrade 6b6dfb1 link false /test e2e-aws-ovn-single-node-upgrade
ci/prow/e2e-aws-ovn-upgrade 6b6dfb1 link false /test e2e-aws-ovn-upgrade
ci/prow/e2e-aws-ovn 6b6dfb1 link false /test e2e-aws-ovn
ci/prow/e2e-aws-ovn-edge-zones 6b6dfb1 link false /test e2e-aws-ovn-edge-zones
ci/prow/e2e-aws-ovn-single-node 6b6dfb1 link false /test e2e-aws-ovn-single-node
ci/prow/e2e-metal-ipi-ovn-ipv6 6b6dfb1 link true /test e2e-metal-ipi-ovn-ipv6
ci/prow/e2e-metal-ipi-ovn-kube-apiserver-rollout 6b6dfb1 link false /test e2e-metal-ipi-ovn-kube-apiserver-rollout
ci/prow/e2e-agnostic-ovn-cmd 6b6dfb1 link false /test e2e-agnostic-ovn-cmd
ci/prow/verify 6b6dfb1 link true /test verify
ci/prow/e2e-hypershift-conformance 6b6dfb1 link false /test e2e-hypershift-conformance
ci/prow/e2e-aws-csi 6b6dfb1 link false /test e2e-aws-csi
ci/prow/e2e-aws-ovn-single-node-serial 6b6dfb1 link false /test e2e-aws-ovn-single-node-serial
ci/prow/images 6b6dfb1 link true /test images
ci/prow/e2e-aws-disruptive 6b6dfb1 link false /test e2e-aws-disruptive
ci/prow/okd-scos-e2e-aws-ovn 6b6dfb1 link false /test okd-scos-e2e-aws-ovn
ci/prow/e2e-openstack-ovn 6b6dfb1 link false /test e2e-openstack-ovn
ci/prow/e2e-aws-ovn-serial-2of2 6b6dfb1 link true /test e2e-aws-ovn-serial-2of2
ci/prow/e2e-aws-ovn-microshift-serial 6b6dfb1 link true /test e2e-aws-ovn-microshift-serial
ci/prow/e2e-gcp-ovn-techpreview 6b6dfb1 link false /test e2e-gcp-ovn-techpreview
ci/prow/e2e-aws-proxy 6b6dfb1 link false /test e2e-aws-proxy
ci/prow/e2e-gcp-ovn-techpreview-serial-1of2 6b6dfb1 link false /test e2e-gcp-ovn-techpreview-serial-1of2
ci/prow/e2e-aws-ovn-kube-apiserver-rollout 6b6dfb1 link false /test e2e-aws-ovn-kube-apiserver-rollout
ci/prow/e2e-aws-ovn-fips 6b6dfb1 link true /test e2e-aws-ovn-fips
ci/prow/e2e-aws-ovn-cgroupsv2 6b6dfb1 link false /test e2e-aws-ovn-cgroupsv2
ci/prow/e2e-metal-ipi-ovn-bgp-virt-dualstack-techpreview 6b6dfb1 link false /test e2e-metal-ipi-ovn-bgp-virt-dualstack-techpreview

Full PR test history. Your PR dashboard.

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.

Copy link

openshift-trt bot commented Sep 2, 2025

Risk analysis has seen new tests most likely introduced by this PR.
Please ensure that new tests meet guidelines for naming and stability.

New Test Risks for sha: 6b6dfb1

Job Name New Test Risk
pull-ci-openshift-origin-main-e2e-metal-ipi-ovn-bgp-virt-dualstack-techpreview High - "[sig-network][OCPFeatureGate:PersistentIPsForVirtualization][Feature:Layer2LiveMigration] Kubevirt Virtual Machines when using openshift ovn-kubernetes with user defined networks and persistent ips configured created using NetworkAttachmentDefinitions [Suite:openshift/network/virtualization] should keep ip [OCPFeatureGate:PreconfiguredUDNAddresses] when the VM with preconfigured IP address is created when the address is already taken" is a new test, was only seen in one job, and failed 1 time(s) against the current commit.
pull-ci-openshift-origin-main-e2e-metal-ipi-ovn-bgp-virt-dualstack-techpreview Medium - "[sig-network][OCPFeatureGate:PersistentIPsForVirtualization][Feature:Layer2LiveMigration] Kubevirt Virtual Machines when using openshift ovn-kubernetes with user defined networks and persistent ips configured created using NetworkAttachmentDefinitions [Suite:openshift/network/virtualization] should keep ip [OCPFeatureGate:PreconfiguredUDNAddresses] when the VM with preconfigured IP and MAC attached to a primary UDN is migrated between nodes" is a new test, and was only seen in one job.
pull-ci-openshift-origin-main-e2e-metal-ipi-ovn-bgp-virt-dualstack-techpreview Medium - "[sig-network][OCPFeatureGate:PersistentIPsForVirtualization][Feature:Layer2LiveMigration] Kubevirt Virtual Machines when using openshift ovn-kubernetes with user defined networks and persistent ips configured created using NetworkAttachmentDefinitions [Suite:openshift/network/virtualization] should keep ip [OCPFeatureGate:PreconfiguredUDNAddresses] when the VM with preconfigured IPs attached to a primary UDN is restarted" is a new test, and was only seen in one job.
pull-ci-openshift-origin-main-e2e-metal-ipi-ovn-bgp-virt-dualstack-techpreview High - "[sig-network][OCPFeatureGate:PersistentIPsForVirtualization][Feature:Layer2LiveMigration] Kubevirt Virtual Machines when using openshift ovn-kubernetes with user defined networks and persistent ips configured created using NetworkAttachmentDefinitions [Suite:openshift/network/virtualization] should keep ip [OCPFeatureGate:PreconfiguredUDNAddresses] when the VM with preconfigured MAC address is created when the address is already taken" is a new test, was only seen in one job, and failed 1 time(s) against the current commit.
pull-ci-openshift-origin-main-e2e-metal-ipi-ovn-bgp-virt-dualstack-techpreview Medium - "[sig-network][OCPFeatureGate:PersistentIPsForVirtualization][Feature:Layer2LiveMigration] Kubevirt Virtual Machines when using openshift ovn-kubernetes with user defined networks and persistent ips configured created using NetworkAttachmentDefinitions [Suite:openshift/network/virtualization] should keep ip [OCPFeatureGate:PreconfiguredUDNAddresses] when the VM with preconfigured MAC attached to a primary UDN is restarted" is a new test, and was only seen in one job.
pull-ci-openshift-origin-main-e2e-metal-ipi-ovn-bgp-virt-dualstack-techpreview High - "[sig-network][OCPFeatureGate:PersistentIPsForVirtualization][Feature:Layer2LiveMigration] Kubevirt Virtual Machines when using openshift ovn-kubernetes with user defined networks and persistent ips configured created using [OCPFeatureGate:NetworkSegmentation] UserDefinedNetwork [Suite:openshift/network/virtualization] should keep ip [OCPFeatureGate:PreconfiguredUDNAddresses] when the VM with preconfigured IP address is created when the address is already taken" is a new test, was only seen in one job, and failed 1 time(s) against the current commit.
pull-ci-openshift-origin-main-e2e-metal-ipi-ovn-bgp-virt-dualstack-techpreview Medium - "[sig-network][OCPFeatureGate:PersistentIPsForVirtualization][Feature:Layer2LiveMigration] Kubevirt Virtual Machines when using openshift ovn-kubernetes with user defined networks and persistent ips configured created using [OCPFeatureGate:NetworkSegmentation] UserDefinedNetwork [Suite:openshift/network/virtualization] should keep ip [OCPFeatureGate:PreconfiguredUDNAddresses] when the VM with preconfigured IP and MAC attached to a primary UDN is migrated between nodes" is a new test, and was only seen in one job.
pull-ci-openshift-origin-main-e2e-metal-ipi-ovn-bgp-virt-dualstack-techpreview Medium - "[sig-network][OCPFeatureGate:PersistentIPsForVirtualization][Feature:Layer2LiveMigration] Kubevirt Virtual Machines when using openshift ovn-kubernetes with user defined networks and persistent ips configured created using [OCPFeatureGate:NetworkSegmentation] UserDefinedNetwork [Suite:openshift/network/virtualization] should keep ip [OCPFeatureGate:PreconfiguredUDNAddresses] when the VM with preconfigured IPs attached to a primary UDN is restarted" is a new test, and was only seen in one job.
pull-ci-openshift-origin-main-e2e-metal-ipi-ovn-bgp-virt-dualstack-techpreview High - "[sig-network][OCPFeatureGate:PersistentIPsForVirtualization][Feature:Layer2LiveMigration] Kubevirt Virtual Machines when using openshift ovn-kubernetes with user defined networks and persistent ips configured created using [OCPFeatureGate:NetworkSegmentation] UserDefinedNetwork [Suite:openshift/network/virtualization] should keep ip [OCPFeatureGate:PreconfiguredUDNAddresses] when the VM with preconfigured MAC address is created when the address is already taken" is a new test, was only seen in one job, and failed 1 time(s) against the current commit.
pull-ci-openshift-origin-main-e2e-metal-ipi-ovn-bgp-virt-dualstack-techpreview Medium - "[sig-network][OCPFeatureGate:PersistentIPsForVirtualization][Feature:Layer2LiveMigration] Kubevirt Virtual Machines when using openshift ovn-kubernetes with user defined networks and persistent ips configured created using [OCPFeatureGate:NetworkSegmentation] UserDefinedNetwork [Suite:openshift/network/virtualization] should keep ip [OCPFeatureGate:PreconfiguredUDNAddresses] when the VM with preconfigured MAC attached to a primary UDN is restarted" is a new test, and was only seen in one job.

New tests seen in this PR at sha: 6b6dfb1

  • "[sig-network][OCPFeatureGate:PersistentIPsForVirtualization][Feature:Layer2LiveMigration] Kubevirt Virtual Machines when using openshift ovn-kubernetes with user defined networks and persistent ips configured created using NetworkAttachmentDefinitions [Suite:openshift/network/virtualization] should keep ip [OCPFeatureGate:PreconfiguredUDNAddresses] when the VM with preconfigured IP address is created when the address is already taken" [Total: 1, Pass: 0, Fail: 1, Flake: 0]
  • "[sig-network][OCPFeatureGate:PersistentIPsForVirtualization][Feature:Layer2LiveMigration] Kubevirt Virtual Machines when using openshift ovn-kubernetes with user defined networks and persistent ips configured created using NetworkAttachmentDefinitions [Suite:openshift/network/virtualization] should keep ip [OCPFeatureGate:PreconfiguredUDNAddresses] when the VM with preconfigured IP and MAC attached to a primary UDN is migrated between nodes" [Total: 1, Pass: 1, Fail: 0, Flake: 0]
  • "[sig-network][OCPFeatureGate:PersistentIPsForVirtualization][Feature:Layer2LiveMigration] Kubevirt Virtual Machines when using openshift ovn-kubernetes with user defined networks and persistent ips configured created using NetworkAttachmentDefinitions [Suite:openshift/network/virtualization] should keep ip [OCPFeatureGate:PreconfiguredUDNAddresses] when the VM with preconfigured IPs attached to a primary UDN is restarted" [Total: 1, Pass: 1, Fail: 0, Flake: 0]
  • "[sig-network][OCPFeatureGate:PersistentIPsForVirtualization][Feature:Layer2LiveMigration] Kubevirt Virtual Machines when using openshift ovn-kubernetes with user defined networks and persistent ips configured created using NetworkAttachmentDefinitions [Suite:openshift/network/virtualization] should keep ip [OCPFeatureGate:PreconfiguredUDNAddresses] when the VM with preconfigured MAC address is created when the address is already taken" [Total: 1, Pass: 0, Fail: 1, Flake: 0]
  • "[sig-network][OCPFeatureGate:PersistentIPsForVirtualization][Feature:Layer2LiveMigration] Kubevirt Virtual Machines when using openshift ovn-kubernetes with user defined networks and persistent ips configured created using NetworkAttachmentDefinitions [Suite:openshift/network/virtualization] should keep ip [OCPFeatureGate:PreconfiguredUDNAddresses] when the VM with preconfigured MAC attached to a primary UDN is restarted" [Total: 1, Pass: 1, Fail: 0, Flake: 0]
  • "[sig-network][OCPFeatureGate:PersistentIPsForVirtualization][Feature:Layer2LiveMigration] Kubevirt Virtual Machines when using openshift ovn-kubernetes with user defined networks and persistent ips configured created using [OCPFeatureGate:NetworkSegmentation] UserDefinedNetwork [Suite:openshift/network/virtualization] should keep ip [OCPFeatureGate:PreconfiguredUDNAddresses] when the VM with preconfigured IP address is created when the address is already taken" [Total: 1, Pass: 0, Fail: 1, Flake: 0]
  • "[sig-network][OCPFeatureGate:PersistentIPsForVirtualization][Feature:Layer2LiveMigration] Kubevirt Virtual Machines when using openshift ovn-kubernetes with user defined networks and persistent ips configured created using [OCPFeatureGate:NetworkSegmentation] UserDefinedNetwork [Suite:openshift/network/virtualization] should keep ip [OCPFeatureGate:PreconfiguredUDNAddresses] when the VM with preconfigured IP and MAC attached to a primary UDN is migrated between nodes" [Total: 1, Pass: 1, Fail: 0, Flake: 0]
  • "[sig-network][OCPFeatureGate:PersistentIPsForVirtualization][Feature:Layer2LiveMigration] Kubevirt Virtual Machines when using openshift ovn-kubernetes with user defined networks and persistent ips configured created using [OCPFeatureGate:NetworkSegmentation] UserDefinedNetwork [Suite:openshift/network/virtualization] should keep ip [OCPFeatureGate:PreconfiguredUDNAddresses] when the VM with preconfigured IPs attached to a primary UDN is restarted" [Total: 1, Pass: 1, Fail: 0, Flake: 0]
  • "[sig-network][OCPFeatureGate:PersistentIPsForVirtualization][Feature:Layer2LiveMigration] Kubevirt Virtual Machines when using openshift ovn-kubernetes with user defined networks and persistent ips configured created using [OCPFeatureGate:NetworkSegmentation] UserDefinedNetwork [Suite:openshift/network/virtualization] should keep ip [OCPFeatureGate:PreconfiguredUDNAddresses] when the VM with preconfigured MAC address is created when the address is already taken" [Total: 1, Pass: 0, Fail: 1, Flake: 0]
  • "[sig-network][OCPFeatureGate:PersistentIPsForVirtualization][Feature:Layer2LiveMigration] Kubevirt Virtual Machines when using openshift ovn-kubernetes with user defined networks and persistent ips configured created using [OCPFeatureGate:NetworkSegmentation] UserDefinedNetwork [Suite:openshift/network/virtualization] should keep ip [OCPFeatureGate:PreconfiguredUDNAddresses] when the VM with preconfigured MAC attached to a primary UDN is restarted" [Total: 1, Pass: 1, Fail: 0, Flake: 0]

@RamLavi
Copy link
Contributor Author

RamLavi commented Sep 3, 2025

/testwith openshift/origin/main/e2e-metal-ipi-ovn-bgp-virt-dualstack-techpreview openshift/ovn-kubernetes#2744

1 similar comment
@RamLavi
Copy link
Contributor Author

RamLavi commented Sep 3, 2025

/testwith openshift/origin/main/e2e-metal-ipi-ovn-bgp-virt-dualstack-techpreview openshift/ovn-kubernetes#2744

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants