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 BF90AEA6F for ; Thu, 7 Mar 2013 19:34:39 +0000 (UTC) Received: (qmail 30390 invoked by uid 500); 7 Mar 2013 19:34:39 -0000 Delivered-To: apmail-incubator-cloudstack-dev-archive@incubator.apache.org Received: (qmail 30355 invoked by uid 500); 7 Mar 2013 19:34:39 -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 30346 invoked by uid 99); 7 Mar 2013 19:34:39 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Mar 2013 19:34:39 +0000 X-ASF-Spam-Status: No, hits=-1.6 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [74.125.149.67] (HELO na3sys009aog101.obsmtp.com) (74.125.149.67) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Mar 2013 19:34:29 +0000 Received: from mail-qe0-f69.google.com ([209.85.128.69]) (using TLSv1) by na3sys009aob101.postini.com ([74.125.148.12]) with SMTP ID DSNKUTjrsI8x6+puHPO/hXRyX/xyMCMkvNM9@postini.com; Thu, 07 Mar 2013 11:34:09 PST Received: by mail-qe0-f69.google.com with SMTP id b4so1481919qen.8 for ; Thu, 07 Mar 2013 11:34:07 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-received:date:from:to:cc:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :user-agent:x-gm-message-state; bh=2AF6xCOkJcJKpGbsGuIJZnNFr6etIDSxNufS1i2dwVo=; b=YLMj81L8gtnqxRBUx/g3fPPWGUA0xV/G5nnzlW/9RFRXjT2ROhje5659uDIJBUMwxt JzwwDMhvD7Uv7Cz4jf9W4ECnoOawm/mLdl2Ar+IwDID1vdqV0zlEBfwcutWa8C4yOCiB 8h26q/Wd2wmObDUc4wtl9xc61ERqRSwv14SrwqToQNSe2qPpzlQiIy75aZcOuji9CbcS LRvQJ0241QNIHg4WC4hV50vqjgIvrMfb6LZZrfQj/+AIFMB2v1YFnkLbfWlbmsOMDeoi ExTqMt2Rc3sezPypFYtarUAceedf3Ht8Rcjt5/dNnP1dJN01VqqedImv7V/u0mApmqYS cUJg== X-Received: by 10.49.121.196 with SMTP id lm4mr56322588qeb.18.1362684847567; Thu, 07 Mar 2013 11:34:07 -0800 (PST) X-Received: by 10.49.121.196 with SMTP id lm4mr56322580qeb.18.1362684847440; Thu, 07 Mar 2013 11:34:07 -0800 (PST) Received: from USLT-205755.sungardas.corp ([216.203.6.11]) by mx.google.com with ESMTPS id hr3sm4342870qab.4.2013.03.07.11.34.05 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 07 Mar 2013 11:34:06 -0800 (PST) Received: by USLT-205755.sungardas.corp (Postfix, from userid 76098887) id 02D0C10C238B0; Thu, 7 Mar 2013 14:34:02 -0500 (EST) Date: Thu, 7 Mar 2013 14:34:02 -0500 From: Chip Childers To: alena1108@apache.org Cc: cloudstack-dev@incubator.apache.org Subject: Re: git commit: refs/heads/4.1 - CLOUDSTACK-1451 Pass randomly generated UUID instead of empty string when create internal account as a part of project creation. Otherwise entityexistsexception would happen when attempt to create more than 1 project in the s Message-ID: <20130307193402.GO88519@USLT-205755.sungardas.corp> References: <20130307192953.23F8A831719@tyr.zones.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130307192953.23F8A831719@tyr.zones.apache.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Gm-Message-State: ALoCoQndNru24K5PjaFKzRlUsYYbnL6TZD+cBZDp4bbPeVNCGRZG89W0w0VJ2dmEK3ToSOhlXG1jyAQEDd/GPn+yabeDoNFkNjExpkVmcBz2gF9A8rpPUj7p1s4b6pDM+Jc6Fc0z4hTqauA/MUCNp7jP8rb+TmzeQVgsYJ2aVMPHplnvPbVg0ziv0dIY6t8GOpOZetw/NY2g X-Virus-Checked: Checked by ClamAV on apache.org Hi Alena! Thanks for the fix, but can you please follow the workflow for 4.1 agreed to here: http://markmail.org/message/uuffaapkhcothzcj Thanks! On Thu, Mar 07, 2013 at 07:29:53PM +0000, alena1108@apache.org wrote: > Updated Branches: > refs/heads/4.1 e942df93e -> 45c51d1fd > > > CLOUDSTACK-1451 Pass randomly generated UUID instead of empty string when create internal account as a part of project creation. Otherwise entityexistsexception would happen when attempt to create more than 1 project in the system > > > Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo > Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/45c51d1f > Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/45c51d1f > Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/45c51d1f > > Branch: refs/heads/4.1 > Commit: 45c51d1fdd2b726245075f75fd8bf6ebce506787 > Parents: e942df9 > Author: Alena Prokharchyk > Authored: Thu Mar 7 11:21:59 2013 -0800 > Committer: Alena Prokharchyk > Committed: Thu Mar 7 11:23:40 2013 -0800 > > ---------------------------------------------------------------------- > .../src/com/cloud/projects/ProjectManagerImpl.java | 3 ++- > 1 files changed, 2 insertions(+), 1 deletions(-) > ---------------------------------------------------------------------- > > > http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/45c51d1f/server/src/com/cloud/projects/ProjectManagerImpl.java > ---------------------------------------------------------------------- > diff --git a/server/src/com/cloud/projects/ProjectManagerImpl.java b/server/src/com/cloud/projects/ProjectManagerImpl.java > index 45a9a24..33feb5d 100755 > --- a/server/src/com/cloud/projects/ProjectManagerImpl.java > +++ b/server/src/com/cloud/projects/ProjectManagerImpl.java > @@ -23,6 +23,7 @@ import java.util.Map; > import java.util.Properties; > import java.util.Random; > import java.util.TimeZone; > +import java.util.UUID; > import java.util.concurrent.Executors; > import java.util.concurrent.ScheduledExecutorService; > import java.util.concurrent.TimeUnit; > @@ -204,7 +205,7 @@ public class ProjectManagerImpl extends ManagerBase implements ProjectManager { > StringBuilder acctNm = new StringBuilder("PrjAcct-"); > acctNm.append(name).append("-").append(owner.getDomainId()); > > - Account projectAccount = _accountMgr.createAccount(acctNm.toString(), Account.ACCOUNT_TYPE_PROJECT, domainId, null, null, "", 0); > + Account projectAccount = _accountMgr.createAccount(acctNm.toString(), Account.ACCOUNT_TYPE_PROJECT, domainId, null, null, UUID.randomUUID().toString(), 0); > > Project project = _projectDao.persist(new ProjectVO(name, displayText, owner.getDomainId(), projectAccount.getId())); > > >