Repository navigation
Description
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:
- CKS: preserve node offerings during nodeids scale-in #14459 stops scale requests from resizing nodes to the old cluster-wide offering (fixes CKS: scale requests without an offering (autoscaler, size, enabling autoscaling) resize every node to an outdated cluster-wide offering #14552).
- CKS: reconcile node capacity after live resize #14223 makes the capacity check for new workers and the cluster CPU/RAM totals use the per-group offerings.
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
- Create a CloudManaged CKS cluster on offering A (1 control, 2 workers) and wait for
Running. - Scale only the workers to offering B:
scaleKubernetesCluster id=<id> nodeofferings[0].node=worker nodeofferings[0].offering=<B> listKubernetesClusters id=<id>still showsserviceofferingid= A, withworkerofferingid= 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, soservice_offering_idis written only on a cluster-wide scale (serviceofferingid=Xwithoutnodeofferings). Per-group scales writecontrol_service_offering_id/worker_service_offering_idonly. - Where it is shown:
KubernetesClusterManagerImplfillsserviceofferingid/serviceofferingnamein the cluster response fromservice_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.
Activity