Repository navigation
Report provisioning stages from the cloud cluster XRs - #606
Closed
RedbackThomson wants to merge 5 commits into
Closed
RedbackThomson wants to merge 5 commits into
RedbackThomson wants to merge 5 commits into
Conversation
Each compose_<cloud>_cluster builder checked that every node pool's class had a provisioning block for the cloud. On a miss it set ClusterReady=False with reason InvalidNodePool and returned, but compose_<cloud> carried on to derive_conditions, whose later ClusterReady=Provisioning replaced it. Only a Warning event said what was wrong. The early return also left the cloud cluster XR out of desired state, so Crossplane would try to delete a running cluster whose shared class lost its block. The check is now a gate beside check_devices_supported, before any cloud is composed. Like that gate it names every offending class and returns a fatal result, so the condition survives and Crossplane holds the cluster's resources rather than collecting them. Towards modelplaneai#603. Signed-off-by: Nicholas Thomson <RedbackThomson@users.noreply.github.com>
compose-inference-cluster composed the ClusterProviderConfig that reaches a provisioned cluster only while the cloud cluster XR was Ready. A cloud cluster XR is unready whenever any resource it composes is, so one node group or Helm release going unready on a running cluster dropped the ClusterProviderConfig from desired state, and Crossplane would delete it while every Object on the cluster still used it: the namespaces, PoolObservations, ModelReplicas and ModelRoutes. Once composed, the ClusterProviderConfig is now kept for as long as it is observed, the way the ServingStack already is. Towards modelplaneai#603. Signed-off-by: Nicholas Thomson <RedbackThomson@users.noreply.github.com>
Provisioning a cluster spends most of its time building node pools, but neither the cloud cluster XRs nor InferenceCluster report anything per pool: the only signal is the XR's own Ready, False until every pool and every other composed resource is done. Each cloud cluster XR, and InferenceCluster, gets a status.nodePools list keyed by pool name. A pool's state is Pending until its cloud resources are composed, Provisioning until their provider reports them Ready, then Ready, or Failed while the provider reports that its last operation on one of them failed, with the provider's error as the message. The system pool is left out because it is part of the base cluster rather than a pool the user asked for. Towards modelplaneai#603. Signed-off-by: Nicholas Thomson <RedbackThomson@users.noreply.github.com>
Signed-off-by: Nicholas Thomson <RedbackThomson@users.noreply.github.com>
While it provisioned, a cloud cluster XR reported nothing beyond its own Ready, which stays False until every resource it composes is Ready. A cluster still creating its control plane looked the same as one finishing its last GPU node pool, or one whose node group had failed to create. Each compose-<cloud>-cluster function now splits what it composes into the user's node pools and the cluster: everything else, such as the network, control plane, system nodes and add-ons. ClusterReady is True once every cluster resource is marked ready, and NodePoolsReady once ClusterReady is and every pool's resources are. status.nodePools reports each pool as Pending until its resources are composed, then Provisioning, then Ready. A stage or pool is Failed while the provider reports a resource's LastAsyncOperation False, with the provider's error, prefixed with the resource's name, as the message. Synced=False doesn't count as a failure, because a managed resource is also Synced=False while it waits on a reference to resolve, which is routine while a cluster provisions. Only upjet providers set LastAsyncOperation, so a Helm release or provider-kubernetes Object that fails stays Provisioning. ClusterReady's Provisioning message counts the cluster's resources that are ready, such as "12 of 52 resources ready". compose-gke-cluster also reports ClusterReady while it waits for the GCP ProviderConfig it reads the project from, rather than composing nothing and reporting nothing. Towards modelplaneai#603. Signed-off-by: Nicholas Thomson <RedbackThomson@users.noreply.github.com>
|
Docs preview: https://modelplane-docs-pr-606.vercel.app (ready once the site's Content workflow finishes) |
Contributor
Author
|
Folded into #607. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description of your changes
Towards #603.
While it provisioned, a cloud cluster XR reported nothing beyond its own Ready, which stays False until every resource it composes is Ready. A cluster still creating its control plane looked the same as one finishing its last GPU node pool, or one whose node group had failed.
Each
compose-<cloud>-clusterfunction now splits what it composes into the user's node pools and the cluster (network, IAM, control plane, system nodes, add-ons), and reportsClusterReady,NodePoolsReadyandstatus.nodePoolsfrom them. The logic is the same on all six clouds; only the resources grouped under each pool differ.A stage or pool is
Failedwhile the provider reports a resource'sLastAsyncOperationFalse, with the provider's error, prefixed with the resource name, as the message.Synced=Falseisn't treated as a failure, because a managed resource is alsoSynced=Falsewhile it waits on a reference, which is routine while a cluster provisions. Only upjet providers setLastAsyncOperation, so a failing Helm release or provider-kubernetes Object staysProvisioning. upjet also clears that condition on the next poll after a failed create that left an ID, soFailedlasts only as long as the provider reports it.ClusterReady'sProvisioningmessage is a count (12 of 52 resources ready). It changes as resources finish, and every ModelDeployment, ModelCache, InferenceGateway, ModelRoute and MetricMapping requires every InferenceCluster, so each change reconciles them.compose-gke-clusteralso reportsClusterReady=Provisioningwhile it waits for the GCP ProviderConfig it reads the project from.I have:
nix flake check(or./nix.sh flake check) and made sure it passes.git commit -s.