Skip to content

[release-4.16] OCPBUGS-77187: Fix conntrack reconciliation to use service port instead of endpoint port#2998

Merged
openshift-merge-bot[bot] merged 1 commit intoopenshift:release-4.16from
pliurh:release-4.16
Feb 27, 2026
Merged

[release-4.16] OCPBUGS-77187: Fix conntrack reconciliation to use service port instead of endpoint port#2998
openshift-merge-bot[bot] merged 1 commit intoopenshift:release-4.16from
pliurh:release-4.16

Conversation

@pliurh
Copy link
Copy Markdown
Contributor

@pliurh pliurh commented Feb 24, 2026

When reconciling conntrack entries for endpoint changes, we need to use the service port (the externally exposed port) rather than the endpoint port (the target port on the pod). This ensures conntrack entries are properly flushed for the actual service port that clients connect to.

Changes:

  • Add FindServicePortForEndpointSlicePort helper to map endpoint ports to service ports
  • Update reconcileConntrackUponEndpointSliceEvents to use service port for conntrack deletion
  • Handle service not found error explicitly (return early, service deletion is handled separately)

This is a manual backport of commit 6e577b8 by removing UDN-related test code for ServiceFromEndpointSlice that doesn't apply to release-4.16.

Conflict resolution:

  • pkg/util/util.go: dropped IsMirrorEndpointSlice, IsDefaultEndpointSlice, and GetDefaultEndpointSlicesEventHandler (UDN features not present in release-4.16); kept only FindServicePortForEndpointSlicePort
  • pkg/util/util_unit_test.go: dropped TestGetNetworkScopedK8sMgmtHostIntfName (references function not in this branch) and unused imports (types, labels, sets)

…port

When reconciling conntrack entries for endpoint changes, we need to use
the service port (the externally exposed port) rather than the endpoint
port (the target port on the pod). This ensures conntrack entries are
properly flushed for the actual service port that clients connect to.

Changes:
- Add FindServicePortForEndpointSlicePort helper to map endpoint ports to service ports
- Update reconcileConntrackUponEndpointSliceEvents to use service port for conntrack deletion
- Handle service not found error explicitly (return early, service deletion is handled separately)

This is a manual backport of commit 6e577b8
by removing UDN-related test code for ServiceFromEndpointSlice that doesn't
apply to release-4.16.

Conflict resolution:
- pkg/util/util.go: dropped IsMirrorEndpointSlice, IsDefaultEndpointSlice, and
  GetDefaultEndpointSlicesEventHandler (UDN features not present in release-4.16);
  kept only FindServicePortForEndpointSlicePort
- pkg/util/util_unit_test.go: dropped TestGetNetworkScopedK8sMgmtHostIntfName
  (references function not in this branch) and unused imports (types, labels, sets)

Signed-off-by: Peng Liu <pliu@redhat.com>
@openshift-ci openshift-ci Bot requested review from jcaamano and ricky-rav February 24, 2026 07:56
@pliurh pliurh changed the title Fix conntrack reconciliation to use service port instead of endpoint port [release-4.16] OCPBUGS-77187: Fix conntrack reconciliation to use service port instead of endpoint port Feb 24, 2026
@openshift-ci-robot openshift-ci-robot added jira/severity-important Referenced Jira bug's severity is important 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 Feb 24, 2026
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@pliurh: This pull request references Jira Issue OCPBUGS-77187, which is invalid:

  • expected Jira Issue OCPBUGS-77187 to depend on a bug targeting a version in 4.17.0, 4.17.z and in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but no dependents were found

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:

When reconciling conntrack entries for endpoint changes, we need to use the service port (the externally exposed port) rather than the endpoint port (the target port on the pod). This ensures conntrack entries are properly flushed for the actual service port that clients connect to.

Changes:

  • Add FindServicePortForEndpointSlicePort helper to map endpoint ports to service ports
  • Update reconcileConntrackUponEndpointSliceEvents to use service port for conntrack deletion
  • Handle service not found error explicitly (return early, service deletion is handled separately)

This is a manual backport of commit 6e577b8 by removing UDN-related test code for ServiceFromEndpointSlice that doesn't apply to release-4.16.

Conflict resolution:

  • pkg/util/util.go: dropped IsMirrorEndpointSlice, IsDefaultEndpointSlice, and GetDefaultEndpointSlicesEventHandler (UDN features not present in release-4.16); kept only FindServicePortForEndpointSlicePort
  • pkg/util/util_unit_test.go: dropped TestGetNetworkScopedK8sMgmtHostIntfName (references function not in this branch) and unused imports (types, labels, sets)

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.

@pliurh
Copy link
Copy Markdown
Contributor Author

pliurh commented Feb 24, 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 Feb 24, 2026
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@pliurh: This pull request references Jira Issue OCPBUGS-77187, 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.16.z) matches configured target version for branch (4.16.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-71985 is in the state Closed (Done), which is one of the valid states (VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA))
  • dependent Jira Issue OCPBUGS-71985 targets the "4.17.z" version, which is one of the valid target versions: 4.17.0, 4.17.z
  • bug has dependents

Requesting review from QA contact:
/cc @zhaozhanqi

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 zhaozhanqi February 24, 2026 07:58
@zhaozhanqi
Copy link
Copy Markdown
Contributor

pre-merge verified this PR on 4.16

/verified by QE

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

@zhaozhanqi: This PR has been marked as verified by QE.

Details

In response to this:

pre-merge verified this PR on 4.16

/verified by QE

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.

@zhaozhanqi
Copy link
Copy Markdown
Contributor

/retest-required

1 similar comment
@pliurh
Copy link
Copy Markdown
Contributor Author

pliurh commented Feb 26, 2026

/retest-required

@ricky-rav
Copy link
Copy Markdown
Contributor

@jluhrsen are you aware of any problems in the gofmt, lint and unit test jobs? They've started to fail with:
Error: creating runtime static files directory "/.local/share/containers/storage/libpod": mkdir /.local: permission denied

@pliurh
Copy link
Copy Markdown
Contributor Author

pliurh commented Feb 27, 2026

/retest-required

@pliurh
Copy link
Copy Markdown
Contributor Author

pliurh commented Feb 27, 2026

@ricky-rav ci/prow/e2e-aws-ovn-serial is perm-failing. Can we override it?

@ricky-rav
Copy link
Copy Markdown
Contributor

/override ci/prow/e2e-aws-ovn-serial

@ricky-rav
Copy link
Copy Markdown
Contributor

/label backport-risk-assessed
/lgtm

@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 27, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Feb 27, 2026

@ricky-rav: Overrode contexts on behalf of ricky-rav: ci/prow/e2e-aws-ovn-serial

Details

In response to this:

/override ci/prow/e2e-aws-ovn-serial

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.

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Feb 27, 2026

@pliurh: 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/security 88eff28 link false /test security
ci/prow/e2e-aws-ovn-serial 88eff28 link true /test e2e-aws-ovn-serial

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.

Copy link
Copy Markdown
Contributor

@ricky-rav ricky-rav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

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

openshift-ci Bot commented Feb 27, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: pliurh, ricky-rav

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 27, 2026
@openshift-merge-bot openshift-merge-bot Bot merged commit 6c926c1 into openshift:release-4.16 Feb 27, 2026
24 of 25 checks passed
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@pliurh: Jira Issue Verification Checks: Jira Issue OCPBUGS-77187
✔️ 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-77187 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:

When reconciling conntrack entries for endpoint changes, we need to use the service port (the externally exposed port) rather than the endpoint port (the target port on the pod). This ensures conntrack entries are properly flushed for the actual service port that clients connect to.

Changes:

  • Add FindServicePortForEndpointSlicePort helper to map endpoint ports to service ports
  • Update reconcileConntrackUponEndpointSliceEvents to use service port for conntrack deletion
  • Handle service not found error explicitly (return early, service deletion is handled separately)

This is a manual backport of commit 6e577b8 by removing UDN-related test code for ServiceFromEndpointSlice that doesn't apply to release-4.16.

Conflict resolution:

  • pkg/util/util.go: dropped IsMirrorEndpointSlice, IsDefaultEndpointSlice, and GetDefaultEndpointSlicesEventHandler (UDN features not present in release-4.16); kept only FindServicePortForEndpointSlicePort
  • pkg/util/util_unit_test.go: dropped TestGetNetworkScopedK8sMgmtHostIntfName (references function not in this branch) and unused imports (types, labels, sets)

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.16.0-0.nightly-2026-02-28-022130

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-important Referenced Jira bug's severity is important 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.