Sanjeev N created CLOUDSTACK-3150:
-------------------------------------

             Summary: [Dedicated_Resources] Host is going to avoid set while 
deploying a VM 
                 Key: CLOUDSTACK-3150
                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-3150
             Project: CloudStack
          Issue Type: Bug
      Security Level: Public (Anyone can view this level - this is the default.)
          Components: Install and Setup
    Affects Versions: 4.2.0
         Environment: Latest build from master-6-17-stable branch
            Reporter: Sanjeev N
            Priority: Critical
             Fix For: 4.2.0
         Attachments: management-server.rar

Host is going to avoid set while deploying a VM 

Steps to Reproduce:
================
1.Bring up CS with only one host and one cluster in the zone
2.Wait for the system vms to come up
3.After the default CentOS template is in Ready state try to deploy guest vm 
with default Compute Offering(Small)

Expected Result:
==============
VM deployment should succeed.

Actual Result:
===========
VM deployment failed 

Observations:
===========
After the system vms are up host automatically went into to Dedicated state. So 
the FirstFitAllocator is not finding any suitable host to deploy the vm since 
this is host is in avoid set.

Following is the log snippet:

2013-06-24 11:05:34,664 DEBUG [cloud.async.AsyncJobManagerImpl] 
(catalina-exec-21:null) submit async job-23, details: AsyncJobVO {id:23, 
userId: 2, accountId: 2, sessionKey: null, instanceType: VirtualMachine, 
instanceId: 9, cmd: org.apache.cloudstack.api.command.user.vm.DeployVMCmd, 
cmdOriginator: null, cmdInfo: 
{"sessionkey":"BUwec1jIHiTD3QZHDFe8xdXLerc\u003d","ctxUserId":"2","serviceOfferingId":"2e01eb93-32b9-4006-819d-5ec0fbb56010","httpmethod":"GET","securitygroupids":"a05e80b0-daa2-11e2-bb94-06ab4600005f","zoneId":"9633b3cf-ee80-415c-8e66-0dd1ab70d466","templateId":"3b266e5f-339a-4c65-b704-d10211f736e8","response":"json","id":"9","hypervisor":"XenServer","name":"s1","_":"1372066621056","ctxAccountId":"2","ctxStartEventId":"101","displayname":"s1"},
 cmdVersion: 0, callbackType: 0, callbackAddress: null, status: 0, 
processStatus: 0, resultCode: 0, result: null, initMsid: 7332683579487, 
completeMsid: null, lastUpdated: null, lastPolled: null, created: null}
2013-06-24 11:05:34,667 DEBUG [cloud.api.ApiServlet] (catalina-exec-21:null) 
===END===  10.146.0.20 -- GET  
command=deployVirtualMachine&zoneId=9633b3cf-ee80-415c-8e66-0dd1ab70d466&templateId=3b266e5f-339a-4c65-b704-d10211f736e8&hypervisor=XenServer&serviceOfferingId=2e01eb93-32b9-4006-819d-5ec0fbb56010&securitygroupids=a05e80b0-daa2-11e2-bb94-06ab4600005f&displayname=s1&name=s1&response=json&sessionkey=BUwec1jIHiTD3QZHDFe8xdXLerc%3D&_=1372066621056
2013-06-24 11:05:34,677 DEBUG [cloud.async.AsyncJobManagerImpl] 
(Job-Executor-17:job-23) Executing 
org.apache.cloudstack.api.command.user.vm.DeployVMCmd for job-23
2013-06-24 11:05:34,686 DEBUG [cloud.api.ApiDispatcher] 
(Job-Executor-17:job-23) InfrastructureEntity name 
is:com.cloud.offering.ServiceOffering
2013-06-24 11:05:34,690 DEBUG [cloud.api.ApiDispatcher] 
(Job-Executor-17:job-23) ControlledEntity name 
is:com.cloud.template.VirtualMachineTemplate
2013-06-24 11:05:34,693 DEBUG [cloud.api.ApiDispatcher] 
(Job-Executor-17:job-23) ControlledEntity name 
is:com.cloud.network.security.SecurityGroup
2013-06-24 11:05:34,795 DEBUG [cloud.deploy.DeploymentPlanningManagerImpl] 
(Job-Executor-17:job-23) Cannot use this dedicated host Rack1Pod1Host13.
2013-06-24 11:05:34,796 DEBUG [cloud.deploy.DeploymentPlanningManagerImpl] 
(Job-Executor-17:job-23) Deploy avoids pods: null, clusters: null, hosts: [5]
2013-06-24 11:05:34,799 DEBUG [cloud.deploy.DeploymentPlanningManagerImpl] 
(Job-Executor-17:job-23) DeploymentPlanner allocation algorithm: 
com.cloud.deploy.FirstFitPlanner_EnhancerByCloudStack_691b6f1d@354c0a31
2013-06-24 11:05:34,799 DEBUG [cloud.deploy.DeploymentPlanningManagerImpl] 
(Job-Executor-17:job-23) Trying to allocate a host and storage pools from dc:1, 
pod:null,cluster:null, requested cpu: 500, requested ram: 536870912
2013-06-24 11:05:34,799 DEBUG [cloud.deploy.DeploymentPlanningManagerImpl] 
(Job-Executor-17:job-23) Is ROOT volume READY (pool already allocated)?: No
2013-06-24 11:05:34,799 DEBUG [cloud.deploy.FirstFitPlanner] 
(Job-Executor-17:job-23) Searching all possible resources under this Zone: 1
2013-06-24 11:05:34,801 DEBUG [cloud.deploy.FirstFitPlanner] 
(Job-Executor-17:job-23) Listing clusters in order of aggregate capacity, that 
have (atleast one host with) enough CPU and RAM capacity under this Zone: 1
2013-06-24 11:05:34,816 DEBUG [cloud.deploy.DeploymentPlanningManagerImpl] 
(Job-Executor-17:job-23) Checking resources in Cluster: 1 under Pod: 1
2013-06-24 11:05:34,819 DEBUG [allocator.impl.FirstFitAllocator] 
(Job-Executor-17:job-23 FirstFitRoutingAllocator) Looking for hosts in dc: 1  
pod:1  cluster:1
2013-06-24 11:05:34,824 DEBUG [allocator.impl.FirstFitAllocator] 
(Job-Executor-17:job-23 FirstFitRoutingAllocator) FirstFitAllocator has 1 hosts 
to check for allocation: [Host[-5-Routing]]
2013-06-24 11:05:34,828 DEBUG [allocator.impl.FirstFitAllocator] 
(Job-Executor-17:job-23 FirstFitRoutingAllocator) Found 1 hosts for allocation 
after prioritization: [Host[-5-Routing]]
2013-06-24 11:05:34,828 DEBUG [allocator.impl.FirstFitAllocator] 
(Job-Executor-17:job-23 FirstFitRoutingAllocator) Looking for speed=500Mhz, 
Ram=512
2013-06-24 11:05:34,829 DEBUG [allocator.impl.FirstFitAllocator] 
(Job-Executor-17:job-23 FirstFitRoutingAllocator) Host name: Rack1Pod1Host13, 
hostId: 5 is in avoid set, skipping this and trying other available hosts



mysql> select * from op_host_planner_reservation;
+----+----------------+--------+------------+---------+----------------+
| id | data_center_id | pod_id | cluster_id | host_id | resource_usage |
+----+----------------+--------+------------+---------+----------------+
|  1 |              1 |      1 |          1 |       1 | NULL           |
|  2 |              1 |      1 |          1 |       5 | Shared         |
+----+----------------+--------+------------+---------+----------------+
2 rows in set (0.00 sec)

mysql> select * from dedicated_resources;
+----+--------------------------------------+----------------+--------+------------+---------+-----------+------------+
| id | uuid                                 | data_center_id | pod_id | 
cluster_id | host_id | domain_id | account_id |
+----+--------------------------------------+----------------+--------+------------+---------+-----------+------------+
|  1 | 28790118-5733-4d6d-ac7a-0518f1762760 |           NULL |   NULL |       
NULL |       5 |         1 |       NULL |
+----+--------------------------------------+----------------+--------+------------+---------+-----------+------------+
1 row in set (0.00 sec)



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