You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Rajesh Battala <ra...@citrix.com> on 2013/05/29 12:16:28 UTC

Review Request: Fixed CLOUDSTACK-2662 Preferred implicit dedication fails with insufficient capacity even if shared hosts are available.

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/11510/
-----------------------------------------------------------

Review request for cloudstack, Devdeep Singh and Prachi Damle.


Description
-------

Issues:
In Implicit planner resource usage is fixed to "Dedicated". It should be Dedicated/Shared depending upon the Implict Planner strict/preferred modes and hosts availability.

Fixed:
Issue is fixed by determining the resource usage to be "Dedicated/Shared" depending upon the Implicit strict/preferred mode and the hosts availability for the planner.


This addresses bug CLOUDSTACK-2662.


Diffs
-----

  api/src/com/cloud/deploy/DeploymentClusterPlanner.java 1a19c71 
  plugins/deployment-planners/implicit-dedication/src/com/cloud/deploy/ImplicitDedicationPlanner.java d47d8f5 
  server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java 795b526 
  server/src/com/cloud/deploy/FirstFitPlanner.java caf8c6e 

Diff: https://reviews.apache.org/r/11510/diff/


Testing
-------

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.


Screenshots
-----------

mysql_data_xencenter_view
  https://reviews.apache.org/r/11510/s/26/


Thanks,

Rajesh Battala


Re: Review Request: Fixed CLOUDSTACK-2662 Preferred implicit dedication fails with insufficient capacity even if shared hosts are available.

Posted by Prachi Damle <pr...@citrix.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/11510/#review21164
-----------------------------------------------------------


I see the check to see if a host is empty first lists all user VMs on the host and then checks the reservation entry for system VMs. Instead of reading the reservation entry, use a list method on vmInstanceDao (instead of userVmDao) to list all types of vms(user,router,system) on the host.

Also this logic is different in the getPlannerUsage() method Vs the actual planner logic. We should make both consistent.

- Prachi Damle


On May 29, 2013, 10:16 a.m., Rajesh Battala wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/11510/
> -----------------------------------------------------------
> 
> (Updated May 29, 2013, 10:16 a.m.)
> 
> 
> Review request for cloudstack, Devdeep Singh and Prachi Damle.
> 
> 
> Description
> -------
> 
> Issues:
> In Implicit planner resource usage is fixed to "Dedicated". It should be Dedicated/Shared depending upon the Implict Planner strict/preferred modes and hosts availability.
> 
> Fixed:
> Issue is fixed by determining the resource usage to be "Dedicated/Shared" depending upon the Implicit strict/preferred mode and the hosts availability for the planner.
> 
> 
> This addresses bug CLOUDSTACK-2662.
> 
> 
> Diffs
> -----
> 
>   api/src/com/cloud/deploy/DeploymentClusterPlanner.java 1a19c71 
>   plugins/deployment-planners/implicit-dedication/src/com/cloud/deploy/ImplicitDedicationPlanner.java d47d8f5 
>   server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java 795b526 
>   server/src/com/cloud/deploy/FirstFitPlanner.java caf8c6e 
> 
> Diff: https://reviews.apache.org/r/11510/diff/
> 
> 
> Testing
> -------
> 
> 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.
> 
> 
> Screenshots
> -----------
> 
> mysql_data_xencenter_view
>   https://reviews.apache.org/r/11510/s/26/
> 
> 
> Thanks,
> 
> Rajesh Battala
> 
>


RE: Review Request: Fixed CLOUDSTACK-2662 Preferred implicit dedication fails with insufficient capacity even if shared hosts are available.

Posted by Rajesh Battala <ra...@citrix.com>.
Prachi, 

I had removed the unsed inject which is causing the issue. I had uploaded the patch. Please review it.

Thanks
Rajesh Battala

> -----Original Message-----
> From: Prachi Damle [mailto:noreply@reviews.apache.org] On Behalf Of
> Prachi Damle
> Sent: Thursday, May 30, 2013 11:55 PM
> To: Prachi Damle; Devdeep Singh
> Cc: Rajesh Battala; cloudstack
> Subject: Re: Review Request: Fixed CLOUDSTACK-2662 Preferred implicit
> dedication fails with insufficient capacity even if shared hosts are available.
> 
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/11510/#review21201
> -----------------------------------------------------------
> 
> 
> Unit test is failing while trying mvn clean install
> 
> Tests in error:
> 
> checkWhenDcInAvoidList(org.apache.cloudstack.implicitplanner.ImplicitPlann
> erTest): Error creating bean with name 'implicitDedicationPlanner': Injection
> of autowired dependencies failed; nested exception is
> org.springframework.beans.factory.BeanCreationException: Could not
> autowire field: com.cloud.deploy.dao.PlannerHostReservationDao
> com.cloud.deploy.ImplicitDedicationPlanner._plannerHostReserveDao;
> nested exception is
> org.springframework.beans.factory.NoSuchBeanDefinitionException: No
> matching bean of type [com.cloud.deploy.dao.PlannerHostReservationDao]
> found for dependency: expected at least 1 bean which qualifies as autowire
> candidate for this dependency. Dependency annotations:
> {@javax.inject.Inject()}
> 
> 
> 
> - Prachi Damle
> 
> 
> On May 30, 2013, 4:39 p.m., Rajesh Battala wrote:
> >
> > -----------------------------------------------------------
> > This is an automatically generated e-mail. To reply, visit:
> > https://reviews.apache.org/r/11510/
> > -----------------------------------------------------------
> >
> > (Updated May 30, 2013, 4:39 p.m.)
> >
> >
> > Review request for cloudstack, Devdeep Singh and Prachi Damle.
> >
> >
> > Description
> > -------
> >
> > Issues:
> > In Implicit planner resource usage is fixed to "Dedicated". It should be
> Dedicated/Shared depending upon the Implict Planner strict/preferred
> modes and hosts availability.
> >
> > Fixed:
> > Issue is fixed by determining the resource usage to be "Dedicated/Shared"
> depending upon the Implicit strict/preferred mode and the hosts availability
> for the planner.
> >
> >
> > This addresses bug CLOUDSTACK-2662.
> >
> >
> > Diffs
> > -----
> >
> >   api/src/com/cloud/deploy/DeploymentClusterPlanner.java 1a19c71
> >   plugins/deployment-planners/implicit-
> dedication/src/com/cloud/deploy/ImplicitDedicationPlanner.java d47d8f5
> >   plugins/deployment-planners/implicit-
> dedication/test/org/apache/cloudstack/implicitplanner/ImplicitPlannerTest.j
> ava 4450760
> >   server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java
> d954c8b
> >   server/src/com/cloud/deploy/FirstFitPlanner.java caf8c6e
> >
> > Diff: https://reviews.apache.org/r/11510/diff/
> >
> >
> > Testing
> > -------
> >
> > 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.
> >
> >
> > Screenshots
> > -----------
> >
> > mysql_data_xencenter_view
> >   https://reviews.apache.org/r/11510/s/26/
> >
> >
> > Thanks,
> >
> > Rajesh Battala
> >
> >


Re: Review Request: Fixed CLOUDSTACK-2662 Preferred implicit dedication fails with insufficient capacity even if shared hosts are available.

Posted by Prachi Damle <pr...@citrix.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/11510/#review21201
-----------------------------------------------------------


Unit test is failing while trying mvn clean install 

Tests in error:
  checkWhenDcInAvoidList(org.apache.cloudstack.implicitplanner.ImplicitPlannerTest): Error creating bean with name 'implicitDedicationPlanner': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: com.cloud.deploy.dao.PlannerHostReservationDao com.cloud.deploy.ImplicitDedicationPlanner._plannerHostReserveDao; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [com.cloud.deploy.dao.PlannerHostReservationDao] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@javax.inject.Inject()}
 


- Prachi Damle


On May 30, 2013, 4:39 p.m., Rajesh Battala wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/11510/
> -----------------------------------------------------------
> 
> (Updated May 30, 2013, 4:39 p.m.)
> 
> 
> Review request for cloudstack, Devdeep Singh and Prachi Damle.
> 
> 
> Description
> -------
> 
> Issues:
> In Implicit planner resource usage is fixed to "Dedicated". It should be Dedicated/Shared depending upon the Implict Planner strict/preferred modes and hosts availability.
> 
> Fixed:
> Issue is fixed by determining the resource usage to be "Dedicated/Shared" depending upon the Implicit strict/preferred mode and the hosts availability for the planner.
> 
> 
> This addresses bug CLOUDSTACK-2662.
> 
> 
> Diffs
> -----
> 
>   api/src/com/cloud/deploy/DeploymentClusterPlanner.java 1a19c71 
>   plugins/deployment-planners/implicit-dedication/src/com/cloud/deploy/ImplicitDedicationPlanner.java d47d8f5 
>   plugins/deployment-planners/implicit-dedication/test/org/apache/cloudstack/implicitplanner/ImplicitPlannerTest.java 4450760 
>   server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java d954c8b 
>   server/src/com/cloud/deploy/FirstFitPlanner.java caf8c6e 
> 
> Diff: https://reviews.apache.org/r/11510/diff/
> 
> 
> Testing
> -------
> 
> 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.
> 
> 
> Screenshots
> -----------
> 
> mysql_data_xencenter_view
>   https://reviews.apache.org/r/11510/s/26/
> 
> 
> Thanks,
> 
> Rajesh Battala
> 
>


Re: Review Request: Fixed CLOUDSTACK-2662 Preferred implicit dedication fails with insufficient capacity even if shared hosts are available.

Posted by Prachi Damle <pr...@citrix.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/11510/#review21243
-----------------------------------------------------------

Ship it!


Ship It!

- Prachi Damle


On May 31, 2013, 2:51 a.m., Rajesh Battala wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/11510/
> -----------------------------------------------------------
> 
> (Updated May 31, 2013, 2:51 a.m.)
> 
> 
> Review request for cloudstack, Devdeep Singh and Prachi Damle.
> 
> 
> Description
> -------
> 
> Issues:
> In Implicit planner resource usage is fixed to "Dedicated". It should be Dedicated/Shared depending upon the Implict Planner strict/preferred modes and hosts availability.
> 
> Fixed:
> Issue is fixed by determining the resource usage to be "Dedicated/Shared" depending upon the Implicit strict/preferred mode and the hosts availability for the planner.
> 
> 
> This addresses bug CLOUDSTACK-2662.
> 
> 
> Diffs
> -----
> 
>   api/src/com/cloud/deploy/DeploymentClusterPlanner.java 1a19c71 
>   plugins/deployment-planners/implicit-dedication/src/com/cloud/deploy/ImplicitDedicationPlanner.java d47d8f5 
>   plugins/deployment-planners/implicit-dedication/test/org/apache/cloudstack/implicitplanner/ImplicitPlannerTest.java 4450760 
>   server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java d954c8b 
>   server/src/com/cloud/deploy/FirstFitPlanner.java caf8c6e 
> 
> Diff: https://reviews.apache.org/r/11510/diff/
> 
> 
> Testing
> -------
> 
> 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.
> 
> 
> Screenshots
> -----------
> 
> mysql_data_xencenter_view
>   https://reviews.apache.org/r/11510/s/26/
> 
> 
> Thanks,
> 
> Rajesh Battala
> 
>


Re: Review Request: Fixed CLOUDSTACK-2662 Preferred implicit dedication fails with insufficient capacity even if shared hosts are available.

Posted by ASF Subversion and Git Services <as...@urd.zones.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/11510/#review21242
-----------------------------------------------------------


Commit af4177b86cd10b9216f07266ad5d85b22d59eb61 in branch refs/heads/master from Prachi Damle <pr...@cloud.com>
[ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=af4177b ]

Fixed CLOUDSTACK-2662 Preferred implicit dedication fails with insufficient capacity even if shared hosts are available.

Issues:
In Implicit planner resource usage is fixed to "Dedicated". It should be Dedicated/Shared depending upon the Implict Planner strict/preferred modes and hosts availability.

Fixed:
Issue is fixed by determining the resource usage to be "Dedicated/Shared" depending upon the Implicit strict/preferred mode and the hosts availability for the planner.


- ASF Subversion and Git Services


On May 31, 2013, 2:51 a.m., Rajesh Battala wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/11510/
> -----------------------------------------------------------
> 
> (Updated May 31, 2013, 2:51 a.m.)
> 
> 
> Review request for cloudstack, Devdeep Singh and Prachi Damle.
> 
> 
> Description
> -------
> 
> Issues:
> In Implicit planner resource usage is fixed to "Dedicated". It should be Dedicated/Shared depending upon the Implict Planner strict/preferred modes and hosts availability.
> 
> Fixed:
> Issue is fixed by determining the resource usage to be "Dedicated/Shared" depending upon the Implicit strict/preferred mode and the hosts availability for the planner.
> 
> 
> This addresses bug CLOUDSTACK-2662.
> 
> 
> Diffs
> -----
> 
>   api/src/com/cloud/deploy/DeploymentClusterPlanner.java 1a19c71 
>   plugins/deployment-planners/implicit-dedication/src/com/cloud/deploy/ImplicitDedicationPlanner.java d47d8f5 
>   plugins/deployment-planners/implicit-dedication/test/org/apache/cloudstack/implicitplanner/ImplicitPlannerTest.java 4450760 
>   server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java d954c8b 
>   server/src/com/cloud/deploy/FirstFitPlanner.java caf8c6e 
> 
> Diff: https://reviews.apache.org/r/11510/diff/
> 
> 
> Testing
> -------
> 
> 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.
> 
> 
> Screenshots
> -----------
> 
> mysql_data_xencenter_view
>   https://reviews.apache.org/r/11510/s/26/
> 
> 
> Thanks,
> 
> Rajesh Battala
> 
>


Re: Review Request: Fixed CLOUDSTACK-2662 Preferred implicit dedication fails with insufficient capacity even if shared hosts are available.

Posted by Rajesh Battala <ra...@citrix.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/11510/
-----------------------------------------------------------

(Updated May 31, 2013, 2:51 a.m.)


Review request for cloudstack, Devdeep Singh and Prachi Damle.


Changes
-------

unused import caused the issues. removed it from planner.
I had tested now. its working fine.


-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running org.apache.cloudstack.implicitplanner.ImplicitPlannerTest
log4j:WARN No appenders could be found for logger (org.springframework.test.context.junit4.SpringJUnit4ClassRunner).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.332 sec

Results :

Tests run: 6, Failures: 0, Errors: 0, Skipped: 0

[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ cloud-plugin-planner-implicit-dedication ---
[INFO] Building jar: /home/rajesh/hc_fzf/plugins/deployment-planners/implicit-dedication/target/cloud-plugin-planner-implicit-dedication-4.2.0-SNAPSHOT.jar
[INFO]
[INFO] --- maven-site-plugin:3.1:attach-descriptor (attach-descriptor) @ cloud-plugin-planner-implicit-dedication ---
[INFO]
[INFO] --- maven-install-plugin:2.3.1:install (default-install) @ cloud-plugin-planner-implicit-dedication ---
[INFO] Installing /home/rajesh/hc_fzf/plugins/deployment-planners/implicit-dedication/target/cloud-plugin-planner-implicit-dedication-4.2.0-SNAPSHOT.jar to /home/rajesh/.m2/repository/org/apache/cloudstack/cloud-plugin-planner-implicit-dedication/4.2.0-SNAPSHOT/cloud-plugin-planner-implicit-dedication-4.2.0-SNAPSHOT.jar
[INFO] Installing /home/rajesh/hc_fzf/plugins/deployment-planners/implicit-dedication/pom.xml to /home/rajesh/.m2/repository/org/apache/cloudstack/cloud-plugin-planner-implicit-dedication/4.2.0-SNAPSHOT/cloud-plugin-planner-implicit-dedication-4.2.0-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS


Description
-------

Issues:
In Implicit planner resource usage is fixed to "Dedicated". It should be Dedicated/Shared depending upon the Implict Planner strict/preferred modes and hosts availability.

Fixed:
Issue is fixed by determining the resource usage to be "Dedicated/Shared" depending upon the Implicit strict/preferred mode and the hosts availability for the planner.


This addresses bug CLOUDSTACK-2662.


Diffs (updated)
-----

  api/src/com/cloud/deploy/DeploymentClusterPlanner.java 1a19c71 
  plugins/deployment-planners/implicit-dedication/src/com/cloud/deploy/ImplicitDedicationPlanner.java d47d8f5 
  plugins/deployment-planners/implicit-dedication/test/org/apache/cloudstack/implicitplanner/ImplicitPlannerTest.java 4450760 
  server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java d954c8b 
  server/src/com/cloud/deploy/FirstFitPlanner.java caf8c6e 

Diff: https://reviews.apache.org/r/11510/diff/


Testing
-------

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.


Screenshots
-----------

mysql_data_xencenter_view
  https://reviews.apache.org/r/11510/s/26/


Thanks,

Rajesh Battala


Re: Review Request: Fixed CLOUDSTACK-2662 Preferred implicit dedication fails with insufficient capacity even if shared hosts are available.

Posted by Rajesh Battala <ra...@citrix.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/11510/
-----------------------------------------------------------

(Updated May 30, 2013, 4:39 p.m.)


Review request for cloudstack, Devdeep Singh and Prachi Damle.


Changes
-------

Modified Test file,
As UserVmDao is replaced with VmInstanceDao associated changes had been made to the Test file. (to inject VmInstanceDao instead of UserVmDao)


Description
-------

Issues:
In Implicit planner resource usage is fixed to "Dedicated". It should be Dedicated/Shared depending upon the Implict Planner strict/preferred modes and hosts availability.

Fixed:
Issue is fixed by determining the resource usage to be "Dedicated/Shared" depending upon the Implicit strict/preferred mode and the hosts availability for the planner.


This addresses bug CLOUDSTACK-2662.


Diffs (updated)
-----

  api/src/com/cloud/deploy/DeploymentClusterPlanner.java 1a19c71 
  plugins/deployment-planners/implicit-dedication/src/com/cloud/deploy/ImplicitDedicationPlanner.java d47d8f5 
  plugins/deployment-planners/implicit-dedication/test/org/apache/cloudstack/implicitplanner/ImplicitPlannerTest.java 4450760 
  server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java d954c8b 
  server/src/com/cloud/deploy/FirstFitPlanner.java caf8c6e 

Diff: https://reviews.apache.org/r/11510/diff/


Testing
-------

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.


Screenshots
-----------

mysql_data_xencenter_view
  https://reviews.apache.org/r/11510/s/26/


Thanks,

Rajesh Battala


RE: Review Request: Fixed CLOUDSTACK-2662 Preferred implicit dedication fails with insufficient capacity even if shared hosts are available.

Posted by Rajesh Battala <ra...@citrix.com>.
Additional Tests Cases executed :


1.      Deploy setup with only one host.

Enabling zone will create sys vms on the host and it will be marked as Shared.

Deploy VM from the account with Implict preferred. It will try in strict and then tried Shared and created instance in the available single host.

Thanks
Rajesh Battala



From: Rajesh Battala [mailto:noreply@reviews.apache.org] On Behalf Of Rajesh Battala
Sent: Thursday, May 30, 2013 4:53 PM
To: Prachi Damle; Devdeep Singh
Cc: Rajesh Battala; cloudstack
Subject: Re: Review Request: Fixed CLOUDSTACK-2662 Preferred implicit dedication fails with insufficient capacity even if shared hosts are available.

This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/11510/


Review request for cloudstack, Devdeep Singh and Prachi Damle.
By Rajesh Battala.

Updated May 30, 2013, 11:22 a.m.

Changes

incorporate review comments.


Description

Issues:

In Implicit planner resource usage is fixed to "Dedicated". It should be Dedicated/Shared depending upon the Implict Planner strict/preferred modes and hosts availability.



Fixed:

Issue is fixed by determining the resource usage to be "Dedicated/Shared" depending upon the Implicit strict/preferred mode and the hosts availability for the planner.


Testing

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.

Bugs: CLOUDSTACK-2662
Diffs (updated)

  *   api/src/com/cloud/deploy/DeploymentClusterPlanner.java (1a19c71)
  *   plugins/deployment-planners/implicit-dedication/src/com/cloud/deploy/ImplicitDedicationPlanner.java (d47d8f5)
  *   server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java (d954c8b)
  *   server/src/com/cloud/deploy/FirstFitPlanner.java (caf8c6e)

View Diff<https://reviews.apache.org/r/11510/diff/>

Screenshots
[mysql_data_xencenter_view]<https://reviews.apache.org/r/11510/s/26/>



Re: Review Request: Fixed CLOUDSTACK-2662 Preferred implicit dedication fails with insufficient capacity even if shared hosts are available.

Posted by Rajesh Battala <ra...@citrix.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/11510/
-----------------------------------------------------------

(Updated May 30, 2013, 11:22 a.m.)


Review request for cloudstack, Devdeep Singh and Prachi Damle.


Changes
-------

incorporate review comments.


Description
-------

Issues:
In Implicit planner resource usage is fixed to "Dedicated". It should be Dedicated/Shared depending upon the Implict Planner strict/preferred modes and hosts availability.

Fixed:
Issue is fixed by determining the resource usage to be "Dedicated/Shared" depending upon the Implicit strict/preferred mode and the hosts availability for the planner.


This addresses bug CLOUDSTACK-2662.


Diffs (updated)
-----

  api/src/com/cloud/deploy/DeploymentClusterPlanner.java 1a19c71 
  plugins/deployment-planners/implicit-dedication/src/com/cloud/deploy/ImplicitDedicationPlanner.java d47d8f5 
  server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java d954c8b 
  server/src/com/cloud/deploy/FirstFitPlanner.java caf8c6e 

Diff: https://reviews.apache.org/r/11510/diff/


Testing
-------

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.


Screenshots
-----------

mysql_data_xencenter_view
  https://reviews.apache.org/r/11510/s/26/


Thanks,

Rajesh Battala