OCPBUGS-99652: prevent duplicate NOTRACK iptables rules on container restart - #3153
OCPBUGS-99652: prevent duplicate NOTRACK iptables rules on container restart#3153ssonigra wants to merge 1 commit into
Conversation
…estart Check whether each NOTRACK rule already exists (iptables -C) before appending it. Without this guard, every ovnkube-controller container restart blindly appends duplicate rules for the Geneve and hybrid overlay VXLAN ports. Because NOTRACK is a non-terminating target, duplicates are all evaluated sequentially, inflating packet counters and wasting CPU. Signed-off-by: Saurab Sonigra <ssonigra@redhat.com>
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
@ssonigra: This pull request references Jira Issue OCPBUGS-99652, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this:
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. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Team Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: ssonigra The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@ssonigra: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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. |
What does this PR do?
Prevents duplicate NOTRACK iptables rules from being added to the
rawtable on every ovnkube-controller container restart by checking if each rule already exists before appending it.Why is this important?
Without this fix, every ovnkube-controller restart blindly appends duplicate rules for the Geneve and hybrid overlay VXLAN ports. Because NOTRACK is a non-terminating target, all duplicates are evaluated sequentially, inflating packet counters and wasting CPU cycles.
Implementation
The fix adds an
ensure-notrack-rulehelper function that:Jira
https://redhat.atlassian.net/browse/OCPBUGS-99652
Related PRs
Test plan
make buildpassesmake test-unitpassesiptables -t raw -L PREROUTING -n -v --line-numbersshows no duplicate NOTRACK rules🤖 Generated with Claude Code