Skip to content

OCPBUGS-99208: iptables-alerter: ignore Azure Monitor Agent rules - #3088

Open
danwinship wants to merge 1 commit into
openshift:masterfrom
danwinship:iptables-alerter-ama
Open

OCPBUGS-99208: iptables-alerter: ignore Azure Monitor Agent rules#3088
danwinship wants to merge 1 commit into
openshift:masterfrom
danwinship:iptables-alerter-ama

Conversation

@danwinship

@danwinship danwinship commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

In (some?) ARO clusters, there is an upstream Azure Monitor Agent that creates iptables rules in its pods. There's a bug telling the ARO team they need to get rid of them (https://redhat.atlassian.net/browse/OCPBUGS-99624). Make CNO ignore them now rather than logging errors about them (since it's not something end users can fix).

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: LGTM mode

@openshift-ci-robot openshift-ci-robot added jira/severity-low Referenced Jira bug's severity is low 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 Jul 23, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@danwinship: This pull request references Jira Issue OCPBUGS-99208, which is invalid:

  • expected the bug to target the "5.0.0" version, but no target version was set

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:

In (some?) ARO clusters, there is an upstream Azure Monitor Agent that creates iptables rules in its pods. Ignore those rules for now.

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.

@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown

Walkthrough

The iptables alerter excludes rules containing 127.0.0.1:8421 when scanning pod network namespaces.

Changes

iptables alerter filtering

Layer / File(s) Summary
Filter Azure Monitor Agent rules
bindata/network/iptables-alerter/002-script.yaml
check_pods skips iptables entries containing 127.0.0.1:8421 before selecting the first remaining -A rule.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Suggested reviewers: mattedallo, pperiyasamy


🔕 Pre-merge checks override applied

The pre-merge checks have been overridden successfully. You can now proceed with the merge.

Overridden by @danwinship via checkbox on 2026-07-24T13:35:51.261Z.

❌ Failed checks (3 errors)

Check name Status Explanation Resolution
Pr Quality ❌ Error [IGNORED] Behavioral change is tiny (1 file, +3/-2), but the PR description is only one sentence and lacks Why/What/Testing/impact sections. Rewrite the description with Why, What, CI verification/platforms, root cause/fix, and user/upgrade or rollback impact.
Commit Message Quality ❌ Error [IGNORED] The PR has one commit, but its message is only a subject line with no body, so it doesn’t explain why the change is needed. Add a non-empty commit body that states the motivation/why, and keep the subject concise and component-prefixed.
Unit Tests For Go Changes ❌ Error [IGNORED] bindata/network/iptables-alerter/002-script.yaml changed, and no *_test.go files were added or modified in the PR. Add or update tests for the bindata change, or document why tests are unnecessary in the PR description and use @coderabbitai ignore pre-merge checks if justified.
✅ Passed checks (21 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the change and uses an imperative verb within the length limit.
Description check ✅ Passed The description directly explains the Azure Monitor Agent iptables rule filtering change.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
E2e Tests For Feature Changes ✅ Passed No Go files under pkg/ or cmd/ were changed; the E2E-testing requirement for Go behavior changes is not triggered.
Rbac Least Privilege ✅ Passed Only bindata/network/iptables-alerter/002-script.yaml changed, and it is a ConfigMap script, not a Role/ClusterRole.
Docs For Feature And Behavior Changes ✅ Passed Only bindata/network/iptables-alerter/002-script.yaml changed; no docs/ or .md files were modified, and this is a targeted bug fix.
Stale Project Docs And Config ✅ Passed Only the iptables-alerter script changed; docs/.coderabbit reference the component generally and no docs/config paths or behavior notes became inaccurate.
Go And Test Code Quality ✅ Passed HEAD changes only bindata/network/iptables-alerter/002-script.yaml; no new or modified Go or test code to violate the check.
Ai-Generated Code Smell ✅ Passed Only a small awk filter/comment change; no slop, AI references, or disproportionate/generated test additions found.
Stable And Deterministic Test Names ✅ Passed The PR only changes an iptables script YAML; no Ginkgo test titles or test files were modified, so the naming rule is unaffected.
Test Structure And Quality ✅ Passed PR changes only a shell script; no Ginkgo tests were added or modified, so the test-quality check is not applicable.
Microshift Test Compatibility ✅ Passed Only a YAML script changed; no new or modified Ginkgo tests, APIs, or MicroShift-relevant code were added.
Single Node Openshift (Sno) Test Compatibility ✅ Passed Only a YAML script changed; no Go/e2e test definitions were added, so SNO test compatibility is not implicated.
Topology-Aware Scheduling Compatibility ✅ Passed Only the iptables-alerter script changed; it adds an iptables filter and no scheduling constraints, replicas, selectors, or affinities.
Ote Binary Stdout Contract ✅ Passed PR only tweaks a ConfigMap shell script; no OTE binary main/init/suite stdout writes were added.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed No Ginkgo tests were added; the PR only tweaks an iptables-alerter shell script filter, so IPv4/disconnected test compatibility is not applicable.
No-Weak-Crypto ✅ Passed The PR only changes an awk filter in a shell script; no weak crypto, custom crypto, or secret/token comparisons are introduced.
Container-Privileges ✅ Passed Only changed file is a ConfigMap script; the diff adds an awk filter and no privileged/host* or escalation settings appear.
No-Sensitive-Data-In-Logs ✅ Passed PASS: The only change is an awk exclusion for 127.0.0.1:8421; it adds no new logging and doesn't introduce passwords/tokens/PII exposure.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@openshift-ci
openshift-ci Bot requested review from mattedallo and pperiyasamy July 23, 2026 21:03
@openshift-ci

openshift-ci Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: danwinship

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 Jul 23, 2026
@danwinship

Copy link
Copy Markdown
Contributor Author

/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 Jul 23, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

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

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (5.0.0) matches configured target version for branch (5.0.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)
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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@bindata/network/iptables-alerter/002-script.yaml`:
- Line 40: Reuse the existing 127.0.0.1:8421 exclusion in the per-pod iptables
scan around the pod-selection pipeline at lines 80-83, not only in the
node-level pre-scan. Ensure pod rules containing only the Azure Monitor Agent
endpoint are filtered out before reporting a false-positive event.
- Line 40: Update the iptables filtering pipeline to remove the inline comment
from the continuation line and replace the grep-based 127.0.0.1:8421 exclusion
with an awk filter that handles all-matching exclusions without causing pipefail
failure; place any explanatory comment on its own line.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 6f28da9f-f176-4701-8eda-caacb320b43e

📥 Commits

Reviewing files that changed from the base of the PR and between a9eba93 and 0e94db8.

📒 Files selected for processing (1)
  • bindata/network/iptables-alerter/002-script.yaml

Comment thread bindata/network/iptables-alerter/002-script.yaml Outdated
@danwinship
danwinship force-pushed the iptables-alerter-ama branch from 0e94db8 to 17976d2 Compare July 23, 2026 21:13
@openshift-ci

openshift-ci Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

@danwinship: The following test 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/5.0-upgrade-from-stable-4.22-e2e-azure-ovn-upgrade 17976d2 link false /test 5.0-upgrade-from-stable-4.22-e2e-azure-ovn-upgrade

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.

@danwinship

Copy link
Copy Markdown
Contributor Author

/verified by @danwinship

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Jul 24, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@danwinship: This PR has been marked as verified by @danwinship.

Details

In response to this:

/verified by @danwinship

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-robot

Copy link
Copy Markdown
Contributor

@danwinship: This pull request references Jira Issue OCPBUGS-99208, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (5.0.0) matches configured target version for branch (5.0.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)
Details

In response to this:

In (some?) ARO clusters, there is an upstream Azure Monitor Agent that creates iptables rules in its pods. There's a bug telling the ARO team they need to get rid of them (https://redhat.atlassian.net/browse/OCPBUGS-99624). Make CNO ignore them now rather than logging errors about them (since it's not something end users can fix).

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.

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. jira/severity-low Referenced Jira bug's severity is low 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. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants