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 0CD77DD16 for ; Fri, 15 Feb 2013 08:10:11 +0000 (UTC) Received: (qmail 23954 invoked by uid 500); 15 Feb 2013 08:10:10 -0000 Delivered-To: apmail-incubator-cloudstack-dev-archive@incubator.apache.org Received: (qmail 23813 invoked by uid 500); 15 Feb 2013 08:10:10 -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 23784 invoked by uid 99); 15 Feb 2013 08:10:09 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Feb 2013 08:10:09 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 39B2D1C756A; Fri, 15 Feb 2013 08:10:00 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============3921725176503991876==" MIME-Version: 1.0 Subject: Re: Review Request: CLOUDSTACK-357 ISOs can be deleted while still attached to a running VM, and they subsequently cannot be detached from a running VM From: "Nitin Mehta" To: "cloudstack" , "deepti dohare" , "Nitin Mehta" Date: Fri, 15 Feb 2013 08:10:00 -0000 Message-ID: <20130215081000.9635.14326@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/7660/ X-Sender: "Nitin Mehta" References: <20130215050221.21521.7041@reviews.apache.org> In-Reply-To: <20130215050221.21521.7041@reviews.apache.org> Reply-To: "Nitin Mehta" --===============3921725176503991876== 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/7660/#review16634 ----------------------------------------------------------- This gives the ability to the user to affect other user vms as well, which = is not desirable. I would suggest you to do the following. When you delete iso, mark it removed in DB so that its not available for fu= rther use. In the storage cleanup thread check whether the iso is detached for the vms= and if it is then delete it from the sec. storage. - Nitin Mehta On Feb. 15, 2013, 5:02 a.m., deepti dohare wrote: > = > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/7660/ > ----------------------------------------------------------- > = > (Updated Feb. 15, 2013, 5:02 a.m.) > = > = > Review request for cloudstack. > = > = > Description > ------- > = > Currently no warning or confirmation is given or required to delete an is= o which is attached to a virtual machine. > = > Fixing this issue using =E2=80=9Cforce=E2=80=9D delete option. > If an admin or a user deletes an ISO which is attached to a vm: > 1. Without force option; gives a warning that ISO is attached to vm =E2= =80=9CFailed to delete iso. It is currently attached to virtual machine. Pl= ease detach it before deleting=E2=80=9D. > 2. With force option: first detach the ISO from all vms and then deletes = the ISO. = > = > = > This addresses bug CLOUDSTACK-357. > = > = > Diffs > ----- > = > api/src/org/apache/cloudstack/api/command/user/iso/DeleteIsoCmd.java c8= 21775 = > server/src/com/cloud/template/TemplateManagerImpl.java f9cf277 = > server/src/com/cloud/vm/dao/UserVmDao.java 9fbcde3 = > server/src/com/cloud/vm/dao/UserVmDaoImpl.java f2fc10b = > ui/scripts/templates.js 040ce4a = > = > Diff: https://reviews.apache.org/r/7660/diff/ > = > = > Testing > ------- > = > Verified locally. Tested for some cases: > = > 1. Deleting iso(not attached to any vm) > 2. Deleting iso(attached to multiple vms in same domain) > 3. Deleting iso(attached to multiple vms in different domains) > = > For admin/user > = > = > Thanks, > = > deepti dohare > = > --===============3921725176503991876==--