OCPBUGS-23746: Add availableInertia support to operator status controller - #2429
OCPBUGS-23746: Add availableInertia support to operator status controller#2429tchap wants to merge 1 commit into
Conversation
The OperatorAvailable condition now respects an inertia window, similar to the existing degradedInertia behavior. This allows operators to suppress transient availability fluctuations within a configurable time window. A new WithAvailableInertia method enables operators to set custom inertia thresholds, and comprehensive tests validate the inertia behavior for various condition scenarios.
|
@tchap: This pull request references Jira Issue OCPBUGS-23746, 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. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan includes up to 12 reviews per rolling hour; 11 remain after this review. Walkthrough
ChangesAvailable condition inertia
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The PR adds configurable inertia handling for operator availability conditions; no actionable merge-blocking risk remains beyond normal checks and review. 🚥 Pre-merge checks | ✅ 15✅ Passed checks (15 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
/jira refresh |
|
@tchap: This pull request references Jira Issue OCPBUGS-23746, which is valid. 3 validation(s) were run on this bug
Requesting review from QA contact: 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. |
|
@tchap: 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. |
|
/assign @dusk125 |
|
/lgtm |
|
/approve |
|
/lgtm |
1 similar comment
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: dusk125, fgiudici, tchap, tjungblu, tmshort 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 |
| output := *c | ||
| output.availableInertia = inertia | ||
| return &output | ||
| } |
There was a problem hiding this comment.
Since this was considered and nacked before, I think we should talk about what are the implications of this and then make an informed decision. See this comment in the PR where the inertia framework was introduced: #632 (comment). The statement, If someone thinks up a case, they'll need to argue it out in a library-go PR from @wking is what need to happen now :)
I understand this is intended to fix the flipping of the Available condition, however, I believe the lack of support for inertia here was intentional. From my understanding, the current rationale is that it's acceptable to delay reporting Degraded because nothing breaks if it's slow to flip. However, delaying moving out from a Available=false state can trigger more strong reactions, like blocking upgrades, alerts, etc. The other way around is also problematic: delaying moving out from a Available=true is lying about availability (which seems to be a bigger sin than lying about degradation :) ).
I'd like to hear @wking thoughts on this.
There was a problem hiding this comment.
Also, if we decide to allow this, would it make sense define a default inertia value for Available, so that operators can't overdo it?
There was a problem hiding this comment.
There's a lot of diversity of view around how this kind of thing should be handled, and I've personally given up on trying to convince folks to consolidate around some kind of consistent policy here ;). Trying to describe the main approaches I've heard:
- Some folks feel that if an component is not available for even a short time (e.g. while a leader lease is being handed off between outgoing and incoming instances of a controller), then the controller is not available during that lease-handoff period, and the ClusterOperator should show
Available=False. For these folks,Availableinertia doesn't seem to be very useful. - Some folks feel like there are expected, blippy things that happen in the life of a healthy cluster, and even though
ClusterOperatorDowncooksfor: 10mbefore sounding itscriticalalert, someone watching the ClusterOperator directly (e.g. inoc get clusteroperators ...or the web-console/settings/cluster/clusteroperatorspage) might see anAvailable=Falseclaim and panic, without realizing that the issue was regular business and expected to resolve itself shortly. These folks might findAvailableinertia useful, but can also apply their own inertia internally before feeding into library-go helpers to provide as much buffering as they think "regular business" deserves. For example, retrying a failed Kube API request a few times before setting an initialAvailable*toFalseorUnknown. So while this pull would help folks with this approach to denoise their ClusterOperator claims vs. expected disruption, I don't see this pull being a requirement for that kind of denoising. - Some folks feel like a highly-available cluster should have no disruption, in which case there's no need to have any inertia or set
Available=False. I feel like we do a pretty solid job at zero-disruption in general, but we're certainly not perfect.
The current OpenShift origin test-policy says that the "someone watching the ClusterOperator directly might see an Available=False claim and panic" concerns have weight. If the folks setting policy decide to soften that approach, or grant exceptions that last forever and which we don't plan on ever fixing, that's up to them (e.g. openshift/origin#30775 adjusted the policy to stop caring what happened on single-node clusters). If the policies require denoising, both the inertial/retry option (whether via this pull or other tooling) and the "reduce the actual disruption" options are on the table, and I'm fine leaving it up to the impacted component's maintainers to pick the approach that seems most appropriate to them for that particular disruption. If folks overdo it on the "decide not to bubble up disruption because it might be expected/acceptable" direction, anyone who notices (e.g. a bitten cluster admin) can file a bug reporting that. And if folks underdo it and pester admins about issues that shortly afterward resolve on their own, anyone who notices can file bugs reporting that too (which is what this pull's OCPBUGS-23746 is). So there are forcing functions in both directions to keep the component maintainers honest.
The OperatorAvailable condition now respects an inertia window, similar to the existing degradedInertia behavior. This allows operators to suppress transient availability fluctuations within a configurable time window. A new WithAvailableInertia method enables operators to set custom inertia thresholds, and comprehensive tests validate the inertia behavior for various condition scenarios.
This basically replaces #2426 . I am pushing this now since the other author is on vacation and I would like to proceed.
#2057 can also be closed once this is merged IMO.
Summary by CodeRabbit