andrijapanicsb opened a new issue, #14702:
URL: https://github.com/apache/cloudstack/issues/14702

   ### 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:
   
   - #14459 stops scale requests from resizing nodes to the old cluster-wide 
offering (fixes #14552).
   - #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
   
   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 #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.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to