Return-Path: X-Original-To: apmail-cloudstack-commits-archive@www.apache.org Delivered-To: apmail-cloudstack-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9635F9696 for ; Tue, 14 May 2013 21:57:43 +0000 (UTC) Received: (qmail 54088 invoked by uid 500); 14 May 2013 21:57:43 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 54050 invoked by uid 500); 14 May 2013 21:57:43 -0000 Mailing-List: contact commits-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 commits@cloudstack.apache.org Received: (qmail 53910 invoked by uid 99); 14 May 2013 21:57:43 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 May 2013 21:57:43 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id C8F4E8FF2; Tue, 14 May 2013 21:57:42 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: mchen@apache.org To: commits@cloudstack.apache.org Date: Tue, 14 May 2013 21:57:45 -0000 Message-Id: <8fbf138b282344b983612b2724e948ea@git.apache.org> In-Reply-To: <94ab8e85ba124bcfad11186be990e5ee@git.apache.org> References: <94ab8e85ba124bcfad11186be990e5ee@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [4/4] git commit: updated refs/heads/object_store to 252f384 Fix the hanging issue in deleting ISO referenced by some user vms. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/95e7e270 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/95e7e270 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/95e7e270 Branch: refs/heads/object_store Commit: 95e7e270d4b375e4d42e13e951a983c7d22aa3a3 Parents: 03c2550 Author: Min Chen Authored: Tue May 14 14:48:34 2013 -0700 Committer: Min Chen Committed: Tue May 14 14:57:02 2013 -0700 ---------------------------------------------------------------------- .../driver/CloudStackImageStoreDriverImpl.java | 6 ++++++ .../datastore/driver/S3ImageStoreDriverImpl.java | 6 ++++++ .../driver/SwiftImageStoreDriverImpl.java | 6 ++++++ 3 files changed, 18 insertions(+), 0 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/95e7e270/plugins/storage/image/default/src/org/apache/cloudstack/storage/datastore/driver/CloudStackImageStoreDriverImpl.java ---------------------------------------------------------------------- diff --git a/plugins/storage/image/default/src/org/apache/cloudstack/storage/datastore/driver/CloudStackImageStoreDriverImpl.java b/plugins/storage/image/default/src/org/apache/cloudstack/storage/datastore/driver/CloudStackImageStoreDriverImpl.java index 177d8d8..31fab32 100644 --- a/plugins/storage/image/default/src/org/apache/cloudstack/storage/datastore/driver/CloudStackImageStoreDriverImpl.java +++ b/plugins/storage/image/default/src/org/apache/cloudstack/storage/datastore/driver/CloudStackImageStoreDriverImpl.java @@ -309,6 +309,12 @@ public class CloudStackImageStoreDriverImpl implements ImageStoreDriver { } } } + } else{ + // cannot delete iso due to some VMs are using this + s_logger.debug("Cannot delete iso since some user vms are referencing it"); + CommandResult result = new CommandResult(); + result.setResult("Cannot delete iso since some user vms are referencing it"); + callback.complete(result); } } http://git-wip-us.apache.org/repos/asf/cloudstack/blob/95e7e270/plugins/storage/image/s3/src/org/apache/cloudstack/storage/datastore/driver/S3ImageStoreDriverImpl.java ---------------------------------------------------------------------- diff --git a/plugins/storage/image/s3/src/org/apache/cloudstack/storage/datastore/driver/S3ImageStoreDriverImpl.java b/plugins/storage/image/s3/src/org/apache/cloudstack/storage/datastore/driver/S3ImageStoreDriverImpl.java index 29cafdb..cbf55b6 100644 --- a/plugins/storage/image/s3/src/org/apache/cloudstack/storage/datastore/driver/S3ImageStoreDriverImpl.java +++ b/plugins/storage/image/s3/src/org/apache/cloudstack/storage/datastore/driver/S3ImageStoreDriverImpl.java @@ -323,6 +323,12 @@ public class S3ImageStoreDriverImpl implements ImageStoreDriver { } } } + } else{ + // cannot delete iso due to some VMs are using this + s_logger.debug("Cannot delete iso since some user vms are referencing it"); + CommandResult result = new CommandResult(); + result.setResult("Cannot delete iso since some user vms are referencing it"); + callback.complete(result); } } http://git-wip-us.apache.org/repos/asf/cloudstack/blob/95e7e270/plugins/storage/image/swift/src/org/apache/cloudstack/storage/datastore/driver/SwiftImageStoreDriverImpl.java ---------------------------------------------------------------------- diff --git a/plugins/storage/image/swift/src/org/apache/cloudstack/storage/datastore/driver/SwiftImageStoreDriverImpl.java b/plugins/storage/image/swift/src/org/apache/cloudstack/storage/datastore/driver/SwiftImageStoreDriverImpl.java index db3b225..003152a 100644 --- a/plugins/storage/image/swift/src/org/apache/cloudstack/storage/datastore/driver/SwiftImageStoreDriverImpl.java +++ b/plugins/storage/image/swift/src/org/apache/cloudstack/storage/datastore/driver/SwiftImageStoreDriverImpl.java @@ -315,6 +315,12 @@ public class SwiftImageStoreDriverImpl implements ImageStoreDriver { } } } + } else{ + // cannot delete iso due to some VMs are using this + s_logger.debug("Cannot delete iso since some user vms are referencing it"); + CommandResult result = new CommandResult(); + result.setResult("Cannot delete iso since some user vms are referencing it"); + callback.complete(result); } }