You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cloudstack.apache.org by "prashant kumar mishra (JIRA)" <ji...@apache.org> on 2013/04/19 09:09:15 UTC

[jira] [Created] (CLOUDSTACK-2107) Only scaling up memory(ram) in not triggering vm migration ;Unable to scale vm due to Catch exception com.xensource.xenapi.Types$HostNotEnoughFreeMemory when scaling VM:i-2-35-VM due to Not enough host memory is available to perform this operation

prashant kumar mishra created CLOUDSTACK-2107:
-------------------------------------------------

             Summary: Only scaling up memory(ram) in not triggering vm migration ;Unable to scale vm due to Catch exception com.xensource.xenapi.Types$HostNotEnoughFreeMemory when scaling VM:i-2-35-VM due to Not enough host memory is available to perform this operation
                 Key: CLOUDSTACK-2107
                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-2107
             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
            Reporter: prashant kumar mishra
            Priority: Critical
             Fix For: 4.2.0


 For cpu scalup vms getting  live migrated to other host in cluster if no resources are available on current host ,but not in case of RAM Scaleup 

Steps to reproduce
----------------------------
1-Create zone->pod->cluster with one host
2-Deploy vm so that no resource left on host
3-Add another host in same cluster
4- Try to scale up vm's ram (in new service offering keep cpu speed same as previous ,increase ram by 500 MB)

Expected
--------------
since there is no resource left on current host vm should get live migrate to other available host and scaleup should be successful .

Actual
---------
scaleup failed due to not enough resource on current host,;CS did not try to live migrate vm to other host on cluster

My observation
----------------------
1-VM are getting live migrated in case of cpu scale up if current host does not have resource
2-Tried to scaleup vm to service offering x failed but able to deploy a new vm with same service offering

Service offering details
----------------------------------
Tried to scaleup from  SO 20 to SO 22

1-SO 22
mysql> select * from service_offering_view where id=22 \G
*************************** 1. row ***************************
               id: 22
             uuid: 528443f5-f044-4e64-b1e1-87f6c0136921
             name: smallcpu2ram
     display_text: smallcpu2ram
          created: 2013-04-18 18:48:17
             tags: NULL
          removed: NULL
use_local_storage: 0
       system_use: 0
              cpu: 1
            speed: 1500
         ram_size: 1024
          nw_rate: NULL
          mc_rate: NULL
       ha_enabled: 0
    limit_cpu_use: 0
         host_tag: NULL
      default_use: 0
          vm_type: NULL
         sort_key: 0
        domain_id: NULL
      domain_uuid: NULL
      domain_name: NULL
      domain_path: NULL
1 row in set (0.00 sec)

2-SO 20
mysql> select * from service_offering_view where id=20 \G
*************************** 1. row ***************************
               id: 20
             uuid: 4bafd8c7-c8cc-42db-a630-61909556803b
             name: smallcpu2
     display_text: smallcpu2
          created: 2013-04-18 18:39:59
             tags: NULL
          removed: NULL
use_local_storage: 0
       system_use: 0
              cpu: 1
            speed: 1500
         ram_size: 500
          nw_rate: NULL
          mc_rate: NULL
       ha_enabled: 0
    limit_cpu_use: 0
         host_tag: NULL
      default_use: 0
          vm_type: NULL
         sort_key: 5
        domain_id: NULL
      domain_uuid: NULL
      domain_name: NULL
      domain_path: NULL
1 row in set (0.00 sec)

Snippet of MS Log
---------------------------
2013-04-19 07:40:58,312 DEBUG [agent.transport.Request] (DirectAgent-12:null) Seq 1-521863179: Processing:  { Ans: , MgmtId: 7191687856187, via: 1, Ver: v1, Flags: 110, [{"ScaleVmAnswer":{"result":false,"details":"Catch exception com.xensource.xenapi.Types$HostNotEnoughFreeMemory when scaling VM:i-2-35-VM due to Not enough host memory is available to perform this operation","wait":0}}] }
2013-04-19 07:40:58,312 DEBUG [agent.transport.Request] (catalina-exec-6:null) Seq 1-521863179: Received:  { Ans: , MgmtId: 7191687856187, via: 1, Ver: v1, Flags: 110, { ScaleVmAnswer } }
2013-04-19 07:40:58,312 ERROR [cloud.vm.VirtualMachineManagerImpl] (catalina-exec-6:null) Unable to scale vm due to Catch exception com.xensource.xenapi.Types$HostNotEnoughFreeMemory when scaling VM:i-2-35-VM due to Not enough host memory is available to perform this operation
2013-04-19 07:40:58,313 DEBUG [agent.manager.AgentAttache] (DirectAgent-12:null) Seq 1-521863179: No more commands found
2013-04-19 07:40:58,337 DEBUG [cloud.capacity.CapacityManagerImpl] (catalina-exec-6:null) Hosts's actual total CPU: 12372 and CPU after applying overprovisioning: 12372
2013-04-19 07:40:58,337 DEBUG [cloud.capacity.CapacityManagerImpl] (catalina-exec-6:null) Hosts's actual total RAM: 7907453568 and RAM after applying overprovisioning: 7907453440
2013-04-19 07:40:58,338 DEBUG [cloud.capacity.CapacityManagerImpl] (catalina-exec-6:null) release cpu from host: 1, old used: 12000,reserved: 0, actual total: 12372, total with overprovisioning: 12372; new used: 10500,reserved:0; movedfromreserved: false,moveToReserveredfalse
2013-04-19 07:40:58,338 DEBUG [cloud.capacity.CapacityManagerImpl] (catalina-exec-6:null) release mem from host: 1, old used: 6928990208,reserved: 0, total: 7907453440; new used: 5855248384,reserved:0; movedfromreserved: false,moveToReserveredfalse
2013-04-19 07:40:58,362 DEBUG [cloud.capacity.CapacityManagerImpl] (catalina-exec-6:null) Hosts's actual total CPU: 12372 and CPU after applying overprovisioning: 12372
2013-04-19 07:40:58,363 DEBUG [cloud.capacity.CapacityManagerImpl] (catalina-exec-6:null) We are allocating VM, increasing the used capacity of this host:1
2013-04-19 07:40:58,363 DEBUG [cloud.capacity.CapacityManagerImpl] (catalina-exec-6:null) Current Used CPU: 10500 , Free CPU:1872 ,Requested CPU: 1500
2013-04-19 07:40:58,363 DEBUG [cloud.capacity.CapacityManagerImpl] (catalina-exec-6:null) Current Used RAM: 5855248384 , Free RAM:2052205056 ,Requested RAM: 524288000
2013-04-19 07:40:58,363 DEBUG [cloud.capacity.CapacityManagerImpl] (catalina-exec-6:null) CPU STATS after allocation: for host: 1, old used: 10500, old reserved: 0, actual total: 12372, total with overprovisioning: 12372; new used:12000, reserved:0; requested cpu:1500,alloc_from_last:false
2013-04-19 07:40:58,363 DEBUG [cloud.capacity.CapacityManagerImpl] (catalina-exec-6:null) RAM STATS after allocation: for host: 1, old used: 5855248384, old reserved: 0, total: 7907453440; new used: 6379536384, reserved: 0; requested mem: 524288000,alloc_from_last:false
2013-04-19 07:40:58,459 ERROR [cloud.api.ApiServer] (catalina-exec-6:null) unhandled exception executing api command: scaleVirtualMachine
com.cloud.utils.exception.CloudRuntimeException: Unable to scale vm due to Catch exception com.xensource.xenapi.Types$HostNotEnoughFreeMemory when scaling VM:i-2-35-VM due to Not enough host memory is available to perform this operation
        at com.cloud.vm.VirtualMachineManagerImpl.reConfigureVm(VirtualMachineManagerImpl.java:2931)
        at com.cloud.vm.UserVmManagerImpl.upgradeVirtualMachine(UserVmManagerImpl.java:1080)
        at com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125)
        at org.apache.cloudstack.api.command.user.vm.ScaleVMCmd.execute(ScaleVMCmd.java:88)
        at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:164)
        at com.cloud.api.ApiServer.queueCommand(ApiServer.java:454)
        at com.cloud.api.ApiServer.handleRequest(ApiServer.java:304)
        at com.cloud.api.ApiServlet.processRequest(ApiServlet.java:302)
        at com.cloud.api.ApiServlet.doGet(ApiServlet.java:66)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:555)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
        at org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:889)
        at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:721)
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2274)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:679)






--
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