[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-2096?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Prachi Damle resolved CLOUDSTACK-2096.
--------------------------------------

    Resolution: Fixed
    
> Deployment Planner - Deployment planner is not looking for hosts in other 
> clusters when vm is being started. 
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: CLOUDSTACK-2096
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-2096
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>    Affects Versions: 4.2.0
>         Environment: Build from master
>            Reporter: Sangeetha Hariharan
>            Assignee: Prachi Damle
>             Fix For: 4.2.0
>
>
> Deployment Planner - Deployment planner is not looking for hosts in other 
> clusters when vm is being started
> Test scvenario:
> Set up have 3 clusters with 1 host each:
> 1.As regular user - U1 , Create multiple anti-affinity group.
> 2. Deploy 2 Vms , say Vm11(host1) and VM12(host2) using affinity group A1.
> 3. Deploy 1 Vm , say Vm21(host1) using affinity group A2.
> 4. Stop  Vm11.
> 5. Update the list of affinityGroups for this VM  to "A1" and "A2"
> 6. Start the VM.
> We expect the VM to now start in host3 . But this is not happening.
> Deployment planner is not looking for hosts in other clusters when vm is 
> being started. 
> Management server logs:
> 2013-04-18 11:43:46,172 DEBUG [cloud.async.AsyncJobManagerImpl] 
> (catalina-exec-4:null) submit async job-108, details: AsyncJobVO {id:108, 
> userId: 3, accoun
> tId: 3, sessionKey: null, instanceType: null, instanceId: 30, cmd: 
> org.apache.cloudstack.api.command.user.vm.StartVMCmd, cmdOriginator: null, 
> cmdInfo: 
> {"response":"json","id":"0b54114b-4524-453f-84a4-18abd113b32c","sessionkey":"zfnn76bzIG5lkBToPNhry/0IGKE\u003d","ctxUserId":"3","_":"1366310640099","ctxAccountId":"3","ctxStartEventId":"415"},
>  cmdVersion: 0, callbackType: 0, callbackAddress: null, status: 0, 
> processStatus: 0, resultCode: 0, result: null, initMsid: 7508777239729, 
> completeMsid: null, lastUpdated: null, lastPolled: null, created: null}
> 2013-04-18 11:43:46,174 DEBUG [cloud.api.ApiServlet] (catalina-exec-4:null) 
> ===END===  10.217.252.128 -- GET  
> command=startVirtualMachine&id=0b54114b-4524-453f-84a4-18abd113b32c&response=json&sessionkey=zfnn76bzIG5lkBToPNhry%2F0IGKE%3D&_=1366310640099
> 2013-04-18 11:43:46,175 DEBUG [cloud.async.AsyncJobManagerImpl] 
> (Job-Executor-59:job-108) Executing 
> org.apache.cloudstack.api.command.user.vm.StartVMCmd for job-108
> 2013-04-18 11:43:46,191 DEBUG [cloud.user.AccountManagerImpl] 
> (Job-Executor-59:job-108) Access to VM[User|try1-99] granted to 
> Acct[3-sangee] by DomainChecker_EnhancerByCloudStack_daf355b4
> 2013-04-18 11:43:46,202 DEBUG [cloud.network.NetworkModelImpl] 
> (Job-Executor-59:job-108) Service SecurityGroup is not supported in the 
> network id=204
> 2013-04-18 11:43:46,206 DEBUG [cloud.network.NetworkModelImpl] 
> (Job-Executor-59:job-108) Service SecurityGroup is not supported in the 
> network id=204
> 2013-04-18 11:43:46,215 DEBUG [cloudstack.affinity.HostAntiAffinityProcessor] 
> (Job-Executor-59:job-108) Processing affinity group sangee-99 for VM Id: 30
> 2013-04-18 11:43:46,217 DEBUG [cloudstack.affinity.HostAntiAffinityProcessor] 
> (Job-Executor-59:job-108) Added host 5 to avoid set, since VM 31 is present 
> on the host
> 2013-04-18 11:43:46,218 DEBUG [cloudstack.affinity.HostAntiAffinityProcessor] 
> (Job-Executor-59:job-108) Processing affinity group sangee-9 for VM Id: 30
> 2013-04-18 11:43:46,220 DEBUG [cloudstack.affinity.HostAntiAffinityProcessor] 
> (Job-Executor-59:job-108) Added host 6 to avoid set, since VM 32 is present 
> on the host
> 2013-04-18 11:43:46,220 DEBUG [cloud.deploy.DeploymentPlanningManagerImpl] 
> (Job-Executor-59:job-108) Deploy avoids pods: null, clusters: null, hosts: 
> [5, 6]
> 2013-04-18 11:43:46,221 DEBUG [cloud.deploy.FirstFitPlanner] 
> (Job-Executor-59:job-108) DeploymentPlanner allocation algorithm: random
> 2013-04-18 11:43:46,221 DEBUG [cloud.deploy.FirstFitPlanner] 
> (Job-Executor-59:job-108) Trying to allocate a host and storage pools from 
> dc:1, pod:3,cluster:4, requested cpu: 500, requested ram: 536870912
> 2013-04-18 11:43:46,221 DEBUG [cloud.deploy.FirstFitPlanner] 
> (Job-Executor-59:job-108) Is ROOT volume READY (pool already allocated)?: Yes
> 2013-04-18 11:43:46,221 DEBUG [cloud.deploy.FirstFitPlanner] 
> (Job-Executor-59:job-108) This VM has last host_id specified, trying to 
> choose the same host: 6
> 2013-04-18 11:43:46,222 DEBUG [cloud.deploy.FirstFitPlanner] 
> (Job-Executor-59:job-108) The last host of this VM is in avoid set
> 2013-04-18 11:43:46,222 DEBUG [cloud.deploy.FirstFitPlanner] 
> (Job-Executor-59:job-108) Cannot choose the last host to deploy this VM
> 2013-04-18 11:43:46,222 DEBUG [cloud.deploy.FirstFitPlanner] 
> (Job-Executor-59:job-108) Searching resources only under specified Cluster: 4
> 2013-04-18 11:43:46,226 DEBUG [cloud.deploy.FirstFitPlanner] 
> (Job-Executor-59:job-108) Checking resources in Cluster: 4 under Pod: 3
> 2013-04-18 11:43:46,228 DEBUG [allocator.impl.FirstFitAllocator] 
> (Job-Executor-59:job-108 FirstFitRoutingAllocator) Looking for hosts in dc: 1 
>  pod:3  cluster:4
> 2013-04-18 11:43:46,229 DEBUG [allocator.impl.FirstFitAllocator] 
> (Job-Executor-59:job-108 FirstFitRoutingAllocator) FirstFitAllocator has 1 
> hosts to check for allocation: [Host[-6-Routing]]
> 2013-04-18 11:43:46,233 DEBUG [allocator.impl.FirstFitAllocator] 
> (Job-Executor-59:job-108 FirstFitRoutingAllocator) Found 1 hosts for 
> allocation after prioritization: [Host[-6-Routing]]
> 2013-04-18 11:43:46,233 DEBUG [allocator.impl.FirstFitAllocator] 
> (Job-Executor-59:job-108 FirstFitRoutingAllocator) Looking for speed=500Mhz, 
> Ram=512
> 2013-04-18 11:43:46,233 DEBUG [allocator.impl.FirstFitAllocator] 
> (Job-Executor-59:job-108 FirstFitRoutingAllocator) Host name: 
> Host57-5.lab.vmops.com, hostId: 6 is in avoid set, skipping this and trying 
> other available hosts
> 2013-04-18 11:43:46,233 DEBUG [allocator.impl.FirstFitAllocator] 
> (Job-Executor-59:job-108 FirstFitRoutingAllocator) Host Allocator returning 0 
> suitable hosts
> 2013-04-18 11:43:46,233 DEBUG [cloud.deploy.FirstFitPlanner] 
> (Job-Executor-59:job-108) No suitable hosts found
> 2013-04-18 11:43:46,233 DEBUG [cloud.deploy.FirstFitPlanner] 
> (Job-Executor-59:job-108) No suitable hosts found under this Cluster: 4
> 2013-04-18 11:43:46,233 DEBUG [cloud.deploy.FirstFitPlanner] 
> (Job-Executor-59:job-108) Could not find suitable Deployment Destination for 
> this VM under any clusters, returning.
> 2013-04-18 11:43:46,240 ERROR [cloud.async.AsyncJobManagerImpl] 
> (Job-Executor-59:job-108) Unexpected exception while executing 
> org.apache.cloudstack.api.command.user.vm.StartVMCmd
> com.cloud.exception.InsufficientServerCapacityException: Unable to create a 
> deployment for VM[User|try1-99]Scope=interface com.cloud.dc.DataCenter; id=1
>         at 
> org.apache.cloudstack.engine.cloud.entity.api.VMEntityManagerImpl.reserveVirtualMachine(VMEntityManagerImpl.java:191)
>         at 
> org.apache.cloudstack.engine.cloud.entity.api.VirtualMachineEntityImpl.reserve(VirtualMachineEntityImpl.java:198)
>         at 
> com.cloud.vm.UserVmManagerImpl.startVirtualMachine(UserVmManagerImpl.java:3040)
>         at 
> com.cloud.vm.UserVmManagerImpl.startVirtualMachine(UserVmManagerImpl.java:1681)
>         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:164)
>         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:1110)
>         at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
>         at java.lang.Thread.run(Thread.java:679)
> 2013-04-18 11:43:46,244 DEBUG [cloud.async.AsyncJobManagerImpl] 
> (Job-Executor-59:job-108) Complete async job-108, jobStatus: 2, resultCode: 
> 530, result: Error Code: 530 Error text: Unable to create a deployment for 
> VM[User|try1-99]

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