[
https://issues.apache.org/jira/browse/CLOUDSTACK-2662?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13669134#comment-13669134
]
Rajesh Battala commented on CLOUDSTACK-2662:
--------------------------------------------
Fixed the issue and sent for review.
Test Cases Executed Manually :
Accounts : Admin, TestA, TestB
2 Clusters, 3 Hosts. (HostA, HostB, HostC)
When zone is enabled.
In HostA , ssvm, cpvm had came up and this resource is marked as Shared.
1. login to TestA, create Vm with implict Strict.
routerVm for TestA came on HostB (marked as Shared) and instance came up on
HostC ( Marked as Dedicated)
2. from TestA, deploy a VM with implict Preffered.
VM successfuly deployed on the HostC. (as its possible to deploy in strict
mode, VM got deployed on HostC)
3. login to TestB,
Create VM with Implict Strcit.Creation of Vm failed successfuly ( as there
are no empty hosts)
Create VM with Implict Preferred. router VM created on HostB. Instance got
deployed on HostB. (tried Dedicated as there are no empty hosts, tired with
Shared and deployed on HostB)
Create VM with Implict Preferred, deployVm. instance got created on HostA.(
Tried Dedicated and then tried shared. As HostA is marked as Shared VM got
deployed on HostA)
from TestB account two Vm's got deployed, with implict preferred mode. VM's
were successfully deployed on the Hosts which are marked as Shared.
4. Removed the VM's deployed from TestA and Router for the TestA.
HostC now unmarked as 'Dedicated'
5. Login to TestB,
Deploy Vm with Implict preferred. VM got deployed on HostC ( tried strict as
empty HostC is available, VM deployed in HostC). HostC marked as "Dedicated"
Deploy Vm with Implict Strict. VM got deployed on HostC. (As dedicated host
is available because of above deployement. Vm got successfuly deployed on HostC)
6. Login as Admin
deploy vm with "medium instance" offering. VM got deployed in shared
resource host.
> Preferred implicit dedication fails with insufficient capacity even if shared
> hosts are available.
> --------------------------------------------------------------------------------------------------
>
> Key: CLOUDSTACK-2662
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-2662
> 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: Kiran Koneti
> Assignee: Rajesh Battala
> Priority: Blocker
> Fix For: 4.2.0
>
>
> Below are the steps followed :
> 1)Created a Xen Advanced Zone setup with one cluster and hosts.
> 2)The host1 has the system VM's deployed and a VM with the root domain.
> 3)Then created two accounts kiran and kiran2 respectively.
> 4)Was able to deploy VM's using the preferred and strict implicit dedication
> for the Account kiran.
> 5)Then tried to deploy a VM fro the account kiran2 using the preferred
> implicit service offering.
> 6)The VM deployment fails saying insufficient resources even we have the host
> 1 in the shared state.
> the below error message is observed
> "2013-05-24 16:15:09,565 INFO [user.vm.DeployVMCmd] (Job-Executor-3:job-22)
> com.cloud.exception.InsufficientServerCapacityException: Unable to create a
> deployment for VM[U ser|win832pref2]Scope=interface com.cloud.dc.DataCenter;
> id=1
> 2013-05-24 16:15:09,565 INFO [user.vm.DeployVMCmd] (Job-Executor-3:job-22)
> Unable to create a deployment for VM[User|win832pref2]
> com.cloud.exception.InsufficientServerCapacityException: Unable to create a
> deployment for VM[User|win832pref2]Scope=interface com.cloud.dc.DataCenter;
> id=1
> at
> org.apache.cloudstack.engine.cloud.entity.api.VMEntityManagerImpl.reserveVirtualMachine(VMEntityManagerImpl.java:212)
> at
> org.apache.cloudstack.engine.cloud.entity.api.VirtualMachineEntityImpl.reserve(VirtualMachineEntityImpl.java:198)
> at
> com.cloud.vm.UserVmManagerImpl.startVirtualMachine(UserVmManagerImpl.java:3206)
> at
> com.cloud.vm.UserVmManagerImpl.startVirtualMachine(UserVmManagerImpl.java:2745)
> at
> com.cloud.vm.UserVmManagerImpl.startVirtualMachine(UserVmManagerImpl.java:2731)
> at
> com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125)
> at
> org.apache.cloudstack.api.command.user.vm.DeployVMCmd.execute(DeployVMCmd.java:420)
> at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:155)
> 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)"
> The op_host_planner_reservation shows the host dedication details as below:
> mysql> select * from op_host_planner_reservation;
> +----+----------------+--------+------------+---------+----------------+
> | id | data_center_id | pod_id | cluster_id | host_id | resource_usage |
> +----+----------------+--------+------------+---------+----------------+
> | 1 | 1 | 1 | 1 | 1 | Shared |
> | 2 | 1 | 1 | 1 | 5 | Dedicated |
> +----+----------------+--------+------------+---------+----------------+
> 2 rows 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