Return-Path: X-Original-To: apmail-incubator-cloudstack-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-cloudstack-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AF7B0E655 for ; Thu, 31 Jan 2013 21:16:11 +0000 (UTC) Received: (qmail 32024 invoked by uid 500); 31 Jan 2013 21:16:11 -0000 Delivered-To: apmail-incubator-cloudstack-dev-archive@incubator.apache.org Received: (qmail 31979 invoked by uid 500); 31 Jan 2013 21:16:11 -0000 Mailing-List: contact cloudstack-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cloudstack-dev@incubator.apache.org Delivered-To: mailing list cloudstack-dev@incubator.apache.org Received: (qmail 31966 invoked by uid 99); 31 Jan 2013 21:16:11 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 Jan 2013 21:16:11 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 27E581C6816; Thu, 31 Jan 2013 21:16:04 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============0445459780784576761==" MIME-Version: 1.0 Subject: Re: Review Request: Dedicated Resources: Implicit Dedication of an instance to a dedicated host From: "deepti dohare" To: "cloudstack" , "deepti dohare" Date: Thu, 31 Jan 2013 21:16:04 -0000 Message-ID: <20130131211604.24967.8928@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org Auto-Submitted: auto-generated Sender: "deepti dohare" X-ReviewGroup: cloudstack X-ReviewRequest-URL: https://reviews.apache.org/r/9182/ X-Sender: "deepti dohare" References: <20130131172217.24967.74749@reviews.apache.org> In-Reply-To: <20130131172217.24967.74749@reviews.apache.org> Reply-To: "deepti dohare" --===============0445459780784576761== 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/9182/ ----------------------------------------------------------- (Updated Jan. 31, 2013, 9:15 p.m.) Review request for cloudstack. Changes ------- Removed trailing whitespaces. Description ------- Review Request for Implicit 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 This feature is a part of Dedicated Resources: private pod, cluster or host. This feature allows to add a service offering that will indicate that the V= M needs to be on a host exclusive to an account. = 1. A new check parameter called 'isDedicated' is added to the service offer= ings. = 2. A dedicated Instance can be deployed with the Service Offering having 'i= sDedicated' flag true. 3. Dedicated instance will be placed in the host having dedicated VMs of th= e same account. 4. If space is not available in the dedicated host, dedicated VM will be pl= ace in the new empty host. = 5. A non-dedicated instance will be placed in any host but not in the dedic= ated host. = 6. If dedicated host gets empty, it will become available for all the accou= nts. This addresses bug CLOUDSTACK-718. Diffs (updated) ----- api/src/com/cloud/offering/ServiceOffering.java b13346c = api/src/org/apache/cloudstack/api/ApiConstants.java 58a7831 = api/src/org/apache/cloudstack/api/command/admin/offering/CreateServiceOff= eringCmd.java 54151fe = api/src/org/apache/cloudstack/api/response/ServiceOfferingResponse.java 7= a10f7f = plugins/host-allocators/random/src/com/cloud/agent/manager/allocator/impl= /RandomAllocator.java 0887ee9 = plugins/network-elements/elastic-loadbalancer/src/com/cloud/network/lb/El= asticLoadBalancerManagerImpl.java 82c6120 = server/src/com/cloud/agent/manager/allocator/impl/FirstFitAllocator.java = 2a5258c = server/src/com/cloud/api/query/dao/ServiceOfferingJoinDaoImpl.java 8827c4= 8 = server/src/com/cloud/api/query/vo/ServiceOfferingJoinVO.java fe4a165 = server/src/com/cloud/configuration/ConfigurationManager.java 19e74bf = server/src/com/cloud/configuration/ConfigurationManagerImpl.java df6642a = server/src/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java 6b2d8ad = server/src/com/cloud/deploy/FirstFitPlanner.java 06e46fb = server/src/com/cloud/migration/ServiceOffering21VO.java fdec30e = server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.ja= va e1c78e1 = server/src/com/cloud/server/ConfigurationServerImpl.java b0abd04 = server/src/com/cloud/service/ServiceOfferingVO.java c199a86 = server/src/com/cloud/service/dao/ServiceOfferingDao.java 589de7c = server/src/com/cloud/service/dao/ServiceOfferingDaoImpl.java 71ad51f = server/src/com/cloud/storage/secondary/SecondaryStorageManagerImpl.java e= 420881 = server/src/com/cloud/test/DatabaseConfig.java 5668a33 = server/src/com/cloud/vm/UserVmManagerImpl.java ecf1242 = server/src/com/cloud/vm/dao/VMInstanceDao.java 8b0a523 = server/src/com/cloud/vm/dao/VMInstanceDaoImpl.java 85ad5d0 = server/test/com/cloud/vpc/MockConfigurationManagerImpl.java 3989ecf = setup/db/create-schema-view.sql f68a6ca = setup/db/create-schema.sql ead98a5 = setup/db/db/schema-40to410.sql ed4946e = Diff: https://reviews.apache.org/r/9182/diff/ Testing ------- 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 : Host1 and Host2 , Host 1 has system vms , Host 2 is empty. = Service Offering: SWD (Service offering with Dedication enabled), S= ND (Service offering without Dedication enabled) 1. Root admin deploys a non-dedicated VM with Service Offering(SND), it wen= t to Host 2. 2. Account a1 deploys a dedicated VM with service offering(SWD). VM deploy= ed in Host 1. = Note: Host having only systemVms is considered as empty host 3. Now any non-dedicated VM (SND) placed in Host 2 - vm created from Root account went to Host 2 - Tested - vm created from a1 account went to Host 2 - Tested - vm created from u1 account went to Host 2 - Tested - vm created from different domains account : Host2 - Tested 4. Deploying dedicated VMs with(SWD) of different Account failed, Since no = free host available. 5. Any dedicated VM (SWD) of same Account a1 is placed on Host 1. 6. If dedicated VMs in Host1 are deleted, the host becomes available for al= l accounts i.e Account u1's VM used this Host1 . 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: - if destination host has dedicated vms, request failed. - if destination host has no dedicated vms, migration to the destinati= on host successful. 2. Migrate a dedicated VM: = - if destination host has dedicated vms for the same account, migratio= n to the destination host successful. - if destination host has no dedicated vms, request failed. Test for HostTags and isdedicated flag =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 is provided and isDedicated flag is true - if Host has dedicated vms, vm is placed in that host - if Host has no dedicated vms, request failed. 2. Host tag is provided and isDedicated flag is false - if Host has dedicated vms, request failed. - if Host has no dedicated vms, vm is placed in that host (as cloudsta= ck is doing now) Thanks, deepti dohare --===============0445459780784576761==--