-
Notifications
You must be signed in to change notification settings - Fork 492
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
OTA-1339: Update Status API and Controller #1701
base: master
Are you sure you want to change the base?
Conversation
@petr-muller: This pull request references OTA-1339 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 task to target the "4.18.0" version, but no target version was set. 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. |
@petr-muller: This pull request references OTA-1339 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 task to target the "4.18.0" version, but no target version was set. 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. |
Inactive enhancement proposals go stale after 28d of inactivity. See https://github.com/openshift/enhancements#life-cycle for details. Mark the proposal as fresh by commenting If this proposal is safe to close now please do so with /lifecycle stale |
/remove-lifecycle stale |
annoying to maintain word wrap and difference is better seen in git
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 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 |
424a26a
to
85754c6
Compare
Describe new resources to be delivered in the cluster for USC
ea9283f
to
6cd4676
Compare
6cd4676
to
1d3d7bf
Compare
@petr-muller: This pull request references OTA-1339 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 task to target the "4.19.0" version, but no target version was set. 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. |
|
||
The Update Status Controller will run as a part of the hosted control plane. Unlike in Standalone, where it is a CVO operand, USC will be managed by the Control Plane Controller in HCP, where the CVO does not have access to management cluster API and cannot manage resources there. USC needs to access the management cluster API layer to manage the status-reporting API (which targets cluster administrators tasked with updating clusters) and needs to report insights about both the hosted cluster and management cluster resources. It will also need access to the hosted cluster API layer to report on resources present there. | ||
|
||
Because `UpdateStatus` API is cluster-scoped, it is not suitable for HCP use, and we will need to introduce a namespaced HCP-specific flavor, such as `HostedClusterUpdateStatus`. HCP-specific API variant will also need to be able to refer to resources in two API surfaces (management and hosted clusters), while the `UpdateStatus` API can rely on all resources being in the same cluster and use simple resource references. |
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.
This section talks about an HostedClusterUpdateStatus
. In this proposal, is this resource expected to contain also the NodePool status, or there will be N NodePoolUpdateStatus
, one for each NodePool?
I think it would be better to be clear on this point.
Option 2 is more aligned with HyperShift topology IMO
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.
The UpdateStatus
is more like a container for insights, there's exactly one for a cluster, so in HCP it needs to be namespaced and needs to have a different name - HostedCluster...
here refers more to a "hosted cluster" as an entity, not HostedCluster
as a resource.
The actual status tied to a resource that represents the cluster would be exposed through a status insight, so you'd have a HostedClusterStatusInsight
(=HCP analogue of the ClusterVersionStatusInsight
on Standalone), and also a NodePoolStatusInsight
per each NodePool (=HCP analogues of the MachineConfigPoolStatusInsight
on Standalone).
|
||
Because `UpdateStatus` API is cluster-scoped, it is not suitable for HCP use, and we will need to introduce a namespaced HCP-specific flavor, such as `HostedClusterUpdateStatus`. HCP-specific API variant will also need to be able to refer to resources in two API surfaces (management and hosted clusters), while the `UpdateStatus` API can rely on all resources being in the same cluster and use simple resource references. | ||
|
||
The updates in HCP are not initiated by the [`hcp` client][hcp-client] binary but by [directly modifying `HostedCluster` and `NodePool` resources][updates-in-hcp] using the `oc` client. Hence, at the moment, there is no apparent suitable place to put the update status UX (a client that would consume a `HostedClusterUpdateStatus` instance and present its content). The best place for that is the [`hcp` client][hcp-client], if necessary. It is expected that managed OCP product layers using HCP (ROSA) would consume `HostedClusterUpdateStatus` to improve their update experience, but that work is outside the scope of this enhancement. |
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.
Just to note that so far in my understanding is that HyperShift tries to expose all the feedbacks for the consumer either in the HostedCluster
or in the NodePool
resources. So exposing the UpgradeStatus in a dedicated CR for the user to consume is somehow a design change. But I defer to the Hypershift team for comments on that.
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.
Yeah, that's true. We have a similar tension in Standalone, where the information is supposed to be exposed through ClusterVersion
, ClusterOperator
and MachineConfigPool
resource status
, but the APIs are not expressive enough, typically there's too much aggregation resulting in single kube Condition that ends up too high-level, and the amount of interpretation a client needs to do to determine the update status is quite high.
We are being asked by the BU for the Status API to be present in both Standalone and HCP, the current proposal is my best effort to bring the same experience to both form factors.
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.
Thanks, I agree, there is a limit on the aggregation we can do, especially for the upgrade use case, so it makes sense to explore this path for me as an API consumer. It can definitely help reducing the logic client-side,
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.
here the information is supposed to be exposed through ClusterVersion, ClusterOperator and MachineConfigPool resource status, but the APIs are not expressive enough
Is there merit in extending these objects to improve their status if this is an issue?
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.
There is absolutely merit in improving resource statuses, but I view this as a synergy with the proposal rather than being sufficient for the problems we're solving. Several arguments:
- We cannot easily add new status information for Nodes
- In some cases (upgrade...) the status is not really fitting the spec->status reconciliation over one resource. One second after CVO acknowledges an update, all COs and all Nodes essentially become "outdated" (from the user PoV at least!) but nothing has an idea about that, except for CVO. But even CVO does not know everything that happens during the update (especially, it does not know anything about Nodes). So who maintains the "Outdated=True" thing where?
- General fragmentation of the APIs is a concern. Good status will still only be useful if either the user knows about the resource to inspect and the fact that it will expose a status. This is natural for kube enthusiasts and OpenShift experts, but our users are often not that. So you can take advantage of the fact that all these are APIs, so you can build a $thing that inspects and interprets all of them, but now you have logic, which partially encodes knowledge of the OCP as a system. And we have at least three places that need this logic (admin console, CLI, console.redhat.com).
We also have a bit of a Conway's law problem here IMO. We have subsystems for which individual teams are responsible, and they expose their status in some way. But we do not have anyone responsible for the status of the whole thing, and that means we are expecting our users to understand our components (or at least understand well that OpenShift is a distributed system made of components) when they are actually approaching our product as a "whole thing" and want to interact with it that way.
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 cannot easily add new status information for Nodes
We have just implemented MachineConfigNode, which will provide a lot of new status about upgrades of Nodes, is there data missing from that which you think we may want to request is added?
So who maintains the "Outdated=True" thing where?
Does the CVO not have any status today to show how many COs are reporting that they are on an older version?
But we do not have anyone responsible for the status of the whole thing
This raises an interesting question, do you think we need to impose standards on the individual teams to make sure they expose their status in a consistent manner so that we can reduce that cognitive load for end users?
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 have just implemented MachineConfigNode, which will provide a lot of new status about upgrades of Nodes, is there data missing from that which you think we may want to request is added?
I'm not sure. But generally my problem is not missing data, and if "We cannot easily add new status information for Nodes" would be the issue then I'd agree MCN is good solution alone.
Does the CVO not have any status today to show how many COs are reporting that they are on an older version?
No. It has a Progressing condition which in a string form can say something like "Update in progress, 48% complete. Waiting on machine-config." but it actually does not monitor COs all the time. It applies payload manifests in a structured way, and when it applies a CO one it waits for CO version to be bumped before going further, but that's it. It does not care at all about COs already updated or the ones that will be updated in the future.
This raises an interesting question, do you think we need to impose standards on the individual teams to make sure they expose their status in a consistent manner so that we can reduce that cognitive load for end users?
That would be a great improvement, yes. I don't know if its achievable. Its definitely not achievable fast or easily. The ideal state would be something like a distributed API with an unified surface. But right now we seem to have trouble even enforcing a shared understanding (not to say compliant implementation) of Available and Degraded on COs. It's hard, and it is not just a technical problem.
|
||
##### Update Health Insights | ||
|
||
Update Health Insights report a state or condition in the cluster that is abnormal or negative and either affects or is affected by the update. Ideally, none would be generated in a standard healthy update. Health insights should communicate a condition that requires immediate attention by the cluster administrator and should be actionable. Links to resources helpful in the given situation should accompany health insights. Health insights can reference multiple resources involved in the situation. For example, a health insight exposing a failure to drain a node would reference the `Node`, the `Pod` that fails to be drained, and the `PodDisruptionBudget` that protects it. Individual resources can be involved in multiple insights. |
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.
nit: "requires immediate attention" might be too strong. For example, the impact of a PDB-protected workload blocking a Node drain might just be "Node drain doesn't progress until the PDB issue resolves", which might just be "wait for the PDB-protected CI run to wrap up". Can we soften to something like "that warrants attention by the cluster administrator" so we have room for things like PDB-vs-drain that sit on the border between "admin might care" and "admin might not care, but informing them is still expected to be acceptable signal-to-noise"?
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.
Sounds good, addressed in 353a4b5
|
||
#### Update Status Controller | ||
|
||
The Update Status Controller (USC) is a new component in OpenShift that will be deployed directly by the CVO and is being treated as its operand. This is uncommon in OpenShift, as the CVO typically deploys only second-level operators as its operands. In this model, the USC (providing cluster functionality) would normally be an operand, and we would need to invent a new cluster operator to manage it. Because the CVO is directly involved in updates, such an additional layer does not have value. |
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.
nit: might be worth inlining or linking your your:
Adding this layer can be considered in the future if the proposed model is problematic.
here, so folks reading through the doc in order understand that you're deferring this layer for now, and not designing anything that would make it hard to add this layer if future folks decide it would have sufficient value.
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.
Sounds good, addressed in 353a4b5
|
||
To avoid inflating OpenShift payload images, the USC will be delivered in the same image as the CVO, so its code will live in the `openshift/cluster-version-operator` repository. The USC will be either a separate binary or a subcommand of the CVO binary (the CVO already has subcommands). | ||
|
||
> Note: As of Jan 7, the prototyping work showed the via-CVO delivery causes issues because the CVO image and manifests inside are treated specially by code that interacts with them (like hypershift [OCPBUGS-44438](https://issues.redhat.com/browse/OCPBUGS-44438) or release payload build [OCPBUGS-30080](https://issues.redhat.com/browse/OCPBUGS-30080)). Coupling with CVO still makes sense, but delivery through a standard additional payload image would prevent us from hitting subtle issues like the one mentioned above. What is the bar for the inclusion of a new image in the payload? |
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 the bar to a new image, Product builds and becoming part of an OpenShift release requires an enhancement (which we have here :), and the approval of image names for mirroring. The latter requires the OpenShift mirroring approvers.
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.
Thanks for the links! I added the root link to the doc. There is another angle to the separate image / CVO: there's just a single release payload, no separate ones for TechPreview etc. Which means the image (only used by a small subset of clusters) would be necessary to e.g. mirror to disconnected environments. So I propose to continue shipping via CVO in TP and consider extracting to a dedicated image as a part of GA transition criteria.
Addressed in 353a4b5
|
||
### Removing a deprecated feature | ||
|
||
N/A |
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.
Might be worth talking about the removal of the tech-preview client-side logic here?
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.
Good point, added in 353a4b5
|
||
There are two sources of skew: | ||
|
||
1. The updated USC needs to monitor resources of potentially old-version CRDs managed by old-version controllers. This should be fine, as CRDs are updated early in the process. |
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.
Probably also worth pointing out that all the resources we're currently planning on monitoring are old, quiet v1 types, and are already in tier 1 support. So the chance that a CRD or one of its monitored properties goes away is pretty small.
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.
Added in 353a4b5
* Implement the modular backend where different components contribute to the API | ||
|
||
## Proposal | ||
|
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.
This is made more clear in the "Workflow Description" section and below, but can we maybe have a paragraph up here expressing why existing clusterVersion resource status is not enough to solve this problem and how this augments it?
worker Pending 0% (0/3) 2 Available, 0 Progressing, 0 Draining | ||
|
||
Worker Pool Nodes: worker | ||
NAME ASSESSMENT PHASE VERSION EST MESSAGE |
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.
Can we clarify how does this scale to 500 nodes? Does this has builtin message aggregation heuristics?
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.
This is an excellent point. Nodes are problematic, scaling-wise. Are you asking about the presentation, or about the underlying data? I'll address both.
Presentation (easier): Even the current prototype already only shows lines for "interesting" nodes and aggregates the rest. Full output example is here, snipping the relevant part here:
WORKER POOL ASSESSMENT COMPLETION STATUS
worker Degraded 37% (22/59) 44 Available, 5 Progressing, 12 Draining, 7 Degraded
Worker Pool Nodes: worker
NAME ASSESSMENT PHASE VERSION EST MESSAGE
build0-gstfj-ci-prowjobs-worker-b-9lztv Degraded Draining 4.16.0-ec.2 ? failed to drain node: <node> after 1 hour. Please see machine-config-controller logs for more information
... only "interesting" lines shown...
build0-gstfj-ci-tests-worker-c-jq5rk Unavailable Updated 4.16.0-ec.3 - Node is marked unschedulable
...
Omitted additional 49 Total, 21 Completed, 44 Available, 5 Progressing, 28 Outdated, 5 Draining, 0 Excluded, and 0 Degraded nodes.
Pass along --details=nodes to see all information.
Underlying data (harder): As proposed there's a single insight for each Node, which is probably problematic (I already run into this in openshift/api#2012 when I had to write API constraints and Nodes cause by an order of magnitude larger (hundreds) amount of insights to exist in the system, which can cause scaling issues. I will propose, specifically for nodes, some aggregation for their status insights, because in usual cases most nodes will not be in an interesting state (most nodes will either be pending update or completed one).
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 this a problem with trying to make this a singleton? Would it make more sense if this were broken down into smaller units, that could then be filtered based on fields within them, eg you could skip listing any where the assessment was "EverythingIsAwesome" for example?
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.
It's simply too many entities once we start counting nodes, I agree that we'll need to aggregate somehow, not sure of exact method yet (will probably depend a bit on other maybe-break-this-up decisions)
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.
How would you quantify what an acceptable number of entities is? Yes, we expect customers may have hundreds of nodes, but if the majority of those are fine, and we provide appropriate tooling for filtering to those which are not fine, do we really have an issue with the count?
Also bear in mind that with the current approach, as you have hundreds of nodes, won't each one be represented somehow in the current API, exploding it?
I could imagine a top level API that says, hey, these particular list of insights might need your attention, and you take that list and go oc get insight <bad one>
to get the deeper detail
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.
Hundreds of nodes causing hundreds of node insights to exist, exploding the API is exactly the problem I meant here, and I'll need to think about how to mitigate it - I'm thinking about aggregating nodes that are in a similar state into a single insights. Going from potentially hundreds of insights, each with metadata like conditions, to lower tens of insights, where usually two of them ("nodes that are happily waiting to be updated" and "nodes that are happily done updating") would have a list of hundreds of names (still hundreds, but now just hundreds of strings instead of hundreds of full structs) sounds acceptable to me.
### Topology Considerations | ||
|
||
#### Hypershift / Hosted Control Planes | ||
|
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.
Can we clearly express in a sentence who is the consumer of this API in the hcp context? is it any managed services powered by hypershift.openshift.io? is it the cluster admin?
|
||
Because `UpdateStatus` API is cluster-scoped, it is not suitable for HCP use, and we will need to introduce a namespaced HCP-specific flavor, such as `HostedClusterUpdateStatus`. HCP-specific API variant will also need to be able to refer to resources in two API surfaces (management and hosted clusters), while the `UpdateStatus` API can rely on all resources being in the same cluster and use simple resource references. | ||
|
||
The updates in HCP are not initiated by the [`hcp` client][hcp-client] binary but by [directly modifying `HostedCluster` and `NodePool` resources][updates-in-hcp] using the `oc` client. Hence, at the moment, there is no apparent suitable place to put the update status UX (a client that would consume a `HostedClusterUpdateStatus` instance and present its content). The best place for that is the [`hcp` client][hcp-client], if necessary. It is expected that managed OCP product layers using HCP (ROSA) would consume `HostedClusterUpdateStatus` to improve their update experience, but that work is outside the scope of this enhancement. |
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.
fwiw if there was a use case the hcp could push the namespaced UpdateStatus into the guest cluster as a cluster scoped UpdateStatus. I'd expect though there's no need for that and this is consumed by managed services which them choose how to present to the service consumer
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'd expect though there's no need for that and this is consumed by managed services which them choose how to present to the service consumer
+1
|
||
#### Hypershift / Hosted Control Planes | ||
|
||
The enhancement allows adoption in HCP as an extension. The API and controller will be extended to handle the resources that represent the control plane and worker pools (`HostedCluster` and `NodePool`, respectively) and surface update progress through status insights for these resources. |
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.
How much of the initial builtin logic can be reused in an hcp cluster? Whereas having a namespaced resource gives the right level of flexibility, I'm concern that hcp ends up fully disconnected and reusability is completely lost implementation wise. Is there a plan for reusability (impl wise) of capturing well known insights?
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.
It is hard for me to quantify. API-wise, I expect the USC to be able to manage both the standalone and hcp UpdateStatus
variants (not at the same time ofc), driven by a flag or something. There will be minor differences in the data structures involved (mainly to be able to refer to resources in two api surfaces) but most code paths should be very similar and there is no reason for HCP to be disconnected. It is simply a piece that receives data that follows certain a contract and processes that into a UpdateStatus
resource.
For the checkers... for progress (status) insights, I assume we will need separate controllers but mostly because the update procedures simply are implemented differently between HCP and Standalone, and it is hard to escape that. So far we have not found both informers we have (control plane and node one, for standalone) to be that complex. Some parts are definitely reusable, like some parts of node assessments, maybe alert monitoring. At least for the initial round everything lives in a single binary (=single repo), so similarities are easy to spot.
What can we do to avoid disconnected HCP? HCP support is part of what BU asks so we're not planning to ignore that. Would committing to start building the HCP bits as soon as the foundations are in place be enough? Starting to cover HCP soon (while still in TechPreview) would reduce the space for divergence.
This proposal intends to capture only a limited part of the roadmap for a system reporting update health and status. The [Update Health API Controller Proposal][update-health-api-dd] document describes a potential future system where individual (and possibly external) domain-responsible components would produce update insights into the `UpdateStatus` API. This enhancement proposal corresponds to only Stage 1 of the implementation roadmap outlined there. There has yet to be a consensus on further stages, and this enhancement does not aim to achieve it. Any hypothetical modular system will be a much larger effort to implement, and its design will benefit from experience and feedback obtained by seeing API consumed by users, backed by the proposed simple implementation in the USC. | ||
|
||
### Workflow Description | ||
|
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 chance to capture a driving use case in this proposal illustrated by concrete insights which would not possible with todays UX?
|
||
### Workflow Description | ||
|
||
1. On a cluster where the Status API is enabled, the CVO manages a new Update Status Controller (USC) deployment as its operand. |
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.
does this operand come up only when the update is requested or does it keep running ?
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.
As proposed it is running continuously. Can be discussed as a drawback, I guess. Running continuously can be seen as a waste, there are options to mitigate:
- We can manage its lifecycle (switch it on for update and off when it is finished). Starting is easy, stopping not so much. We need to handle stuff like paused MCOs that get unpaused eventually, but we could actually read the API itself to know that USC is no longer needed to run :D. This would be a good raison d'etre for a cluster operator.
- USC itself can moderate its activity outside of update. It has watches and API writes, but it can probably ignore most cluster activity when it knows there is no update going on, and just check for signs of one starting, while doing some minimal maintenance of UpdateStatus resource.
I'm not sure if we need to do this decision in the proposal, sounds like somehting ot evaluate with evidence, so I'd propose to discuss this as a drawback / open question, and put a decision as a new TP -> GA criterion?
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.
6332863 addresses this, lmk if it sounds reasonable to you
Web Console has resource discovery so we do not have to ship a plugin to accomodate presence/absence of the API, it can handle it. Therefore we can drop this from drawbacks (and keep just a brief mention about clients having to gracefully degrade in API absence), and discuss the necessary changed directly in the proposal (new Update UX in Web Console section).
30f68e2 changed content related to web console. Web Console has resource discovery so we do not have to ship a plugin to accomodate presence/absence of the API, it can handle it. Therefore we can drop this from drawbacks (and keep just a brief mention about clients having to gracefully degrade in API absence), and discuss the necessary changes directly in the proposal (new Update UX in Web Console section). |
|
||
* As a cluster administrator, I want to easily observe the update process so that I know if the update is going well or if there are issues I need to address. | ||
* As a cluster administrator, I need a single place to observe the update process so that I do not have to dig through different command outputs to understand what is going on. | ||
* As a cluster administrator, I want to be clearly told if there are issues I need to address during the update so that I can do so. |
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.
Might read better as something a little more direct, less implicit
* As a cluster administrator, I want to be clearly told if there are issues I need to address during the update so that I can do so. | |
* As a cluster administrator, I want to be clearly told if there are issues I need to address during the update so that I can resolve the issues. |
* As a cluster administrator, I need a single place to observe the update process so that I do not have to dig through different command outputs to understand what is going on. | ||
* As a cluster administrator, I want to be clearly told if there are issues I need to address during the update so that I can do so. | ||
* As a cluster administrator, I only want to be informed about issues relevant to the update and not be overwhelmed with reports that may not be relevant to me so that I can save effort investigating. | ||
* As an engineer building tooling and UXes that interact with OpenShift clusters, I want both status and health information to be available through an API so that I can build software to consume and present it to users. |
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.
Generally mixing multiple concepts within a single API is a recipe for trouble. Small, well defined APIs that do one job are preferred. Why is it imperative they they are a single API type?
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.
By multiple concepts you mean "status" and "health" here? I am not that hard on having a single API type for these two. I can imagine having separate containers for status and insights.
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.
isn't health a subset of status? can we define both?
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 will add definitions for shared language.
Over time I started using "progress" in some places I used "status" previously, because the latter is so generic (and gets mixed up with kube notion of status).
- status/progress is data that communicate details about ongoing process - what parts have started, what parts are done, what remains to be done, how long are things taking, how long do we expect them to take
- health is whether the things go well and details for when not
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 would certainly like to explore what having separate APIs for these would look like because yes, you talk further in the API about the insights, and how they relate to the progress of objects, and then have separate statements roughly equating to "but when it's a health related observation, it looks different", which signals to me that we are probably trying to cram two different types of data into one API, and with that, will end up with an API that works, but is not optimal for either of the two types of data we are trying to represent
worker Pending 0% (0/3) 2 Available, 0 Progressing, 0 Draining | ||
|
||
Worker Pool Nodes: worker | ||
NAME ASSESSMENT PHASE VERSION EST MESSAGE |
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 this a problem with trying to make this a singleton? Would it make more sense if this were broken down into smaller units, that could then be filtered based on fields within them, eg you could skip listing any where the assessment was "EverythingIsAwesome" for example?
Run with --details=health for additional description and links to related online documentation | ||
``` | ||
|
||
The example illustrates the proposal to translate the OpenShift state closer to a typical administrator's mental model. Nodes flipping their versions from old to new is something that humans expect to see in an update, but assigning a version to a `Node` is not a trivial operation in OpenShift because a version is just one of the metadata items on a configuration that MCO is reconciling on Nodes. For MCO, this is a simple config change to reconcile, not an abstract "update." |
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.
Given that the new MachineConfigNode is still under TP, have we considered whether the MCN is the best place for detailed node health information and whether this API should aggregate from those, and not perhaps duplicate that information?
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.
Yeah I keep MCN in mind and I expect using this as a source of information for nodes.
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.
Rather than copying information from MCN, have you considered just linking to MCNs for the details of the errors?
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.
Not specifically for MCNs, but for other status insights we did - and there is a same principle applied to all of them. I try to interpret the state of the original resource, in the context of an update, knowledge of the whole system, and maybe taking into account the state of other resources, so that the consumer of the API does not need to understand the whole system, just the one surface we provide. And that interpretation carries with it a reference to the original structure so that it can be inspected in detail, when necessary.
There's value between the extremes of "blindly copy data" and "only refer to another resource".
|
||
The example illustrates the proposal to translate the OpenShift state closer to a typical administrator's mental model. Nodes flipping their versions from old to new is something that humans expect to see in an update, but assigning a version to a `Node` is not a trivial operation in OpenShift because a version is just one of the metadata items on a configuration that MCO is reconciling on Nodes. For MCO, this is a simple config change to reconcile, not an abstract "update." | ||
|
||
All functionality will be delivered under the new `UpdateStatus` [Capability][cluster-capabilities] so that clusters that do not want the functionality do not need to spend resources on running the new controller. The Capability will be a part of the `vCurrent` and `v4.X` capability sets, which means the functionality will be enabled by default, and admins need to opt-out at installation or update time. Like all capabilities, once enabled, it cannot be disabled. |
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 is the workflow for opting out at upgrade time? I didn't think that was possible
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 the following is possible:
- You are using
vCurrent
capability set on 4.X which equalsv4.X
one, or one of thev.(1..X)
ones - You see that 4.X+1 has a new capability you do not want, included in
v4.X+1
so you'd get it if you update
3a. You switch tov4.X
capability set and update. New capability is not enabled (none of them)
3b. You may want some of the 4.X+1 capabilities but not all. You can switch toNone
and individually list enabled capabilities to ones inv4.X
. Then you update and add desired new capabilities.
I may be wrong.
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.
You see that 4.X+1 has a new capability you do not want
I suspect a lot of users don't check this
If that's the current way this works, then great, we should make sure that's documented. Can we confirm with others that they agree this is the pattern?
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.
Yeah I'd expect most users to just follow vCurrent
- you just onboard what we ship. I saw efforts in OCP in the past to make behaviors optional (like registry, build etc) so I wanted to respect that. Any specific "others" you want me to agree with the pattern?
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.
As long as someone has tested, or an authority can verify the "get out of jail free" route, then I'm happy
1. The USC monitors `ClusterVersion`, `ClusterOperator`, `MachineConfigPool`, and `Node` resources and reflects the state of the update through the `UpdateStatus` resource via a set of status and health insights. | ||
1. When the user runs `oc adm upgrade status`, the client reads the `UpdateStatus` and uses status insights to convey progress and health insights to convey issues the admin needs to address. | ||
|
||
### API Extensions |
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.
It would be useful to provide in this section some examples of how the API might look when in use and explain what data is being stored within the API, unless that exists somewhere else?
In the current API design, it appears there's a repeating section almost that is used to represent different data across the API, but with a similar layout, explaining this repeating block and how it will be used would be helpful at least
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'll see if I can add some rendered API examples.
|
||
Because `UpdateStatus` API is cluster-scoped, it is not suitable for HCP use, and we will need to introduce a namespaced HCP-specific flavor, such as `HostedClusterUpdateStatus`. HCP-specific API variant will also need to be able to refer to resources in two API surfaces (management and hosted clusters), while the `UpdateStatus` API can rely on all resources being in the same cluster and use simple resource references. | ||
|
||
The updates in HCP are not initiated by the [`hcp` client][hcp-client] binary but by [directly modifying `HostedCluster` and `NodePool` resources][updates-in-hcp] using the `oc` client. Hence, at the moment, there is no apparent suitable place to put the update status UX (a client that would consume a `HostedClusterUpdateStatus` instance and present its content). The best place for that is the [`hcp` client][hcp-client], if necessary. It is expected that managed OCP product layers using HCP (ROSA) would consume `HostedClusterUpdateStatus` to improve their update experience, but that work is outside the scope of this enhancement. |
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.
here the information is supposed to be exposed through ClusterVersion, ClusterOperator and MachineConfigPool resource status, but the APIs are not expressive enough
Is there merit in extending these objects to improve their status if this is an issue?
1. The aggregation layer `.status.{controlPlane,workerPools[]}` reports higher-level information about the update through this layer, serving as the USC's interpretation of all insights. | ||
1. The outermost layer, `.status.conditions`, is used to report operational matters related to the USC itself (the health of the controller and gathering the insights, not the health of the update process). | ||
|
||
We do not expect users to interact with `UpdateStatus` resources directly; the API is intended to be used mainly by tooling. A typical `UpdateStatus` instance is likely to be quite verbose. |
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.
Tooling such as OC and the UI? Anything else?
If the idea is that tooling is going to use this, why does it need to be a single resource, and why can we not gather many resources to gather a cohesive view of the cluster?
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.
More UIs - web console is one, ACM is another.
I am not entirely opposed to breaking the data structure down, as long as the "gather many resources" does not constitute too much logic necessary for clients to implement. The currents state allows the client to simply iterate the insights to build UXes like the prototype, without need to crosscheck resources against each other.
My preferred approach would be to try to live with the singleton for a while, and then decide what is the best way to break the thing down (it is easier to break things down than assemble them together from small parts).
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.
Please make sure we have somewhere in this doc, a list of all the places we expect to consume this, I'm sure others will probably ask too how many places will consume this
|
||
##### Update Health Insights | ||
|
||
Update Health Insights report a state or condition in the cluster that is abnormal or negative and either affects or is affected by the update. Ideally, none would be generated in a standard healthy update. Health insights should communicate a condition that warrants attention by the cluster administrator and should be actionable. Links to resources helpful in the given situation should accompany health insights. Health insights can reference multiple resources involved in the situation. For example, a health insight exposing a failure to drain a node would reference the `Node`, the `Pod` that fails to be drained, and the `PodDisruptionBudget` that protects it. Individual resources can be involved in multiple insights. |
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.
Update Health Insights report a state or condition in the cluster that is abnormal or negative and either affects or is affected by the update.
I can find this information today by listing clusteroperators can't I? And filtering on those that are not available?
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.
As I understand it, the value proposition of the enhancement is exactly removing the need to manually do what you describe (among may other existing manual troubleshooting means) for any client tooling / Cluster Admin.
I'm not sure if a structured API / controller is the best answer to this problem. It feels we might be just moving the problem higher in the stack. And maybe next year we'll feel the need to abstract away updateStatus.
It would be good to articulate concrete upgrade failure scenarios and how they would be presented in this API, so we can have a general common idea of a criteria for success of this proposal and that can be used as a guardrail to help preventing the above from happening.
To solve the "mental model" miss match problem, it feels this could be better suited for a system that we can feed with all the input we already have in mature structured APIs and we let it reason holistically about it and present it in a friendly Cluster Admin Persona language. Codify this holistic interpretation of the cluster in a traditional controller without that system is hard.
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.
The value proposition is the unified UX for various classes of problems, tied to an abstraction of the platform-level process realized by many small parts, where previously you needed to investigate the small parts directly (and know about their existence, and know how to troubleshoot them).
I am not absolutely sure the structured API (and its current form) is the best answer to the problem (and I agree about the yet-another-abstraction comment partially, from a purist PoV). But pragmatically, we have verified the following:
- We know the experimental client-based functionality is useful even in its current form (a lot of positive feedback internally, we see QE using when reporting update-related problems, BU & TAMs say it has positive reception by customers). Hell, the first thing I do when I investigate a update-related must-gather is I run the thing myself against a statis-kas :D
- The logic we had to do for (1) is complicated enough for me to think every client should not re-implement it, plus some of it feels a lot like encoded platform knowledge / assumptions which I feel belongs to the platform itself, not to the layer around it.
- We also found some things hard to do from client side, which relies on a one-time shapshot of the cluster state, where a controller able to observe the state continuously would be able to provide some useful additional information (for a flapping thing, how many times did it flap? when was a problematic state first observed? that kind of thing).
- I said the logic is complicated enough to be in the client, but it is not actually that complicated for a controller. I have already built a crude prototype of the controller once, the robust thing is a bit more complicated but not that much. It becomes complicated once we want it to become a distributed system of producers/informers, which is exactly the reason why this enhancement avoids proposing that, and describes a centralized component instead (but internally, it is still separated enough). To me this is a good tradeoff, where even if we learn the solution has some major flaws, we can decide to never promote it and learn more about what to build instead.
system that we can feed with all the input we already have in mature structured APIs and we let it reason holistically about it and present it in a friendly Cluster Admin Persona language
TBH this description feels a lot like the thing we're proposing. I often think of it as a "the one knowledgeable consumer/interpreter of fragmented OpenShift APIs". Just in-cluster.
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 we didn't go down the route of creating a structured API for this, are there existing APIs that we could improve the observability of, or existing systems (grafana?) that we could improve to provide a better UX?
Obviously we already have the CLI tooling which handles this, we also want a dashboard (console? grafana?) and at the moment we would have to duplicate the logic. Where else do we think we might want this improved/unified UX?
It would probably also be worth highlighting somewhere what data we are aggregating, and what data we are supplying that is net new
|
||
The Update Status Controller (USC) is a new component in OpenShift that will be deployed directly by the CVO and is being treated as its operand. This is uncommon in OpenShift (listed as a [drawback][this-drawbacks]), as the CVO typically deploys only second-level operators as its operands. In this model, the USC (providing cluster functionality) would normally be an operand, and we would need to invent a new cluster operator to manage it. Because the CVO is directly involved in updates, such an additional layer does not have value, at least for now. If managing the USC shows to be a sufficiently complex problem in practice, we can consider introducing a new operator to manage it. | ||
|
||
The Update Status Controller will run a primary controller that will maintain the `UpdateStatus` resource. The resource has no `.spec`, so the controller will ensure the resource exists and its `.status` content is up-to-date and correct. It will determine the `status` subresource content by receiving and processing insights from the other controllers in the USC. |
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.
receiving and processing insights from the other controllers in the USC
Is there a message bus involved? How does it receive insights from other places?
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.
It is not proposed as a full distributed system yet, so I think of inter-controller (within a single process) communication as an implementation detail. I have it partially working and I owe even my team a high-level overview of the algorithm so I will write it and link it from here (but I'd like to avoid including it in the enhancement because I think it is a detail for now).
High-level: multiple informers send messages through a Go channel to a consumer. No bi-directional communication. Bit of protocol there to handle outdated state etc.
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 the future, when this does become a distributed system, have you thought about what that message bus would look like? It feels like an important step to understand this if we are considering the current proposal a temporary route
|
||
The Update Status Controller will run a primary controller that will maintain the `UpdateStatus` resource. The resource has no `.spec`, so the controller will ensure the resource exists and its `.status` content is up-to-date and correct. It will determine the `status` subresource content by receiving and processing insights from the other controllers in the USC. | ||
|
||
The Update Status Controller will have two additional control loops, both serving as producers of insights for the given domain. One will monitor the control plane and will watch `ClusterVersion` and `ClusterOperator` resources. The other will monitor the node pools and will watch `MachineConfigPool` and `Node` resources. Both will report their observations as status or health insights to the primary controller so it can update the `UpdateStatus` resource. These control loops will reuse the existing cluster check code implemented in the client-side `oc adm upgrade status` prototype. |
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.
Detail about this communication between controllers would be helpful, an intermediate resource?
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.
Answered by #1701 (comment) I think (will provide a high-level description of the current implementation but I consider it to be an implementation detail that can change).
|
||
The API has three conceptual layers: | ||
|
||
1. Through the innermost layer `.status.{controlPlane,workerPools[]}.informers`, the API exposes detailed information about individual concerns related to the update, called "Update Insights." The API is prepared to allow multiple external informers to contribute insights, but in this enhancement, the only informer is the USC itself. |
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 would this API look like if the informers
were a separate resource, that could be referenced, and then each actor could control one or more of these, and users could list and filter them as they need? It would greatly reduce the size of the output CR here right?
kind: UpdateInsight
spec:
updatePool:
type: Worker | ControlPlane
worker:
name: ... # we can have multiple worker pools?
target:
resource: Nodes | ClusterOperators | MachineConfigPools | ClusterVersions
name: ....
status:
conditions: []
... # I haven't worked out what else goes here
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.
That's one way how we could break the thing down. It has a downside of insights for the same $thing being spread in different locations so any client that wants to report on the $thing needs to put it together.
I am thinking about breaking the big CRD down following the top-level status fields (controlPlane + []workerPool). Instead of one UpdateStatus{.status: {.controlPlane: {}, []workerPools{{workerPool: {}, ...}}}}
, have:
ControlPlaneUpdateStatus {}
WorkerPoolUpdateStatus{name: pool-1}
WorkerPoolUpdateStatus{name: pool-2}
...
|
||
The API-backed `oc adm upgrade status` will lose the ability to run against older clusters that do not have the API (or against non-TechPreview clusters while the feature is still in TechPreview). The feature was requested to be an API from the start, and the client-based prototype was meant to be a temporary solution. | ||
|
||
Because of their size, the instances of the `UpdateStatus` API will likely be overwhelming for humans to read. As discussed in [API Size and Footprint][this-api-size] under [Risks][this-risks], the serialized resources will be a lot of YAML for humans to read, so humans would depend on tooling provided in the OpenShift ecosystem to benefit from the feature. Some technical users will likely dislike this because they expect Kubernetes resources to be human-readable. It is not possible to reduce the API verbosity without losing valuable information, but it should be possible to provide a human-oriented counterpart (maybe `UpdateStatusSummary`) that would contain aggregated information only. Such a counterpart could be a separate controller in the USC. |
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.
It is not possible to reduce the API verbosity without losing valuable information,
What information do you think you would lose? If the API were broken into multiple resources, would this still be a concern?
A top level could refer to individual insight objects that contain detailed (but well scoped) information about a particular issue
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.
Basically about every resource involved in the update, we need to know:
- Is it outdated, updating, or updated, ideally with transitions? This is currently realized with conditions, which are quite verbose, especially if you need to have one for 500 nodes each.
- ...about anything problematic related to that resource.
Breaking it down to smaller items would work as long as we are still somewhat solving the API fragmentation problem and do not force clients to have complicated logic to put the information together. I think there are some promising directions in the comments here.
|
||
Because of their size, the instances of the `UpdateStatus` API will likely be overwhelming for humans to read. As discussed in [API Size and Footprint][this-api-size] under [Risks][this-risks], the serialized resources will be a lot of YAML for humans to read, so humans would depend on tooling provided in the OpenShift ecosystem to benefit from the feature. Some technical users will likely dislike this because they expect Kubernetes resources to be human-readable. It is not possible to reduce the API verbosity without losing valuable information, but it should be possible to provide a human-oriented counterpart (maybe `UpdateStatusSummary`) that would contain aggregated information only. Such a counterpart could be a separate controller in the USC. | ||
|
||
The API consumers need to be aware of the possibility of `UpdateStatus` API being absent because the Capability is not enabled, and they will need to degrade gracefully. |
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 compatibility do we promise for OC, can this eventually go away? Or because this is a capability, it will always be an issue?
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.
Yeah, as long as it is a capability, clients will need to handle the absence of the API. We originally thought this would be an issue for web console but they told us it is fine because web console already does resource discovery and can have conditional behavior on resource presence / absence (see 30f68e2)
|
||
The API consumers need to be aware of the possibility of `UpdateStatus` API being absent because the Capability is not enabled, and they will need to degrade gracefully. | ||
|
||
Continuously running a controller that provides value only during an update can be thought of as a waste of resources outside of it. We can mitigate this waste by managing its lifecycle externally (enable it for update and disable it when it ends) or by reducing its activity internally (USC can do most of its checks and API management only during an update and only watch for signs of a starting / ongoing one otherwise). It is hard to decide about the appropriate approach without evidence. |
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 happens with the health of the cluster when an upgrade isn't in progress? Is there not value in health reporting continuously?
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 agree there is value, but I'm not sure we are the ones who want to solve that problem. There's a bit of Conway's Law here again I guess. We're an update-focused team talking to update-focused BU representative, who relays update-related problems to us from the field. So we think we are able to tackle the smaller problem because it deals with the domain we know well.
* Reporting of the operands | ||
* Reporting of the managed resources | ||
|
||
These reporting paths are currently inconsistent and spread both too wide and deep in the existing system. There is a minimal reporting contract in the form of the `Progressing`/`Failing` conditions on `ClusterOperator` resources, and the platform components publish alerts. For most issues, troubleshooting consists of investigating logs, `status` subresources, events, and metrics. The user must possess the knowledge of where to look and needs to piece together the state. Improving this situation would be beneficial for updates without the need for a dedicated system. |
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.
Can you provide a concrete example of how this will be easier with this proposal? A full workflow showing an example insight and how that points me to the correct fix would be extremely helpful for understanding the desire of this EP
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.
Alberto asked for this so I'll come up with an example. For a single insight, the experience may not be necessarily so much better though, compared to when you are the OpenShift expert and know where to look (especially in the current state where we have not focused that much on the insight content, but rather on the structures around).
In the meantime, I have a collection of asciinema recordings that record the output of the prototype in a watch loop. I believe they illustrate that even simply aggregating and showing information in context has value, and that is waht the API enables building:
(I honestly do not remember which ones are really good, but the b02 ones are very realistic, and often show how poor some of our user-exposed copy is btw)
There's a ton more on https://asciinema.org/~petr-muller
There are three reasons why we are not pursuing this approach now | ||
|
||
1. Our users see the update as a special, high-importance operation. From the OCP architecture point of view, it is just a slightly special case of cluster reconciliation (which makes "update" a vaguely defined term -- is MCO rebooting a `Node` after a `MachineConfig` change an "update"? From the MCO point of view, it is no different from any other configuration change. But a typical user would not consider that operation to be an "update" when a version change is not involved). Therefore, we (OpenShift developers) traditionally tended to expose the state of the system in a form that is very close to its architecture model. However, we are receiving feedback that our users' mental model of the system is different and closer to traditional monolithic systems. They expect high-level concepts (like "update" or "control plane") to be reported at this level rather than knowing it is really a distributed system of loosely coupled parts, each of which owns and reports its state. | ||
1. Because we validated the ideas through the client-based prototype, we are confident the features offered by the Status API (and UXes consuming it) are useful and appreciated by the users. The actual business value of the more general system is not entirely clear and would need to be validated. We would need to discover what the users actually want and need and pretty much start from scratch, delaying delivery of the features that we know are useful now. The feedback on Status API concepts can be helpful to inform the design of the cluster health reporting system. For example, we could reuse the concept of insights or the concept of informers based on its success in the Status API. |
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.
The actual business value of the more general system is not entirely clear and would need to be validated.
How much architectural discussion has there been internally around this?
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.
There has been a lot of internal discussion, but the prevailing use case we want to solve was always upgrade-focused, right from the BU ask. Pretty much all discussions always involved asking whether there is an existing reporting system we could easily use to fulfill what is being asked, and the answer was always no (some of these are discussed in the alternatives).
In an ideal world someone would build a general cluster reporting facility that we could use (we have observability folks but they tend to focus on other cases, I guess because they talk to observability-minded customers through observability-minded PMs...).
1. The aggregation layer `.status.{controlPlane,workerPools[]}` reports higher-level information about the update through this layer, serving as the USC's interpretation of all insights. | ||
1. The outermost layer, `.status.conditions`, is used to report operational matters related to the USC itself (the health of the controller and gathering the insights, not the health of the update process). | ||
|
||
We do not expect users to interact with `UpdateStatus` resources directly; the API is intended to be used mainly by tooling. A typical `UpdateStatus` instance is likely to be quite verbose. |
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.
can we disambiguate "users" referring to specific Persona? e.g. Cluster Admin Persona
|
||
Full API proposal: https://github.com/openshift/api/pull/2012 | ||
|
||
#### `UpdateStatus` API Overview |
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.
@petr-muller Is this example up to date with everything in the openshift/api PR? If not, any chance this could be made a bit more complete with the full API represented?
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.
By that I mean, when I look at the API PR it seems like there's a lot more there than illustrated here, can this be filled in to illustrate a more complete UpdateStatus resource?
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'll come up with up to date and further populated example of the API
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.
Example input + output + walkthrough added here:
Add a full `UpdateStatus` instance together with the corresponding `oc adm upgrade status` output (that is the motivation for the proposal), and walk through how the API is interpreted to be presented by the CLI
f3cfd9a
to
7687d60
Compare
@petr-muller: 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. |
This enhancement proposes a new API to expose the status and health of the OpenShift cluster update process. The API will be implemented as a new CRD managed by a new controller owned by the OpenShift OTA team. The enhancement aims to deliver the API early, backed by a simple controller, to gather feedback from potential API clients (internal and external) before investing effort into building consensus on a complete, robust, and modular implementation.
The enhancement is based on the early Update Health API Controller Proposal and Update Health API Draft docs and feedback gathered from them.
The value of the feature when implemented was validated through a 4.16 client-based prototype, and the proposal was driven by a prototype implementation of the controller.
The enhancement is accompanied by the API PR openshift/api#2012 which implements the described concepts.