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 94AA99E8E for ; Tue, 10 Jul 2012 14:23:01 +0000 (UTC) Received: (qmail 74906 invoked by uid 500); 10 Jul 2012 14:23:01 -0000 Delivered-To: apmail-incubator-cloudstack-dev-archive@incubator.apache.org Received: (qmail 74796 invoked by uid 500); 10 Jul 2012 14:23:01 -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 74767 invoked by uid 99); 10 Jul 2012 14:23:00 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Jul 2012 14:23:00 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 382071C0C1E; Tue, 10 Jul 2012 14:23:00 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============2295589556342095168==" MIME-Version: 1.0 Subject: Re: Review Request: CS-15430 Create snapshot should fail if creating snapshot results in exceeding snapshot resource limit for domain-admin or user accounts. From: "Nitin Mehta" To: "cloudstack" , "deepti dohare" , "Nitin Mehta" Date: Tue, 10 Jul 2012 14:23:00 -0000 Message-ID: <20120710142300.22238.89930@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org Auto-Submitted: auto-generated Sender: "Nitin Mehta" X-ReviewGroup: cloudstack X-ReviewRequest-URL: https://reviews.apache.org/r/5806/ X-Sender: "Nitin Mehta" References: <20120710133232.729.59938@reviews.apache.org> In-Reply-To: <20120710133232.729.59938@reviews.apache.org> Reply-To: "Nitin Mehta" --===============2295589556342095168== 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/5806/#review9018 ----------------------------------------------------------- server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java Why this new if (!backedUp) block when you already have this block abov= e ? Please put the decrementing logic in above block server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java Did you inquire how we solve this problem in other places in CS ? I ca= nt approve this change since we dont want to reinvent the wheel if this has= already been solved. If it hasn't been solved then I would want to raise t= his in the mailing list and hear out a good way of doing this. - Nitin Mehta On July 10, 2012, 1:32 p.m., deepti dohare wrote: > = > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/5806/ > ----------------------------------------------------------- > = > (Updated July 10, 2012, 1:32 p.m.) > = > = > Review request for cloudstack. > = > = > Description > ------- > = > Change: > 1. Before creating the snapshot, we synchronized checkResourcelimit to al= low the users to create the snapshot and increment the resource count. > 2. Depending on the failure of snapshot creation/ backup, we are decremen= ting the resource count. > = > = > This addresses bug CS-15430. > = > = > Diffs > ----- > = > server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java 50dcf38 = > = > Diff: https://reviews.apache.org/r/5806/diff/ > = > = > Testing > ------- > = > Steps to verify: > 1.Login as admin, set snapshot limit '3' for a user account > 2.login as user, create a VM1 with data volume > 3.trigger 3 create snapshot command from the above data volume, succeeded > 4.create one more snapshot, failed, "maximum limit exceeded for account u= ser" > = > = > Thanks, > = > deepti dohare > = > --===============2295589556342095168==--