Skip to content

OCPBUGS-74268: release-4.20 fix(localnet, ipamless): Prevent LSP deletion on sync#2941

Merged
openshift-merge-bot[bot] merged 1 commit intoopenshift:release-4.20from
qinqon:release-4.20-ocpbug-66994
Feb 2, 2026
Merged

OCPBUGS-74268: release-4.20 fix(localnet, ipamless): Prevent LSP deletion on sync#2941
openshift-merge-bot[bot] merged 1 commit intoopenshift:release-4.20from
qinqon:release-4.20-ocpbug-66994

Conversation

@qinqon
Copy link
Copy Markdown
Contributor

@qinqon qinqon commented Jan 21, 2026

📑 Description

When ovnkube-node restarts, it runs syncPodsForUserDefinedNetwork which calls allocatePodIPs. For IPAM-less localnet networks (switches with no subnets), IsNonHostSubnetSwitch returns true, causing allocatePodIPs to return empty string. This prevents the pod from being added to expectedLogicalPorts map, causing deleteStaleLogicalSwitchPorts to delete the LSP.

This change add an explicit flag at the subnet allocator to denote that that allocator was created as part of a no host subnet switch, this way code explicitly diferenciates between localnet ipamless and no host subnet since both do no have a subnet but no host subnet do not even have LSPs

(cherry picked from commit d1c55f1) (cherry picked from commit 440dab6)

Fixes #

Additional Information for reviewers

✅ Checks

  • My code requires changes to the documentation
  • if so, I have updated the documentation as required
  • My code requires tests
  • if so, I have added and/or updated the tests as required
  • All the tests have passed in the CI

How to verify it

When ovnkube-node restarts, it runs syncPodsForUserDefinedNetwork which calls
allocatePodIPs. For IPAM-less localnet networks (switches with no subnets),
IsNonHostSubnetSwitch returns true, causing allocatePodIPs to return empty string.
This prevents the pod from being added to expectedLogicalPorts map, causing
deleteStaleLogicalSwitchPorts to delete the LSP.

This change add an explicit flag at the subnet allocator to denote that
that allocator was created as part of a no host subnet switch, this way
code explicitly diferenciates between localnet ipamless and no host
subnet since both do no have a subnet but no host subnet do not even
have LSPs

Signed-off-by: Enrique Llorente <ellorent@redhat.com>
(cherry picked from commit d1c55f1)
(cherry picked from commit 440dab6)
@qinqon qinqon changed the title fix(localnet, ipamless): Prevent LSP deletion on sync release-4.20: fix(localnet, ipamless): Prevent LSP deletion on sync Jan 21, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Jan 21, 2026

@qinqon: 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/4.20-upgrade-from-stable-4.19-e2e-aws-ovn-upgrade-ipsec b166957 link false /test 4.20-upgrade-from-stable-4.19-e2e-aws-ovn-upgrade-ipsec
ci/prow/security b166957 link false /test security

Full PR test history. Your PR dashboard.

Details

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.

@qinqon qinqon changed the title release-4.20: fix(localnet, ipamless): Prevent LSP deletion on sync OCPBUGS-74268: release-4.20 fix(localnet, ipamless): Prevent LSP deletion on sync Jan 22, 2026
@openshift-ci-robot openshift-ci-robot added jira/severity-critical Referenced Jira bug's severity is critical for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Jan 22, 2026
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@qinqon: This pull request references Jira Issue OCPBUGS-74268, which is invalid:

  • expected dependent Jira Issue OCPBUGS-74267 to be in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but it is New instead
  • expected dependent Jira Issue OCPBUGS-74267 to target a version in 4.21.0, but it targets "4.21.z" instead

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

📑 Description

When ovnkube-node restarts, it runs syncPodsForUserDefinedNetwork which calls allocatePodIPs. For IPAM-less localnet networks (switches with no subnets), IsNonHostSubnetSwitch returns true, causing allocatePodIPs to return empty string. This prevents the pod from being added to expectedLogicalPorts map, causing deleteStaleLogicalSwitchPorts to delete the LSP.

This change add an explicit flag at the subnet allocator to denote that that allocator was created as part of a no host subnet switch, this way code explicitly diferenciates between localnet ipamless and no host subnet since both do no have a subnet but no host subnet do not even have LSPs

(cherry picked from commit d1c55f1) (cherry picked from commit 440dab6)

Fixes #

Additional Information for reviewers

✅ Checks

  • My code requires changes to the documentation
  • if so, I have updated the documentation as required
  • My code requires tests
  • if so, I have added and/or updated the tests as required
  • All the tests have passed in the CI

How to verify it

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.

@qinqon
Copy link
Copy Markdown
Contributor Author

qinqon commented Jan 22, 2026

/jira refresh

@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@qinqon: This pull request references Jira Issue OCPBUGS-74268, which is invalid:

  • expected dependent Jira Issue OCPBUGS-74267 to be in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but it is New instead

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

Details

In response to this:

/jira refresh

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.

@qinqon
Copy link
Copy Markdown
Contributor Author

qinqon commented Jan 22, 2026

/retest-required

1 similar comment
@qinqon
Copy link
Copy Markdown
Contributor Author

qinqon commented Jan 22, 2026

/retest-required

@qinqon
Copy link
Copy Markdown
Contributor Author

qinqon commented Jan 22, 2026

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Jan 22, 2026
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@qinqon: This PR has been marked as verified by https://gist.github.com/qinqon/aa085929cbed8ccbed3e6e220595523d.

Details

In response to this:

/verified by https://gist.github.com/qinqon/aa085929cbed8ccbed3e6e220595523d

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.

@qinqon
Copy link
Copy Markdown
Contributor Author

qinqon commented Jan 23, 2026

/verified remove

@openshift-ci-robot openshift-ci-robot removed the verified Signifies that the PR passed pre-merge verification criteria label Jan 23, 2026
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@qinqon: The verified label has been removed.

Details

In response to this:

/verified remove

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.

@qinqon
Copy link
Copy Markdown
Contributor Author

qinqon commented Jan 23, 2026

/jira refresh

@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@qinqon: This pull request references Jira Issue OCPBUGS-74268, which is invalid:

  • expected dependent Jira Issue OCPBUGS-74267 to be in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but it is POST instead

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

Details

In response to this:

/jira refresh

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.

@asood-rh
Copy link
Copy Markdown
Contributor

/verified by @asood-rh

Details in https://issues.redhat.com/browse/OCPBUGS-74268

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Jan 26, 2026
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@asood-rh: This PR has been marked as verified by @asood-rh.

Details

In response to this:

/verified by @asood-rh

Details in https://issues.redhat.com/browse/OCPBUGS-74268

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.

@qinqon
Copy link
Copy Markdown
Contributor Author

qinqon commented Jan 28, 2026

/jira refresh

@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@qinqon: This pull request references Jira Issue OCPBUGS-74268, which is invalid:

  • expected dependent Jira Issue OCPBUGS-74267 to be in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but it is MODIFIED instead

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

Details

In response to this:

/jira refresh

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.

@qinqon
Copy link
Copy Markdown
Contributor Author

qinqon commented Jan 30, 2026

/jira refresh

@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@qinqon: This pull request references Jira Issue OCPBUGS-74268, which is invalid:

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

Details

In response to this:

/jira refresh

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.

@qinqon
Copy link
Copy Markdown
Contributor Author

qinqon commented Jan 30, 2026

/jira refresh

@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@qinqon: This pull request references Jira Issue OCPBUGS-74268, which is invalid:

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

Details

In response to this:

/jira refresh

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.

@qinqon
Copy link
Copy Markdown
Contributor Author

qinqon commented Jan 30, 2026

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Jan 30, 2026
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@qinqon: This pull request references Jira Issue OCPBUGS-74268, which is valid. The bug has been moved to the POST state.

7 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.20.z) matches configured target version for branch (4.20.z)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)
  • release note text is set and does not match the template
  • dependent bug Jira Issue OCPBUGS-74267 is in the state Verified, which is one of the valid states (VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA))
  • dependent Jira Issue OCPBUGS-74267 targets the "4.21.0" version, which is one of the valid target versions: 4.21.0
  • bug has dependents

Requesting review from QA contact:
/cc @asood-rh

Details

In response to this:

/jira refresh

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.

@openshift-ci openshift-ci Bot requested a review from asood-rh January 30, 2026 19:12
@ricky-rav
Copy link
Copy Markdown
Contributor

/label backport-risk-assessed

@openshift-ci openshift-ci Bot added the backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. label Feb 2, 2026
@kyrtapz
Copy link
Copy Markdown
Contributor

kyrtapz commented Feb 2, 2026

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Feb 2, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Feb 2, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kyrtapz, qinqon

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

The pull request process is described here

Details 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

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 2, 2026
@openshift-merge-bot openshift-merge-bot Bot merged commit 3f6615b into openshift:release-4.20 Feb 2, 2026
28 of 30 checks passed
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@qinqon: Jira Issue Verification Checks: Jira Issue OCPBUGS-74268
✔️ This pull request was pre-merge verified.
✔️ All associated pull requests have merged.
✔️ All associated, merged pull requests were pre-merge verified.

Jira Issue OCPBUGS-74268 has been moved to the MODIFIED state and will move to the VERIFIED state when the change is available in an accepted nightly payload. 🕓

Details

In response to this:

📑 Description

When ovnkube-node restarts, it runs syncPodsForUserDefinedNetwork which calls allocatePodIPs. For IPAM-less localnet networks (switches with no subnets), IsNonHostSubnetSwitch returns true, causing allocatePodIPs to return empty string. This prevents the pod from being added to expectedLogicalPorts map, causing deleteStaleLogicalSwitchPorts to delete the LSP.

This change add an explicit flag at the subnet allocator to denote that that allocator was created as part of a no host subnet switch, this way code explicitly diferenciates between localnet ipamless and no host subnet since both do no have a subnet but no host subnet do not even have LSPs

(cherry picked from commit d1c55f1) (cherry picked from commit 440dab6)

Fixes #

Additional Information for reviewers

✅ Checks

  • My code requires changes to the documentation
  • if so, I have updated the documentation as required
  • My code requires tests
  • if so, I have added and/or updated the tests as required
  • All the tests have passed in the CI

How to verify it

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.

@openshift-merge-robot
Copy link
Copy Markdown
Contributor

Fix included in accepted release 4.20.0-0.nightly-2026-02-03-205056

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. jira/severity-critical Referenced Jira bug's severity is critical for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.