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 B211ED57C for ; Thu, 16 May 2013 13:14:28 +0000 (UTC) Received: (qmail 69752 invoked by uid 500); 16 May 2013 13:14:28 -0000 Delivered-To: apmail-cloudstack-dev-archive@cloudstack.apache.org Received: (qmail 69551 invoked by uid 500); 16 May 2013 13:14:28 -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 69522 invoked by uid 500); 16 May 2013 13:14:27 -0000 Delivered-To: apmail-incubator-cloudstack-dev@incubator.apache.org Received: (qmail 69509 invoked by uid 99); 16 May 2013 13:14:27 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 May 2013 13:14:27 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 62E4D1C2996; Thu, 16 May 2013 13:14:22 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============3351468451672799433==" MIME-Version: 1.0 Subject: Re: Review Request: Implicit dedication of resources to an account From: "Devdeep Singh" To: "Prachi Damle" Cc: "cloudstack" , "Devdeep Singh" Date: Thu, 16 May 2013 13:14:22 -0000 Message-ID: <20130516131422.9256.29978@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org Auto-Submitted: auto-generated Sender: "Devdeep Singh" X-ReviewGroup: cloudstack X-ReviewRequest-URL: https://reviews.apache.org/r/11045/ X-Sender: "Devdeep Singh" References: <20130515140836.22989.51319@reviews.apache.org> In-Reply-To: <20130515140836.22989.51319@reviews.apache.org> Reply-To: "Devdeep Singh" --===============3351468451672799433== 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/11045/ ----------------------------------------------------------- (Updated May 16, 2013, 1:14 p.m.) Review request for cloudstack and Prachi Damle. Changes ------- Added a marvin test for validating implicit planner too. Description ------- Changes for implicitly dedicating a resource. This patch implements the imp= licit dedication portion of the feature described in the following FS https://cwiki.apache.org/confluence/display/CLOUDSTACK/Dedicated+Resources+= -+Private+zone%2C+pod%2C+cluster%2C+host+Functional+Spec Patch includes the following changes: 1. A new implicit planner which extends the functionality provided by First= FitPlanner. 2. Implicit planner can be used in either strict or preferred mode. In stri= ct mode it tries to deploy a vm of a given account on a host on which vms o= f the account are already running. If no such host is found it'll search fo= r an empty host to service the request. Otherwise the deploy vm request fai= ls. 3. In preferred mode, if a host which is running vms of the account or an e= mpty host isn't found, the planner then tries to deploy on any other host p= rovided it isn't running implicitly dedicated strict vms of any other accou= nt. 4. Updated the createServiceOffering api to configure the details for the p= lanner that the service offering is using. 5. Made db changes to store the service offering details for the planner. 6. Unit tests for testing the implicit planner functionality. This addresses bug https://issues.apache.org/jira/browse/CLOUDSTACK-681. Diffs (updated) ----- api/src/com/cloud/deploy/DeploymentPlanner.java eb56a59 = api/src/org/apache/cloudstack/api/ApiConstants.java f179aaa = api/src/org/apache/cloudstack/api/command/admin/offering/CreateServiceOff= eringCmd.java c155b70 = client/pom.xml 197ba27 = client/tomcatconf/applicationContext.xml.in d5c61bb = client/tomcatconf/componentContext.xml.in 8a45e5f = engine/schema/src/com/cloud/service/ServiceOfferingDetailsVO.java PRE-CRE= ATION = engine/schema/src/com/cloud/service/ServiceOfferingVO.java fd31d30 = engine/schema/src/com/cloud/service/dao/ServiceOfferingDao.java 589de7c = engine/schema/src/com/cloud/service/dao/ServiceOfferingDaoImpl.java 06210= 3e = engine/schema/src/com/cloud/service/dao/ServiceOfferingDetailsDao.java PR= E-CREATION = engine/schema/src/com/cloud/service/dao/ServiceOfferingDetailsDaoImpl.jav= a PRE-CREATION = plugins/deployment-planners/implicit-dedication/pom.xml PRE-CREATION = plugins/deployment-planners/implicit-dedication/src/com/cloud/deploy/Impl= icitDedicationPlanner.java PRE-CREATION = plugins/deployment-planners/implicit-dedication/test/org/apache/cloudstac= k/implicitplanner/ImplicitPlannerTest.java PRE-CREATION = plugins/pom.xml e49fac9 = server/src/com/cloud/configuration/ConfigurationManager.java 2ce3fa0 = server/src/com/cloud/configuration/ConfigurationManagerImpl.java d17b4d1 = server/test/com/cloud/vpc/MockConfigurationManagerImpl.java f02895c = server/test/org/apache/cloudstack/networkoffering/ChildTestConfiguration.= java 7ffbe32 = setup/db/db/schema-410to420.sql 86124ea = test/integration/component/test_implicit_planner.py PRE-CREATION = tools/marvin/marvin/integration/lib/base.py ecdc841 = Diff: https://reviews.apache.org/r/11045/diff/ Testing ------- Following tests were done: 1. Deployed an instance for an account created using a service offering usi= ng implicit planner. Verified the host on which the first vm was deployed g= ets picked up for subsequent deployment requests for that account (using se= rvice offering with implicit planner). 2. If a deploy vm request is placed from another account, the host running = implicit vm of a different account isn't picked up. 3. Verified for a deployment request with implicit planner in strict mode, = first the planner looks for hosts running implicit vm of the account. If no= ne are available then empty hosts are tried. Otherwise deploy vm fails. 4. Verified for a deployment request with implicit planner in preferred mod= e, first the planner looks for hosts running implicit vm of the account. If= none are available then empty hosts are tried. Then in tries on all hosts = besides the one running implicit strict vms of other account. 5. Unit tests to validate different scenarios. 6. Made sure there are no rat failures and patch applies cleanly. Thanks, Devdeep Singh --===============3351468451672799433==--