Return-Path: X-Original-To: apmail-cloudstack-dev-archive@www.apache.org Delivered-To: apmail-cloudstack-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2D3BAD88D for ; Wed, 22 May 2013 07:03:36 +0000 (UTC) Received: (qmail 21936 invoked by uid 500); 22 May 2013 07:03:35 -0000 Delivered-To: apmail-cloudstack-dev-archive@cloudstack.apache.org Received: (qmail 21240 invoked by uid 500); 22 May 2013 07:03:33 -0000 Mailing-List: contact dev-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list dev@cloudstack.apache.org Received: (qmail 21133 invoked by uid 500); 22 May 2013 07:03:30 -0000 Delivered-To: apmail-incubator-cloudstack-dev@incubator.apache.org Received: (qmail 21065 invoked by uid 99); 22 May 2013 07:03:28 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 May 2013 07:03:28 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id C838C1C28FB; Wed, 22 May 2013 07:03:21 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============7546295433245316377==" MIME-Version: 1.0 Subject: Re: Review Request: CLOUDSTACK-681: Dedicated Resources - Explicit Dedication, Private zone, pod, cluster or host From: "ASF Subversion and Git Services" To: "Prachi Damle" , "Nitin Mehta" , "Devdeep Singh" Cc: "cloudstack" , "ASF Subversion and Git Services" , "deepti dohare" Date: Wed, 22 May 2013 07:03:21 -0000 Message-ID: <20130522070321.13726.29626@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org Auto-Submitted: auto-generated Sender: "ASF Subversion and Git Services" X-ReviewGroup: cloudstack X-ReviewRequest-URL: https://reviews.apache.org/r/10797/ X-Sender: "ASF Subversion and Git Services" References: <20130502145330.17259.23772@reviews.apache.org> In-Reply-To: <20130502145330.17259.23772@reviews.apache.org> Reply-To: "ASF Subversion and Git Services" --===============7546295433245316377== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/10797/#review20888 ----------------------------------------------------------- Commit 49e39e51f2bd39c1e5cd60389f4433d58f9415bc in branch refs/heads/master= from Pranav Saxena [ https://git-wip-us.apache.org/repos/asf?p=3Dcloudstack.git;h=3D49e39e5 ] CLOUDSTACK-681:Implicit Dedication UI support - ASF Subversion and Git Services On May 2, 2013, 2:53 p.m., deepti dohare wrote: > = > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/10797/ > ----------------------------------------------------------- > = > (Updated May 2, 2013, 2:53 p.m.) > = > = > Review request for cloudstack, Devdeep Singh, Prachi Damle, and Nitin Meh= ta. > = > = > Description > ------- > = > Review Request for "Dedicated Resources: Explicit Dedication" > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > = > Functional Spec for the above Private zone, pod, cluster or host, can be = found here: https://cwiki.apache.org/confluence/display/CLOUDSTACK/Dedicate= d+Resources+-+Private+zone%2C+pod%2C+cluster%2C+host+Functional+Spec > This patch request is a part of this feature. > = > This feature allows a user to deploy VMs only in the resources dedicated = to his account or domain. > = > 1. Resources(Zones, Pods, Clusters or hosts) can be dedicated to an accou= nt or domain. > Implemented 12 new APIs to dedicate/list/release resources: > - dedicateZone, listDedicatedZones, releaseDedicatedZone for a Zone. > - dedicatePod, listDedicatedPods, releaseDedicatedPod for a Pod. > - dedicateCluster, listDedicatedClusters, releaseDedicatedCluster for = a Cluster > - dedicateHost, listDedicatedHosts, releaseDedicatedHost for a Host. > 2. Once a resource(eg. pod) is dedicated to an account, other resources(e= g. clusters/hosts) inside that cannot be further dedicated. > 3. Once a resource is dedicated to a domain, other resources inside that = can be further dedicated to its sub-domain or account. > 4. If any resource (eg.cluster) is dedicated to a account/domain, then re= sources(eg. Pod) above that cannot be dedicated to different accounts/domai= n (not belonging to the same domain) = > 5. To use Explicit dedication, user needs to create an Affinity Group of = type 'ExplicitDedication' > 6. A VM can be deployed with the above affinity group parameter as an inp= ut. > 7. A new ExplicitDedicationProcessor has been added which will process th= e affinity group of type 'Explicit Dedication' for a deployment of a VM tha= t demands dedicated resources. > This processor implements the AffinityGroupProcessor adapter. This pro= cessor will update the avoid list. > 8. A VM requesting dedication will be deployed on dedicatd resources if a= vailable with the user account. > 9. A VM requesting dedication can also be deployed on the dedicated resou= rces available with the parent domains iff no dedicated resources are avail= able with the current user's account or = > domain. = > 10. A VM (without dedication) can be deployed on shared host but not on d= edicated hosts. > 11. To modify the dedication, the resource has to be release first. > 12. Existing Private zone functionality has been redirected to Explicit d= edication of zones. > 13. Updated the db upgrade schema script. A new table "dedicated_resource= s" has been added. > 14. Added the right permissions in commands.properties > 15. Unit tests: For the new APIs and Service, added unit tests under : p= lugins/dedicated-resources/test/org/apache/cloudstack/dedicated/DedicatedAp= iUnitTest.java > = > = > This addresses bug CLOUDSTACK-681. > = > = > Diffs > ----- > = > api/src/com/cloud/dc/DedicatedResources.java PRE-CREATION = > api/src/com/cloud/event/EventTypes.java 0ee7f40 = > client/pom.xml a7c7009 = > client/tomcatconf/applicationContext.xml.in 2e340bf = > client/tomcatconf/commands.properties.in b49e1fb = > client/tomcatconf/componentContext.xml.in 7a46981 = > engine/orchestration/src/org/apache/cloudstack/platform/orchestration/C= loudOrchestrator.java 963e4d7 = > plugins/affinity-group-processors/explicit-dedication/pom.xml PRE-CREAT= ION = > plugins/affinity-group-processors/explicit-dedication/src/org/apache/cl= oudstack/affinity/ExplicitDedicationProcessor.java PRE-CREATION = > plugins/dedicated-resources/pom.xml PRE-CREATION = > plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/com= mands/DedicateClusterCmd.java PRE-CREATION = > plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/com= mands/DedicateHostCmd.java PRE-CREATION = > plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/com= mands/DedicatePodCmd.java PRE-CREATION = > plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/com= mands/DedicateZoneCmd.java PRE-CREATION = > plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/com= mands/ListDedicatedClustersCmd.java PRE-CREATION = > plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/com= mands/ListDedicatedHostsCmd.java PRE-CREATION = > plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/com= mands/ListDedicatedPodsCmd.java PRE-CREATION = > plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/com= mands/ListDedicatedZonesCmd.java PRE-CREATION = > plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/com= mands/ReleaseDedicatedClusterCmd.java PRE-CREATION = > plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/com= mands/ReleaseDedicatedHostCmd.java PRE-CREATION = > plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/com= mands/ReleaseDedicatedPodCmd.java PRE-CREATION = > plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/com= mands/ReleaseDedicatedZoneCmd.java PRE-CREATION = > plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/res= ponse/DedicateClusterResponse.java PRE-CREATION = > plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/res= ponse/DedicateHostResponse.java PRE-CREATION = > plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/res= ponse/DedicatePodResponse.java PRE-CREATION = > plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/res= ponse/DedicateZoneResponse.java PRE-CREATION = > plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/manager= /DedicatedResourceManagerImpl.java PRE-CREATION = > plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/service= s/DedicatedService.java PRE-CREATION = > plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/Dedica= tedApiTestConfiguration.java PRE-CREATION = > plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/Dedica= tedApiUnitTest.java PRE-CREATION = > plugins/dedicated-resources/test/resource/dedicatedContext.xml PRE-CREA= TION = > plugins/pom.xml b940271 = > server/src/com/cloud/api/query/QueryManagerImpl.java 50018e5 = > server/src/com/cloud/configuration/ConfigurationManagerImpl.java 37ca79= 3 = > server/src/com/cloud/dc/DedicatedResourceVO.java PRE-CREATION = > server/src/com/cloud/dc/dao/ClusterDao.java 3ce0798 = > server/src/com/cloud/dc/dao/ClusterDaoImpl.java 86dc65e = > server/src/com/cloud/dc/dao/DedicatedResourceDao.java PRE-CREATION = > server/src/com/cloud/dc/dao/DedicatedResourceDaoImpl.java PRE-CREATION = > server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java c7162a2 = > server/src/com/cloud/domain/dao/DomainDaoImpl.java c30ca5e = > server/src/com/cloud/host/dao/HostDao.java 98bdcb4 = > server/src/com/cloud/host/dao/HostDaoImpl.java 07a4232 = > server/src/com/cloud/resource/ResourceManagerImpl.java c9c3f9c = > server/src/com/cloud/user/AccountManagerImpl.java 8de73fb = > server/src/com/cloud/user/DomainManagerImpl.java dbcbe4e = > server/src/com/cloud/vm/UserVmManagerImpl.java 6179948 = > server/test/org/apache/cloudstack/affinity/AffinityApiTestConfiguration= .java 4dd6ad7 = > server/test/org/apache/cloudstack/networkoffering/ChildTestConfiguratio= n.java 709dfe2 = > server/test/resources/affinityContext.xml 15476c1 = > setup/db/create-schema.sql b1feb02 = > setup/db/db/schema-410to420.sql 99b476d = > = > Diff: https://reviews.apache.org/r/10797/diff/ > = > = > Testing > ------- > = > Unit tests: = > For the new APIs and Service, added unit tests under: plugins/dedicated-r= esources/test/org/apache/cloudstack/dedicated/DedicatedApiUnitTest.java > The tests validates the APIs: dedication of zone, pod, cluster and hosts.= Also added negative tests for the scenarios. > = > Manual Testing Done > = > Tests for DeployVirtualMachine > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > Setup : 2 zones Z1 and Z2 , infrastructure: > Z1->(P1,P2), P1->(C1,C2), C1->(H1,H2), C2->H3, P2->C3, C3->H4 = > Z2-> P3, P3->C4, C4->H5 > = > domain(account) -> sub-domain(account) > D1(A1,U1)->SD1(SA1), D2(A2,U2)->SD2(SA2) > = > Dedication: C1 dedicated to A1, P2 dedicated to D2 > Affinity group of type 'ExplicitDedication' for each account is created. > = > Tested the following scenarios: = > 1. A1 deploys a VM with AG of type 'ExplicitDedication' on Z1, VM deploye= d on H1/H2 = > 2. SA1 deploys a VM with AG of type 'ExplicitDedication' on Z1. VM Deploy= ment failed. H1/H2 cannot be picked, since C1 is dedicated to account A1, n= ot domain. > 3. SA1 deploys a VM with NO Dedication required. VM deployed on H3. = > 4. A1/U1/SA1/A2/U2/SA2 deploys a VM with NO Dedication required on Z1, VM= deployed on H3. > 5. U1 deploys a VM with AG of type 'ExplicitDedication' on Z1, VM deploym= ent failed. > 6. A2 deploys a VM with AG of type 'ExplicitDedication' on Z1, VM deploye= d on H4. > 7. SA2 deploys a VM with AG of type 'ExplicitDedication' on Z1, VM deploy= ed on H4. SA2 belongs to SD2 which is a sub-domain of D2. > 8. Deployment of VM with AG of type 'ExplicitDedication' on zone Z2 will = get failed. since nothing is dedicated in Zone Z2 > = > Tests for Migration of dedicated VMs > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > 1. Migrate a non-dedicated VM on dedicated Host: > - Alert is Raised > 2. Migrate a dedicated VM on non-dedicated host : = > - Alert is Raised > = > = > Test for HostTags and Explicit Dedication > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > 1. Host Tag and AG of type 'ExplicitDedication': both provided > - if Host or its cluster/pod/zone is dedicated (to the caller's acco= unt/domain) and Host is tagged, then deployment is successful else fail the= request. > 2. Host tag is provided and No dedication is required > - Host should be tagged but not dedicated. > = > Test for Deletion of domains and accounts > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > 1. If an account or a domain has dedicated resources and admin deletes th= at account/domain, dedication is automatically removed. > = > = > = > Thanks, > = > deepti dohare > = > --===============7546295433245316377==--