-
Notifications
You must be signed in to change notification settings - Fork 191
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
Bug 1822513: Determine current version by checking for status completed #394
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
What about partial upgrades? I guess it changes the current version.
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.
We should look at how
oc get clusterversion
shows the current version.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.
Any upgrade, even one that immediately fails preconditions gets inserted into the version history at index 0 and then that is used to check if upgrade is for a z-level upgrade. And as I said it is then comparing desired to itself. If I understand your question correctly, no, a partial update would not change my calculated "current version" because it would not have State Completed. I don't see how a cluster can be considered at a given version if the version upgrade was not completed. So it really comes down to what defines a cluster being at a given version. It can't simply be that the version shows up in the version history and I would hope we would not go down the path of trying to figure out how partial a partial upgrade was and if it got far enough along to consider the cluster at that version.
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.
Gives the completed version and shows upgrade progress:
NAME VERSION AVAILABLE PROGRESSING SINCE STATUS
version 4.5.0-rc.1 True True 6m17s Working towards 4.5.0-rc.2: 70% complete
And when I stepped on this upgrade with another before it was completed (there are three entries in version history now):
NAME VERSION AVAILABLE PROGRESSING SINCE STATUS
version 4.5.0-rc.1 True True 8m27s Working towards quay.io/openshift-release-dev/ocp-release-nightly@sha256:cec724b008c35aaf36aeea8fdfc3f22f3f735d772d05f392acd86610de1608cd: downloading update
And finally when Completed:
NAME VERSION AVAILABLE PROGRESSING SINCE STATUS
version 4.6.0-0.nightly-2020-07-15-170241 True False 69s Cluster version is 4.6.0-0.nightly-2020-07-15-170241
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.
@jottofar I asked the question because when a cluster is partially updated, customers can try updating again to a newer version e.g. (in 4.4. fast channel)
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.
Or the question which version it should use as current version? You are suggesting that we should use 4.4.6 as the current version as the last successful upgrade was to that version.
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 am not sure what qualifies for a partial upgrade? I am wondering if the operators like api server, etcd has upgraded (control plane) i.e. moved to the next version but others are not. Does it make any difference ?
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.
In your example, yes. It's just like my example above it and that's what 'oc get currentversion' would show as well.
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.
To use a partial version we would have to introduce logic to figure out what makes a partial version "good enough" to be considered the current version. And as I said, this would differ from what the system returns as current version now which is the last version with state Completed.