G
YouTube TikTok Games
Skip to content

CKS: the cluster-wide compute offering shown for a cluster stays out of date after a per-group scale #14702

Open

Description

@andrijapanicsb

problem

What happens, in plain words

A CKS cluster stores its compute offering in two places: one cluster-wide offering (serviceofferingid), and separate offerings for control and worker nodes (controlofferingid, workerofferingid).

When an operator resizes only the workers or only the control nodes, CloudStack updates that group's offering but leaves the cluster-wide one as it was. From then on listKubernetesClusters returns a serviceofferingid / serviceofferingname that no node uses, and the UI shows it as the cluster's "Compute Offering". An operator reads a size that no node has.

This is a display problem only. Nothing breaks because of it.

Status: logged only, no PR planned for now

This was split out of #14552 so that it stays tracked after that issue closes. The parts with real effects are handled elsewhere:

No PR will be raised for this issue until #14594 (CKS node groups) is settled. That PR moves the worker offering into node groups, each with its own offering, so it changes what the cluster-wide offering means. The right fix here depends on how that lands, and it may make this issue obsolete.

Steps to reproduce

  1. Create a CloudManaged CKS cluster on offering A (1 control, 2 workers) and wait for Running.
  2. Scale only the workers to offering B:
    scaleKubernetesCluster id=<id> nodeofferings[0].node=worker nodeofferings[0].offering=<B>
  3. listKubernetesClusters id=<id> still shows serviceofferingid = A, with workerofferingid = B. The UI "Compute Offering" field shows A.

Seen during QA of #14223.

Expected

After a per-group scale, the API and UI do not present an offering that no node group uses.

Technical details

  • Why it goes stale: in KubernetesClusterScaleWorker#scaleCluster, updateClusterOffering = isWorkerNode && scaleClusterDefaultOffering, so service_offering_id is written only on a cluster-wide scale (serviceofferingid=X without nodeofferings). Per-group scales write control_service_offering_id / worker_service_offering_id only.
  • Where it is shown: KubernetesClusterManagerImpl fills serviceofferingid / serviceofferingname in the cluster response from service_offering_id.
  • Possible fixes, to decide after cks node groups #14594: stop returning the cluster-wide offering once every node group has its own, or show the per-group offerings in its place in the UI.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions