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 2D8E610CDC for ; Fri, 13 Sep 2013 23:56:13 +0000 (UTC) Received: (qmail 92290 invoked by uid 500); 13 Sep 2013 23:56:13 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 92238 invoked by uid 500); 13 Sep 2013 23:56:13 -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 92155 invoked by uid 99); 13 Sep 2013 23:56:12 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Sep 2013 23:56:12 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id ACC8890421C; Fri, 13 Sep 2013 23:56:12 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: prachidamle@apache.org To: commits@cloudstack.apache.org Date: Fri, 13 Sep 2013 23:56:14 -0000 Message-Id: <9872680a8dce49d38101e09d3840bc0a@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [3/3] git commit: updated refs/heads/4.2-forward to 8dfd34c CLOUDSTACK-4651: Restarting management server when volume Snapshot is still in progress for root volume of a VM , then there is no way to restart VM since the startVM job is stuck forever since the volume is in "Snapshoting" state. Change: -If no volume of the VM is usable, VM cannot be deployed or started. Atleast ROOT volume should always be in usable state to start up the VM Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/8dfd34cd Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/8dfd34cd Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/8dfd34cd Branch: refs/heads/4.2-forward Commit: 8dfd34cd7e0b39bb002ba192026a2dfbb231de61 Parents: f3be68a Author: Prachi Damle Authored: Fri Sep 13 14:56:43 2013 -0700 Committer: Prachi Damle Committed: Fri Sep 13 16:55:44 2013 -0700 ---------------------------------------------------------------------- server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java | 5 +++++ 1 file changed, 5 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8dfd34cd/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java ---------------------------------------------------------------------- diff --git a/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java b/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java index 2ca58c6..6d36a07 100644 --- a/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java +++ b/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java @@ -1054,6 +1054,11 @@ public class DeploymentPlanningManagerImpl extends ManagerBase implements Deploy Map> suitableVolumeStoragePools = new HashMap>(); List readyAndReusedVolumes = new ArrayList(); + // There should be atleast the ROOT volume of the VM in usable state + if (volumesTobeCreated.isEmpty()) { + throw new CloudRuntimeException("Unable to create deployment, no usable volumes found for the VM"); + } + // for each volume find list of suitable storage pools by calling the // allocators for (VolumeVO toBeCreated : volumesTobeCreated) {