-
Notifications
You must be signed in to change notification settings - Fork 247
[release-4.18] OCPBUGS-58412: Fix revision readiness annotation for upgrade compatibility #1976
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: release-4.18
Are you sure you want to change the base?
Conversation
|
@dgrisonnet: This pull request references Jira Issue OCPBUGS-58412, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. In 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. |
682151c to
d9b942c
Compare
| // Make sure that revision-ready is set to true on the | ||
| // revision-status{status.latestAvailableRevision} configmap. This prevents | ||
| // blocking the controller when upgrading to a version that checks revision | ||
| // readiness. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is correct. The other controllers in the revision system don't care about the revision-status configmaps, so if latestAvailableRevision has already been updated then the revision has already "shipped" and might be installed.
d9b942c to
f74e9fc
Compare
f74e9fc to
f0a113e
Compare
22d8b91 to
4f3cb82
Compare
|
@dgrisonnet: The following test failed, say
Full PR test history. Your PR dashboard. 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. |
Signed-off-by: Damien Grisonnet <[email protected]>
4f3cb82 to
e0d34d1
Compare
e0d34d1 to
d4b2925
Compare
benluddy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I understand, the problem here is that the pre-4.18 revision controller would update the latest available revision on the operator status whether or not the latest revision-status configmap had the revision-ready annotation. In 4.18, 0c1a7b5 causes the revision controller's sync loop to exclude revisions with unready statuses when determining the latest available revision, but it's possible that we'd already incremented latest available revision while on 4.17.
With openshift/api@b4969bd#diff-8b3c4bb83b89154fa4b10cb549b4fb2ae0edb4f75a419fec94365f255f2e23b0, another 4.18 change, API validation prevents the revision controller from decreasing the latest available revision if it had already been written, and the revision controller gets stuck early in its control loop.
The current PR forces revision-ready to true in this specific case where we've already incremented the latest available revision (i.e. it's "shipped", the installer controller might already be attempting to roll it out), which corrects the condition that we could have entered whilst on 4.17. We don't need this in 4.19+, because the latest available revision will no longer get ahead of the latest ready revision-status.
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: benluddy, dgrisonnet The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/assign @p0lyn0mial |
Problem
When upgrading OpenShift to a version that includes revision readiness checks, the revision controller could become blocked if existing revision-status configmaps lack the
operator.openshift.io/revision-readyannotation. ThegetLatestAvailableRevision()function only considers revisions withrevision-readyset to"true"as valid, meaning older revision-status configmaps created before this feature would be ignored.This could cause issues during version upgrades where:
revision-status-1) without the readiness annotationSolution
This PR ensures backward compatibility by automatically setting the
operator.openshift.io/revision-readyannotation to"true"on the current latest available revision's configmap during the sync process.Changes made:
Added revision readiness backfill logic in
sync()method:LatestAvailableRevisionexists, check if its corresponding configmap has the readiness annotation"true", update it accordinglyUpdated tests to reflect the new behavior:
revision-readyannotations to test fixtureslatest-revision-ready-annotation-setto verify the annotation is correctly appliedTesting
This change is backward compatible and prevents upgrade blocking scenarios while maintaining the existing revision management functionality.
Related: OCPBUGS-58412