apache / apache/cloudstack

XCP-NG VM/Kubernetes node dynamic scale failed.

Open
#8,334 10 comments 0 reactions 0 assignees View on GitHub
component:XenServer no-issue-activity
Dominant language
Java
Stars
3.1k
Forks
1.4k
Avg merge
6d 19h
Merged PRs (30d)
32

Description

##### ISSUE TYPE

* Bug Report

##### COMPONENT NAME

~~~
UI
~~~

##### CLOUDSTACK VERSION

~~~
4.18.0 and 4.18.1
~~~

##### CONFIGURATION

##### OS / ENVIRONMENT

XCP-NG 8.2.1

Current setup:
cpu.overprovisioning.factor = 2
mem.overprovisioning.factor = 2

same result with:
cpu.overprovisioning.factor = 1
mem.overprovisioning.factor = 1

test VM 1 CPU x 0.50 Ghz and 512 MB memory

![image](https://github.com/apache/cloudstack/assets/33296623/d18df1a5-3b19-4bb7-9861-4b65ad0a6afd)

##### SUMMARY

Unable to dynamic scale VM from different templates (Debian, Ubuntu, Centos)

GUI error:
Unhandled exception

Log error:
2023-12-08 04:13:57,203 ERROR [c.c.v.VmWorkJobHandlerProxy] (Work-Job-Executor-27:ctx-ff0ece9e job-1340/job-13
42 ctx-23ed9399) (logid:15e9aadd) Invocation exception, caused by: com.cloud.utils.exception.CloudRuntimeExcep
tion: Unable to scale vm due to Catch exception com.cloud.utils.exception.CloudRuntimeException when scaling V
M:i-8-254-VM due to com.cloud.utils.exception.CloudRuntimeException: Cannot scale up the vm because of memory
constraint violation: 0 <= memory-static-min(268435456) <= memory-dynamic-min(2147483648) <= memory-dynamic-ma
x(4294967296) <= memory-static-max(536870912)

Cannot scale up the vm because of memory constraint violation: 0 <= memory-static-min(268435456) <= memory-d
ynamic-min(2147483648) <= memory-dynamic-max(4294967296) <= memory-static-max(536870912)
at com.cloud.vm.VirtualMachineManagerImpl.orchestrateReConfigureVm(VirtualMachineManagerImpl.java:4648
)
at com.cloud.vm.VirtualMachineManagerImpl.reConfigureVm(VirtualMachineManagerImpl.java:4579)
at com.cloud.vm.VirtualMachineManagerImpl.orchestrateReconfigure(VirtualMachineManagerImpl.java:5522)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at com.cloud.vm.VmWorkJobHandlerProxy.handleVmWorkJob(VmWorkJobHandlerProxy.java:107)
at com.cloud.vm.VirtualMachineManagerImpl.handleVmWorkJob(VirtualMachineManagerImpl.java:5536)
at com.cloud.vm.VmWorkJobDispatcher.runJob(VmWorkJobDispatcher.java:102)
at org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl$5.runInContext(AsyncJobManagerImpl.ja
va:620)
at org.apache.cloudstack.managed.context.ManagedContextRunnable$1.run(ManagedContextRunnable.java:48)
at org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:
55)
at org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedCont
ext.java:102)
at org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedConte
xt.java:52)
at org.apache.cloudstack.managed.context.ManagedContextRunnable.run(ManagedContextRunnable.java:45)
at org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl$5.run(AsyncJobManagerImpl.java:568)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)

##### STEPS TO REPRODUCE

~~~
Create VM with 1 or more CPUs and select dynamic scalable in VM, Template, Global properties.
Try to scale running VM.
~~~

##### EXPECTED RESULTS

~~~
VM scaled successfully
~~~

##### ACTUAL RESULTS

~~~
VM scale failed result
~~~

Contributor guide

Open the contributing guide

Research direction

Start with the reproduction steps and the XCP-NG environment, then inspect VirtualMachineManagerImpl.java at orchestrateReConfigureVm (line 4648), reConfigureVm, and orchestrateReconfigure using the reported memory-constraint exception. Reproduce the failed dynamic scale operation and trace the sizing values; done means the VM scales successfully across the listed templates and configurations.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, kubernetes
Domain
backend, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.