[ https://issues.apache.org/jira/browse/CLOUDSTACK-2158?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13639708#comment-13639708 ]
Marcus Sorensen commented on CLOUDSTACK-2158: --------------------------------------------- I should add that out of the 28 servers, only 4 have any VMs running on them, so it should have easily found a suitable host. It just seemed to fail when the last host didn't work out. > 'userconcentratedpod_firstfit failed to find alternate host to run VM > --------------------------------------------------------------------- > > Key: CLOUDSTACK-2158 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-2158 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the > default.) > Components: Management Server > Affects Versions: 4.1.0 > Reporter: Marcus Sorensen > Priority: Blocker > Fix For: 4.1.0 > > > Have a cluster of 28 32 core servers. Upgraded to latest 4.1, tried to start > an existing, stopped VM. Last host the VM ran on was full, but allocator > failed to find another. So users upgrading to 4.1, using firstfit probably > won't be able to start VMs in some scenarios. > 2013-04-23 16:00:45,625 DEBUG [cloud.deploy.FirstFitPlanner] > (Job-Executor-4:job-517) DeploymentPlanner allocation algorithm: > userconcentratedpod_firstfit > 2013-04-23 16:00:45,625 DEBUG [cloud.deploy.FirstFitPlanner] > (Job-Executor-4:job-517) Trying to allocate a host and storage pools from > dc:1, pod:1,cluster:1, requested cpu: 8000, requested ram: 17179869184 > 2013-04-23 16:00:45,625 DEBUG [cloud.deploy.FirstFitPlanner] > (Job-Executor-4:job-517) Is ROOT volume READY (pool already allocated)?: Yes > 2013-04-23 16:00:45,625 DEBUG [cloud.deploy.FirstFitPlanner] > (Job-Executor-4:job-517) This VM has last host_id specified, trying to choose > the same host: 1 > 2013-04-23 16:00:45,642 DEBUG [cloud.capacity.CapacityManagerImpl] > (Job-Executor-4:job-517) Checking if host: 1 has enough capacity for > requested CPU: 8000 and requested RAM: 17179869184 , > cpuOverprovisioningFactor: 1.1 > 2013-04-23 16:00:45,648 DEBUG [cloud.capacity.CapacityManagerImpl] > (Job-Executor-4:job-517) Hosts's actual total CPU: 64032 and CPU after > applying overprovisioning: 70435 > 2013-04-23 16:00:45,648 DEBUG [cloud.capacity.CapacityManagerImpl] > (Job-Executor-4:job-517) We need to allocate to the last host again, so > checking if there is enough reserved capacity > 2013-04-23 16:00:45,648 DEBUG [cloud.capacity.CapacityManagerImpl] > (Job-Executor-4:job-517) Reserved CPU: 0 , Requested CPU: 8000 > 2013-04-23 16:00:45,648 DEBUG [cloud.capacity.CapacityManagerImpl] > (Job-Executor-4:job-517) Reserved RAM: 0 , Requested RAM: 17179869184 > 2013-04-23 16:00:45,649 DEBUG [cloud.capacity.CapacityManagerImpl] > (Job-Executor-4:job-517) STATS: Failed to alloc resource from host: 1 > reservedCpu: 0, requested cpu: 8000, reservedMem: 0, requested mem: > 17179869184 > 2013-04-23 16:00:45,649 DEBUG [cloud.capacity.CapacityManagerImpl] > (Job-Executor-4:job-517) Host does not have enough reserved CPU available, > cannot allocate to this host. > 2013-04-23 16:00:45,649 DEBUG [cloud.deploy.FirstFitPlanner] > (Job-Executor-4:job-517) The last host of this VM does not have enough > capacity > 2013-04-23 16:00:45,649 DEBUG [cloud.deploy.FirstFitPlanner] > (Job-Executor-4:job-517) Cannot choose the last host to deploy this VM > 2013-04-23 16:00:45,649 DEBUG [cloud.deploy.FirstFitPlanner] > (Job-Executor-4:job-517) Searching resources only under specified Cluster: 1 > 2013-04-23 16:00:45,666 DEBUG [cloud.deploy.FirstFitPlanner] > (Job-Executor-4:job-517) Checking resources in Cluster: 1 under Pod: 1 > 2013-04-23 16:00:45,684 ERROR [cloud.async.AsyncJobManagerImpl] > (Job-Executor-4:job-517) Unexpected exception while executing > org.apache.cloudstack.api.command.user.vm.StartVMCmd > java.lang.NullPointerException > at > com.cloud.deploy.FirstFitPlanner.findSuitableHosts(FirstFitPlanner.java:724) > at > com.cloud.deploy.FirstFitPlanner.checkClustersforDestination(FirstFitPlanner.java:532) > at com.cloud.deploy.FirstFitPlanner.plan(FirstFitPlanner.java:258) > at > org.apache.cloudstack.engine.cloud.entity.api.VMEntityManagerImpl.reserveVirtualMachine(VMEntityManagerImpl.java:166) > at > org.apache.cloudstack.engine.cloud.entity.api.VirtualMachineEntityImpl.reserve(VirtualMachineEntityImpl.java:198) > at > com.cloud.vm.UserVmManagerImpl.startVirtualMachine(UserVmManagerImpl.java:3867) > at > com.cloud.vm.UserVmManagerImpl.startVirtualMachine(UserVmManagerImpl.java:2581) > at > com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125) > at > org.apache.cloudstack.api.command.user.vm.StartVMCmd.execute(StartVMCmd.java:120) > at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:162) > at > com.cloud.async.AsyncJobManagerImpl$1.run(AsyncJobManagerImpl.java:437) > 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: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