-
Notifications
You must be signed in to change notification settings - Fork 584
config/v1/types_cluster_operator: Tighten up Upgradeable docs #995
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
config/v1/types_cluster_operator: Tighten up Upgradeable docs #995
Conversation
dhellmann
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.
One nit
553af4a to
5de73ed
Compare
|
#995 (comment) is a nit pick but it looks lgtm overall. |
my new understanding after this morning is that the CVO doesn't actually enforce anything. The client tools enforce it (don't let you attempt to set a new target minor if upgradeable=false), but if you edit the targetVersion manually, the CVO is happy to proceed w/ attempting to upgrade w/o you having do to anything special to "force" past it. cc @sdodson |
The CVO does block updates (unless you
And if you ask for an update that doesn't trip one of those
|
5de73ed to
7ef0a53
Compare
|
So not specifically related to this PR, @sdodson and @wking and I talked about our upgrade behavior and we have a pretty complicated interaction between apis and clients, and special cases. We can't do a whole lot about the api, but we need some better documentation that explains the different implications of upgradeable=false, as well as which upgrades are blocked by the client (it won't update the clusterversion resource) and which things are blocked by the cluster (even if you manually set the clusterversion resource, it will refuse to take action). And then what things override those behaviors. things that contribute to upgradeability decisions:
and then on oc adm upgrade we offer: aiui, the first 2 of those are client behaviors. but --force is the client applying an api setting to the cluster. and it's not even entirely clear what "cluster is reporting errors" means. or how that interacts with --allow-upgrade-with-warnings which also claims to allow you to proceed in the face of cluster errors. So something that walks through all the factors that go into evaluating upgrade acceptability/readiness, and then how the client options and api fields interact with/override those factors would be, imho, really useful. |
|
#885 should have tightened up the Anyhow, all of that is scoped a bit higher than what we say about |
not if we do it as follows:
Now, that doesn't buy us a whole lot in terms of protecting users, but it does allow us to move the check from being a client-side decision to being an api-side decision, while not breaking the existing behavior, which I think is a worthy goal, though not an urgent one. We can also introduce a cluster config setting where an admin can specify the behavior they want (block or not block) generally, and then for any given upgrade request, that is the behavior they get unless the client explicitly overrides the cluster setting. While it still doesn't let us default into blocking those edges, it does allow admins to opt into always blocking them by default. Again, not sure any of that is worth the effort at this point, i'd prefer to start w/ better documentation on how the current system works (what decisions are enforced by the api/cluster/cvo and what decisions are enforced by the client, and what each "decision" actually means (e.g. what obstacles does "force" overcome and what obstacles does it not overcome). But after we finish that documentation, if we want to improve the experience i think that is a way to do it. |
|
I agree with a docs first approach to cleaning up this mess we've created. Where do we want those docs though? I'd prefer cluster-version-operator/docs but it also seems like enhancements repo is starting to contain these sort of design decisions which are broadly applicable to the platform. Regardless of which of those we choose we should make sure than an admin friendly version makes it into openshift-docs as well. |
openshift-docs (product docs) is what i had in my head. It's pulling together apis/implementation details from a variety of components (oc adm upgrade, cvo, clusterversion api, cincinatti) so i dunno that there's any component repo that can provide a holistic summary of the interactions and overall behavior. An EP that covers the current behavior might be good also since that would be the starting point if we want to introduce any changes or additions to the behavior. |
"administrators should not upgrade" is way too strict. This commit relaxes that to point out that the message will tell you what's off limits, and the CVO will enforce that (but you can force past the CVO's guard). The focus on minor updates is from [1]. Subsequently, the CVO grew an internal check that even blocks patch bumps when they are unlikely to succeed in the face of unsupported overrides [2]. [1]: https://bugzilla.redhat.com/show_bug.cgi?id=1797624 [2]: https://bugzilla.redhat.com/show_bug.cgi?id=1822844
7ef0a53 to
52ebfaf
Compare
|
/lgtm (technically I am not an apireviewer but this is just updating docs so i don't think it needs a deep level of oversight) |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bparees, wking 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 |
| // current cluster state. When status is False, the cluster-version operator | ||
| // will prevent the cluster from performing impacted updates unless forced. | ||
| // When set on ClusterVersion, the message will explain which updates (minor | ||
| // or patch) are impacted. When set on ClusterOperator, False will block |
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.
Is there an implicit hierarchy here that needs to be called out? For example, if minor version updates are not allowed, are patch version updates also automatically disallowed ?
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.
For example, if minor version updates are not allowed, are patch version updates also automatically disallowed ?
SemVer is MAJOR.MINOR.PATCH, so the two cases we have today are "blocks minor bumps, patch bumps are fine" and "blocks all bumps". So could have been minor or all here. The .spec.overrides-is-set message is:
Disabling ownership via cluster version overrides prevents upgrades. Please remove overrides before continuing.
So the actual user experience should be unambiguous.
"administrators should not upgrade" is way too strict. This commit relaxes that to point out that the message will tell you what's off limits, and the CVO will enforce that (but you can force past the CVO's guard). The focus on minor updates is from rhbz#1797624. Subsequently, the CVO grew an internal check that even blocks patch bumps when they are unlikely to succeed in the face of unsupported overrides rhbz#1822844.