OCPBUGS-109740: Fix tnf_cluster_in_service during per-node maintenance - #1678
Conversation
When all nodes are placed in maintenance individually via `pcs node maintenance --all`, the cluster-level maintenance-mode property is not set, causing tnf_cluster_in_service to incorrectly stay 1. Expand isClusterInMaintenance to also detect when every node is individually in maintenance. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
Skipping CI for Draft Pull Request. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
WalkthroughPacemaker maintenance detection now recognizes cluster-wide maintenance and the case where all nodes are individually in maintenance. Tests cover these combinations and add an XML scenario for an unhealthy, out-of-service cluster. ChangesMaintenance Detection
Estimated code review effort: 2 (Simple) | ~10 minutes Mergeability Score: 🔵 Low · up to The change correctly targets per-node maintenance detection, but cluster maintenance status could still be misclassified for incomplete or non-member node data. The PR is mergeable with explicit owner awareness and follow-up to align the node-set handling. Suggested reviewers: 🚥 Pre-merge checks | ✅ 14 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (14 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
On-cluster verificationTested on a cluster-bot TNF cluster ( BaselineAfter
|
|
@lucaconsalvi: This pull request references OCPEDGE-2901 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "5.0.0" version, but no target version was set. 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. |
fonta-rh
left a comment
There was a problem hiding this comment.
Reviewed the logic change in isClusterInMaintenance, test coverage, cross-file interactions with the TNFNodeInMaintenance alert guard, and edge cases.
- Empty-nodes guard prevents vacuous-truth on the
allMaintenancecheck != "true"correctly handles absentmaintenanceattribute (no nil deref risk)- TNFNodeInMaintenance's
tnf_cluster_in_service == 1guard now correctly suppresses duringpcs node maintenance --all, which was the bug - Healthcheck consumer at
healthcheck.gohandles the new behavior correctly - Test fixture
all_nodes_maintenance.xmlcovers the new path
Clean fix at the right level — expanding isClusterInMaintenance generalizes the mechanism rather than adding a special case.
/lgtm
|
Scheduling required tests: |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: fonta-rh The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/lgtm |
|
/verified by @lucaconsalvi |
|
@lucaconsalvi: This PR has been marked as verified by 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. |
|
/retest |
|
@lucaconsalvi: This pull request references Jira Issue OCPBUGS-109740, which is invalid:
Comment 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. |
|
/hold |
|
@dhensel-rh: The 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. |
|
/unhold |
|
/retest |
|
/jira refresh |
|
@lucaconsalvi: This pull request references Jira Issue OCPBUGS-109740, which is invalid:
Comment 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. |
|
/jira refresh |
|
@lucaconsalvi: This pull request references Jira Issue OCPBUGS-109740, which is valid. 3 validation(s) were run on this bug
No GitHub users were found matching the public email listed for the QA contact in Jira (dhensel@redhat.com), skipping review request. 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. |
|
/cherry-pick release-5.0 |
|
@lucaconsalvi: once the present PR merges, I will cherry-pick it on top of 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 kubernetes-sigs/prow repository. |
|
/retest |
|
@lucaconsalvi: all tests passed! 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. |
|
@lucaconsalvi: Jira Issue Verification Checks: Jira Issue OCPBUGS-109740 Jira Issue OCPBUGS-109740 has been moved to the MODIFIED state and will move to the VERIFIED state when the change is available in an accepted nightly payload. 🕓 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. |
|
@lucaconsalvi: new pull request created: #1681 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 kubernetes-sigs/prow repository. |
|
Fix included in release 5.1.0-0.nightly-2026-08-18-031603 |
Summary
tnf_cluster_in_serviceincorrectly staying1when all nodes are placed in maintenance individually viapcs node maintenance --allisClusterInMaintenanceto also detect when every node has its per-node maintenance flag set, since this does not set the cluster-levelmaintenance-modepropertyTNFClusterInMaintenancefires correctly instead of two noisy per-nodeTNFNodeInMaintenancealertsTest plan
isClusterInMaintenancecovering: cluster-level property, all nodes individually in maintenance, single node in maintenance, no nodes, empty propertyall_nodes_maintenance.xmlfixture verifying end-to-end cluster condition outputpcs node maintenance --all→ checktnf_cluster_in_service == 0Fixes: https://redhat.atlassian.net/browse/OCPEDGE-2901
🤖 Generated with Claude Code
Summary by CodeRabbit