Skip to content

Create Kubernetes Cluster fails when using Service Offering with more than one host tags #6657

@StepBee

Description

@StepBee
ISSUE TYPE
  • Bug Report
COMPONENT NAME
Kubernetes, CKS, KubernetesClusterManagerImpl
CLOUDSTACK VERSION
4.17.0.1
CONFIGURATION

N/A

OS / ENVIRONMENT

KVM based hypervisor

SUMMARY

Creating a Kubernetes Cluster fails with error message "Creating Kubernetes cluster failed due to insufficient capacity" when the Service Offering has more than one host tag, comma separated.

STEPS TO REPRODUCE
  1. If no host with more than one host tag exists, assign one or more hosts more than one host tag, comma separated, for example
    performance,nowindows

  2. If not existing yet, create a Kubernetes ISO with min CPU 2 and min Memory 2048 MB

  3. Create a Service Offering with multiple host tags, matching the host tags of the first step, in our example
    performance,nowindows
    and which is fitting the minimum kubernetes requirements of step two, in our example more than 2 vCPU and more than 2048 MB Memory

  4. Chose "Compute / Kubernetes / Create Kubernetes Cluster" and select the Compute Offering with more than one host tag, created earlier.

The deployment will fail with the error message
"Request failed. (530) Creating Kubernetes cluster failed due to insufficient capacity for 2 nodes cluster in zone : xxxx with service offering xxxx"

The management server log will show

2022-08-18 17:34:06,835 DEBUG [c.c.u.AccountManagerImpl] (qtp262366552-3231:ctx-aaf26d13 ctx-13c55a78) (logid:6ff75d8d) Access to Acct[xxxxxxx-xxxxxxx] -- Account {"id":
 60, "name": "xxxxxxx", "uuid": "xxxxxxx"} granted to Acct[xxxxxxx-xxxxxxx] -- Account {"id": 60, "name": "xxxxxxx", "uuid": "xxxxxxxxxx"} by DomainChecker
2022-08-18 17:34:06,958 INFO  [c.c.k.c.KubernetesClusterManagerImpl] (qtp262366552-3231:ctx-aaf26d13 ctx-13c55a78) (logid:6ff75d8d) Suitable hosts not found in datacenter ID: f2665eef-1073-4c50-8d3a-076d4
4036fcc for node 1 with offering ID: 1b2c036e-d7c6-470e-820c-83b34f8d5af7
2022-08-18 17:34:06,958 WARN  [c.c.k.c.KubernetesClusterManagerImpl] (qtp262366552-3231:ctx-aaf26d13 ctx-13c55a78) (logid:6ff75d8d) Cannot find enough capacity for Kubernetes cluster(requested cpu=8000 me
mory=8589934592) with offering ID: 1b2c036e-d7c6-470e-820c-83b34f8d5af7
2022-08-18 17:34:06,959 ERROR [c.c.k.c.KubernetesClusterManagerImpl] (qtp262366552-3231:ctx-aaf26d13 ctx-13c55a78) (logid:6ff75d8d) Creating Kubernetes cluster failed due to insufficient capacity for 2 no
des cluster in zone : Zone-01 with service offering : Medium
2022-08-18 17:34:06,959 INFO  [c.c.a.ApiServer] (qtp262366552-3231:ctx-aaf26d13 ctx-13c55a78) (logid:6ff75d8d) Creating Kubernetes cluster failed due to insufficient capacity for 2 nodes cluster in zone :
 Zone-01 with service offering : Medium
2022-08-18 17:34:06,961 DEBUG [c.c.a.ApiServlet] (qtp262366552-3231:ctx-aaf26d13 ctx-13c55a78) (logid:6ff75d8d) ===END===  79.205.55.140 -- GET  name=test-kube-01&description=test-kube-01&zoneid=f2665eef-1073
-4c50-8d3a-076d44036fcc&kubernetesversionid=764c7c5a-f08b-48ad-9a0a-da4924030fc3&serviceofferingid=1b2c036e-d7c6-470e-820c-83b34f8d5af7&size=1&noderootdisksize=8&keypair=ssh-key-ed25519&command=create
KubernetesCluster&response=json

The log clearly shows it's not a capacity issue, it's not even checking a single hosts capacity, because no host is found suitable in the cluster.

Using exactly the same Service Offering to create a normal instance works fine.

Using a Service Offering with none or one host tag assigned to create a Kubernetes Cluster works fine.

EXPECTED RESULTS

As with normal instances, creating a kubernetes cluster should work with service offerings, which have more than 2 host tags comma separated assigned, as well.

ACTUAL RESULTS

Creating the Kubernetes Cluster fails with the error message

"Request failed. (530) Creating Kubernetes cluster failed due to insufficient capacity for 2 nodes cluster in zone : xxxx with service offering xxxx"

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions