Skip to content

CKS scale without an offering moves nodes back to the cluster offering #14807

Open

Description

@bhouse-nexthop

problem

scaleKubernetesCluster without serviceofferingid or nodeofferings still scales nodes to the cluster's service offering.

createNodeTypeToServiceOfferingMap falls back to the cluster offering as DEFAULT when no offering is passed. KubernetesClusterScaleWorker.scaleCluster then treats every node type whose VMs run a different offering as needing an offering scale.

Calls that hit it:

call effect
clustersize only worker (and control/etcd) nodes on their own offering are scaled back to the cluster offering
nodeids (e.g. cluster autoscaler removing a node) same
autoscalingenabled on/off, min/max control/etcd scaled back before the autoscaler is set up

On KVM with running VMs the offering scale fails with "scaling Kubernetes cluster with running VMs on hypervisor KVM is not supported", sometimes after a downscale already removed nodes. Where live scaling works, nodes are silently moved back to the cluster offering.

versions

4.21, 4.22, main

The steps to reproduce the bug

  1. Create a CKS cluster with nodeofferings giving workers a different offering than serviceofferingid (or scale workers with nodeofferings later).
  2. Call scaleKubernetesCluster with only clustersize.
  3. Scale fails on KVM with the error above, or the workers end up on the cluster offering.

What to do about it?

When no offering is requested, pass an empty offering map so only the size/autoscaling change is applied.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions