prashant kumar mishra created CLOUDSTACK-3551:
-------------------------------------------------

             Summary: scaling up VM from small SO to a SO (with 2 GB RAM) is 
failing ; Unable to scale vm due to Catch exception 
com.xensource.xenapi.Types$XenAPIException when scaling VM:i-2-10-VM due to 
MEMORY_CONSTRAINT_VIOLATIONMemory
                 Key: CLOUDSTACK-3551
                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-3551
             Project: CloudStack
          Issue Type: Bug
      Security Level: Public (Anyone can view this level - this is the default.)
          Components: Management Server
    Affects Versions: 4.2.0
         Environment: hypervisor :Xen 6.1
            Reporter: prashant kumar mishra
            Priority: Critical
             Fix For: 4.2.0


Steps to reproduce
-----------------------------
1-prepare a CS setup with xen server(6.1)
2-Deploy a vm with small service offering (cpu=500,RAM=512)
3-create a SO say mem2 (cpu=500 or 1000 and RAM=2048)
4-scaleup vm from small SO to mem2

Expected
-------------
Scale up vm should be successful

Actual
-----------
Scaling up failed 

My observation 
----------------------
-> if i try to scale up to a SO (RAM=1.5 GB)  ( successful) 
i see "minRam":1610612736,"maxRam":1610612736,

->for scale up to a SO (RAM= 2GB)
 i see "minRam":2147483648,"maxRam":-2147483648,  (overflow)






Logs:
-----------
h overprovisioning: 9576; new used:2500, reserved:0; requested 
cpu:1000,alloc_from_last:false
2013-07-16 10:06:31,146 DEBUG [cloud.capacity.CapacityManagerImpl] 
(Job-Executor-9:job-47 = [ 1ad7dec8-2fbc-4ef5-a748-928a20d047a7 ]) RAM STATS 
after allocation: for host: 1, old used: 1476395008, old reserved: 0, total: 
16190156800; new used: 3623878656, reserved: 0; requested mem: 
2147483648,alloc_from_last:false
2013-07-16 10:06:31,160 DEBUG [agent.transport.Request] (Job-Executor-9:job-47 
= [ 1ad7dec8-2fbc-4ef5-a748-928a20d047a7 ]) Seq 1-1237451203: Sending  { Cmd , 
MgmtId: 7635042566263, via: 1, Ver: v1, Flags: 100111, 
[{"com.cloud.agent.api.ScaleVmCommand":{"vm":{"id":1,"name":"i-2-10-VM","cpus":1,"minSpeed":1000,"maxSpeed":1000,"minRam":2147483648,"maxRam":-2147483648,"rebootOnCrash":false,"enableHA":false,"limitCpuUse":false,"enableDynamicallyScaleVm":true},"vmName":"i-2-10-VM","cpus":1,"minSpeed":1000,"maxSpeed":1000,"minRam":2147483648,"maxRam":-2147483648,"wait":0}}]
 }
2013-07-16 10:06:31,161 DEBUG [agent.transport.Request] (Job-Executor-9:job-47 
= [ 1ad7dec8-2fbc-4ef5-a748-928a20d047a7 ]) Seq 1-1237451203: Executing:  { Cmd 
, MgmtId: 7635042566263, via: 1, Ver: v1, Flags: 100111, 
[{"com.cloud.agent.api.ScaleVmCommand":{"vm":{"id":1,"name":"i-2-10-VM","cpus":1,"minSpeed":1000,"maxSpeed":1000,"minRam":2147483648,"maxRam":-2147483648,"rebootOnCrash":false,"enableHA":false,"limitCpuUse":false,"enableDynamicallyScaleVm":true},"vmName":"i-2-10-VM","cpus":1,"minSpeed":1000,"maxSpeed":1000,"minRam":2147483648,"maxRam":-2147483648,"wait":0}}]
 }
2013-07-16 10:06:31,162 DEBUG [agent.manager.DirectAgentAttache] 
(DirectAgent-350:null) Seq 1-1237451203: Executing request
2013-07-16 10:06:31,202 DEBUG [agent.manager.AgentManagerImpl] 
(AgentManager-Handler-1:null) Ping from 3
2013-07-16 10:06:31,364 DEBUG [xen.resource.CitrixResourceBase] 
(DirectAgent-350:null) Catch exception 
com.xensource.xenapi.Types$XenAPIException when scaling VM:i-2-10-VM due to 
MEMORY_CONSTRAINT_VIOLATIONMemory limits must satisfy: static_min ⤠
dynamic_min ⤠dynamic_max ⤠static_max
2013-07-16 10:06:31,364 DEBUG [agent.manager.DirectAgentAttache] 
(DirectAgent-350:null) Seq 1-1237451203: Response Received:
2013-07-16 10:06:31,365 DEBUG [agent.transport.Request] (DirectAgent-350:null) 
Seq 1-1237451203: Processing:  { Ans: , MgmtId: 7635042566263, via: 1, Ver: v1, 
Flags: 110, 
[{"com.cloud.agent.api.ScaleVmAnswer":{"result":false,"details":"Catch 
exception com.xensource.xenapi.Types$XenAPIException when scaling VM:i-2-10-VM 
due to MEMORY_CONSTRAINT_VIOLATIONMemory limits must satisfy: static_min ⤠
dynamic_min ⤠dynamic_max ⤠static_max","wait":0}}] }
2013-07-16 10:06:31,366 DEBUG [agent.transport.Request] (Job-Executor-9:job-47 
= [ 1ad7dec8-2fbc-4ef5-a748-928a20d047a7 ]) Seq 1-1237451203: Received:  { Ans: 
, MgmtId: 7635042566263, via: 1, Ver: v1, Flags: 110, { ScaleVmAnswer } }
2013-07-16 10:06:31,366 ERROR [cloud.vm.VirtualMachineManagerImpl] 
(Job-Executor-9:job-47 = [ 1ad7dec8-2fbc-4ef5-a748-928a20d047a7 ]) Unable to 
scale vm due to Catch exception com.xensource.xenapi.Types$XenAPIException when 
scaling VM:i-2-10-VM due to MEMORY_CONSTRAINT_VIOLATIONMemory limits must 
satisfy: static_min ⤠dynamic_min ⤠dynamic_max ⤠static_max
2013-07-16 10:06:31,371 DEBUG [agent.manager.AgentAttache] 
(DirectAgent-350:null) Seq 1-1237451203: No more commands found
2013-07-16 10:06:31,382 DEBUG [cloud.capacity.CapacityManagerImpl] 
(Job-Executor-9:job-47 = [ 1ad7dec8-2fbc-4ef5-a748-928a20d047a7 ]) Hosts's 
actual total CPU: 9576 and CPU after applying overprovisioning: 9576
2013-07-16 10:06:31,383 DEBUG [cloud.capacity.CapacityManagerImpl] 
(Job-Executor-9:job-47 = [ 1ad7dec8-2fbc-4ef5-a748-928a20d047a7 ]) Hosts's 
actual total RAM: 16190157312 and RAM after applying overprovisioning: 
16190156800
2013-07-16 10:06:31,383 DEBUG [cloud.capacity.CapacityManagerImpl] 
(Job-Executor-9:job-47 = [ 1ad7dec8-2fbc-4ef5-a748-928a20d047a7 ]) release cpu 
from host: 1, old used: 2500,reserved: 0, actual total: 9576, total with 
overprovisioning: 9576; new used: 1500,reserved:0; movedfromreserved: 
false,moveToReserveredfalse
2013-07-16 10:06:31,383 DEBUG [cloud.capacity.CapacityManagerImpl] 
(Job-Executor-9:job-47 = [ 1ad7dec8-2fbc-4ef5-a748-928a20d047a7 ]) release mem 
from host: 1, old used: 3623878656,reserved: 0, total: 16190156800; new used: 
1476395008,reserved:0; movedfromreserved: false,moveToReserveredfalse
2013-07-16 10:06:31,409 DEBUG [cloud.capacity.CapacityManagerImpl] 
(Job-Executor-9:job-47 = [ 1ad7dec8-2fbc-4ef5-a748-928a20d047a7 ]) Hosts's 
actual total CPU: 9576 and CPU after applying overprovisioning: 9576
2013-07-16 10:06:31,409 DEBUG [cloud.capacity.CapacityManagerImpl] 
(Job-Executor-9:job-47 = [ 1ad7dec8-2fbc-4ef5-a748-928a20d047a7 ]) We are 
allocating VM, increasing the used capacity of this host:1
2013-07-16 10:06:31,409 DEBUG [cloud.capacity.CapacityManagerImpl] 
(Job-Executor-9:job-47 = [ 1ad7dec8-2fbc-4ef5-a748-928a20d047a7 ]) Current Used 
CPU: 1500 , Free CPU:8076 ,Requested CPU: 500
2013-07-16 10:06:31,409 DEBUG [cloud.capacity.CapacityManagerImpl] 
(Job-Executor-9:job-47 = [ 1ad7dec8-2fbc-4ef5-a748-928a20d047a7 ]) Current Used 
RAM: 1476395008 , Free RAM:14713761792 ,Requested RAM: 536870912
2013-07-16 10:06:31,409 DEBUG [cloud.capacity.CapacityManagerImpl] 
(Job-Executor-9:job-47 = [ 1ad7dec8-2fbc-4ef5-a748-928a20d047a7 ]) CPU STATS 
after allocation: for host: 1, old used: 1500, old reserved: 0, actual total: 
9576, total with overprovisioning: 9576; new used:2000, reserved:0; requested 
cpu:500,alloc_from_last:false
2013-07-16 10:06:31,410 DEBUG [cloud.capacity.CapacityManagerImpl] 
(Job-Executor-9:job-47 = [ 1ad7dec8-2fbc-4ef5-a748-928a20d047a7 ]) RAM STATS 
after allocation: for host: 1, old used: 1476395008, old reserved: 0, total: 
16190156800; new used: 2013265920, reserved: 0; requested mem: 
536870912,alloc_from_last:false
2013-07-16 10:06:31,420 WARN  [cloud.vm.UserVmManagerImpl] 
(Job-Executor-9:job-47 = [ 1ad7dec8-2fbc-4ef5-a748-928a20d047a7 ]) Received 
exception while scaling
com.cloud.utils.exception.CloudRuntimeException: Unable to scale vm due to 
Catch exception com.xensource.xenapi.Types$XenAPIException when scaling 
VM:i-2-10-VM due to MEMORY_CONSTRAINT_VIOLATIONMemory limits must satisfy: 
static_min ⤠dynamic_min ⤠dynamic_max ⤠static_max
        at 
com.cloud.vm.VirtualMachineManagerImpl.reConfigureVm(VirtualMachineManagerImpl.java:3283)
        at 
com.cloud.vm.UserVmManagerImpl.upgradeVirtualMachine(UserVmManagerImpl.java:1211)
        at 
com.cloud.vm.UserVmManagerImpl.upgradeVirtualMachine(UserVmManagerImpl.java:1084)
        at 
com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125)
        at 
org.apache.cloudstack.api.command.user.vm.ScaleVMCmd.execute(ScaleVMCmd.java:92)
        at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:158)
        at 
com.cloud.async.AsyncJobManagerImpl$1.run(AsyncJobManagerImpl.java:531)
        at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
        at java.lang.Thread.run(Thread.java:679)
2013-07-16 10:06:31,509 DEBUG [cloud.deploy.DeploymentPlanningManagerImpl] 
(Job-Executor-9:job-47 = [ 1ad7dec8-2fbc-4ef5-a748-928a20d047a7 ]) Deploy 
avoids pods: null, clusters: null, hosts: [1]

 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to