Skip to content

Bug 112283: Allow KubeDaemonSetMisScheduled alert on external platform clusters - #31556

Open
redhat-chai-bot wants to merge 1 commit into
openshift:mainfrom
redhat-chai-bot:fix/ocpbugs-112283-kube-daemonset-misscheduled-external-platform
Open

Bug 112283: Allow KubeDaemonSetMisScheduled alert on external platform clusters#31556
redhat-chai-bot wants to merge 1 commit into
openshift:mainfrom
redhat-chai-bot:fix/ocpbugs-112283-kube-daemonset-misscheduled-external-platform

Conversation

@redhat-chai-bot

@redhat-chai-bot redhat-chai-bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Extends the KubeDaemonSetMisScheduled alert exclusion in the Prometheus alerts test to also cover platform-external environments, not just managed-service clusters.

Details

The KubeDaemonSetMisScheduled alert fires transiently on platform-external clusters (e.g. OPCT conformance workflows) for the same reason it fires on managed-service clusters: node taints are applied after platform DaemonSets are already scheduled, causing the alert to fire briefly before rebalancing occurs.

The original exclusion (added in OCPBUGS-46079 / PR #29366) was gated on IsManagedServiceCluster(), which returns false for platform-external environments. This PR extends the condition to also check if the cluster's infrastructure platform type is External (configv1.ExternalPlatformType) via the Infrastructure API.

Changes

  • Added Infrastructure API lookup to detect external platform type
  • Combined managed-service and external-platform checks: if isManagedService || isExternalPlatform
  • Added comment referencing OCPBUGS-112283 explaining the platform-external case

AI-generated. Review for accuracy.

@neisw requested via Chai Bot

Summary by CodeRabbit

  • Tests
    • Updated Prometheus alert-state validation to support clusters using the External platform type.
    • The KubeDaemonSetMisScheduled alert is now accepted for both managed-service and External clusters.
    • Improved cluster platform detection during extended test execution, ensuring alert checks accurately reflect the infrastructure configuration and reducing false test failures for supported External platform environments.

@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: automatic mode

@openshift-ci openshift-ci Bot added the ready-for-human-review Indicates a PR has been reviewed by automated tools and is ready for human review label Aug 24, 2026
@coderabbitai

coderabbitai Bot commented Aug 24, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Pro Plus

Run ID: 89a3f9eb-0e8e-4b4e-9254-9ed6efa6f0eb

📥 Commits

Reviewing files that changed from the base of the PR and between efd2580 and f3a13f8.

📒 Files selected for processing (2)
  • test/extended/prometheus/prometheus.go
  • test/extended/util/framework.go

Included review availability: Your plan provides up to 8 included reviews per hour; 6 remain after this review.


Walkthrough

The Prometheus alert-state test now detects External platform clusters and allows transient KubeDaemonSetMisScheduled alerts for External or managed service clusters.

Changes

External platform alert handling

Layer / File(s) Summary
Platform detection and alert validation
test/extended/util/framework.go, test/extended/prometheus/prometheus.go
The framework retrieves the cluster Infrastructure object and checks for configv1.ExternalPlatformType. The Prometheus test uses this result with managed-service status when it allows the transient alert.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to f3a13

This localized test-related change has no actionable merge-blocking risk remaining beyond normal checks and review.

Suggested reviewers: slashpai, rexagod

🚥 Pre-merge checks | ✅ 13 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Test Structure And Quality ⚠️ Warning The new cluster API error assertion uses o.Expect(err).NotTo(o.HaveOccurred()) without a diagnostic message, matching the check's explicit failure example. Add a meaningful message, such as failed to get cluster infrastructure while detecting External platform, to the new assertion.
✅ Passed checks (13 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the bug and the main change: allowing the alert on external platform clusters.
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.
Stable And Deterministic Test Names ✅ Passed The HEAD diff adds only alert logic, a comment, and a helper. Ginkgo It/Describe titles are identical in HEAD^ and HEAD, with no added dynamic title values.
Microshift Test Compatibility ✅ Passed The PR modifies an existing test, not a new Ginkgo test. The changed test has [apigroup:config.openshift.io], so MicroShift CI skips it because the referenced API group is unavailable.
Single Node Openshift (Sno) Test Compatibility ✅ Passed The diff adds no Ginkgo test and introduces no multi-node or HA assumption; it only changes alert allowances and adds an Infrastructure API helper, which is supported on SNO.
Topology-Aware Scheduling Compatibility ✅ Passed The diff only changes an extended Prometheus test and adds an Infrastructure API read helper; it adds no manifests, controllers, operators, or scheduling constraints.
Ote Binary Stdout Contract ✅ Passed The diff adds only an Infrastructure GET and alert condition inside a Ginkgo It block; no main/init/suite-setup stdout write or logging configuration change was introduced.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed The diff modifies an existing alert test and adds only a cluster Infrastructure API lookup; no IPv4 literals, IPv4-only parsing, or external/public connectivity was introduced.
No-Weak-Crypto ✅ Passed The exact patch only adds infrastructure platform detection and alert-test logic; it introduces no weak-crypto primitive, custom crypto, or secret/token comparison.
Container-Privileges ✅ Passed The diff changes only two Go source files. Added lines contain no privileged:true, hostPID, hostNetwork, hostIPC, SYS_ADMIN, or allowPrivilegeEscalation settings.
No-Sensitive-Data-In-Logs ✅ Passed The PR diff adds no logging or output calls and no sensitive values; it only reads Infrastructure.Status.PlatformStatus.Type and changes alert allowlisting.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@openshift-ci
openshift-ci Bot requested review from rexagod and slashpai August 24, 2026 20:45
…m clusters

Platform-external clusters experience the same transient DaemonSet
mis-scheduling as managed-service clusters: out-of-tree cloud providers
taint/label nodes after some platform DaemonSets are initially scheduled,
causing KubeDaemonSetMisScheduled to fire briefly until the DaemonSets are
rebalanced. Extend the existing managed-service exclusion (OCPBUGS-46079)
to also allow this alert on clusters whose infrastructure platform type is
External.

Introduce a reusable exutil.IsExternalPlatformCluster helper in
test/extended/util/framework.go, following the same pattern as
IsSelfManagedHA and IsSingleNode, and use it from the Prometheus alerts
test instead of an inline Infrastructure lookup.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@redhat-chai-bot
redhat-chai-bot force-pushed the fix/ocpbugs-112283-kube-daemonset-misscheduled-external-platform branch from efd2580 to f3a13f8 Compare August 24, 2026 21:32
@openshift-ci

openshift-ci Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

The full list of commands accepted by this bot can be found 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

@neisw

neisw commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

/payload-job periodic-ci-openshift-release-main-nightly-5.1-opct-platform-external-aws

@openshift-ci

openshift-ci Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

@neisw: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-release-main-nightly-5.1-opct-platform-external-aws

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/7371e240-a005-11f1-8b50-42097efbf442-0

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Scheduling required tests:
/test e2e-aws-csi
/test e2e-aws-ovn-fips
/test e2e-aws-ovn-microshift
/test e2e-aws-ovn-microshift-serial
/test e2e-aws-ovn-serial-1of2
/test e2e-aws-ovn-serial-2of2
/test e2e-gcp-csi
/test e2e-gcp-ovn
/test e2e-gcp-ovn-upgrade
/test e2e-metal-ipi-ovn-ipv6
/test e2e-vsphere-ovn
/test e2e-vsphere-ovn-upi

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

Labels

ready-for-human-review Indicates a PR has been reviewed by automated tools and is ready for human review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants