Return-Path: X-Original-To: apmail-cloudstack-dev-archive@www.apache.org Delivered-To: apmail-cloudstack-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D5F0A10D42 for ; Tue, 6 Aug 2013 17:37:42 +0000 (UTC) Received: (qmail 31920 invoked by uid 500); 6 Aug 2013 17:37:42 -0000 Delivered-To: apmail-cloudstack-dev-archive@cloudstack.apache.org Received: (qmail 31716 invoked by uid 500); 6 Aug 2013 17:37:42 -0000 Mailing-List: contact dev-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 dev@cloudstack.apache.org Received: (qmail 31707 invoked by uid 500); 6 Aug 2013 17:37:41 -0000 Delivered-To: apmail-incubator-cloudstack-dev@incubator.apache.org Received: (qmail 31691 invoked by uid 99); 6 Aug 2013 17:37:40 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Aug 2013 17:37:40 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 8D71F1D24C7; Tue, 6 Aug 2013 17:37:30 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============3439420871501778205==" MIME-Version: 1.0 Subject: Re: Review Request 13237: Unable to resize disk with Zone wide storage From: "edison su" To: "Ram Ganesh" , "edison su" , "Devdeep Singh" Cc: "Rajesh Battala" , "cloudstack" Date: Tue, 06 Aug 2013 17:37:27 -0000 Message-ID: <20130806173727.5385.11186@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org Auto-Submitted: auto-generated Sender: "edison su" X-ReviewGroup: cloudstack X-ReviewRequest-URL: https://reviews.apache.org/r/13237/ X-Sender: "edison su" References: <20130805181726.5384.31813@reviews.apache.org> In-Reply-To: <20130805181726.5384.31813@reviews.apache.org> Reply-To: "edison su" --===============3439420871501778205== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit > On Aug. 5, 2013, 6:17 p.m., edison su wrote: > > engine/schema/src/com/cloud/storage/dao/VolumeDaoImpl.java, line 77 > > > > > > why not just use "select s.scope from storage_pool s, volumes v where s.id = v.pool_id"? > > Rajesh Battala wrote: > if we use the above query then we get list of scope values. > mysql> select s.scope from storage_pool s, volumes v where s.id = v.pool_id; > +---------+ > | scope | > +---------+ > | CLUSTER | > | CLUSTER | > | CLUSTER | > | CLUSTER | > | ZONE | > +---------+ > 5 rows in set (0.00 sec) > > So I had written the above query like SELECT_POOLSCOPE = "SELECT s.scope from storage_pool s, volumes v where s.id =(select pool_id from volumes where id =?)"; > to fetch the scope of the storage pool where the volume is existing. If this is the case, you can use "select s.scope from storage_pool s, volumes v where s.id = v.pool_id and v.id = your-volume-id"? - edison ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/13237/#review24653 ----------------------------------------------------------- On Aug. 2, 2013, 10:07 a.m., Rajesh Battala wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/13237/ > ----------------------------------------------------------- > > (Updated Aug. 2, 2013, 10:07 a.m.) > > > Review request for cloudstack, Devdeep Singh, edison su, and Ram Ganesh. > > > Bugs: 3781 > > > Repository: cloudstack-git > > > Description > ------- > > Issue: > ====== > for Volume operations we are finding the hypervisor type. Volume can be in ZONE/Cluster scope storage pool. > when volume is in ZONE scope, there is issue with they way we fetch the hypervisor type. It was written to handle Cluster scope only. > > fixed: > ====== > Fixed with sql queries to fetch the Hypervisor type. > 1. Fetch the hypervisor type for volume from storage pool table if the voluem is in ZONE scope storage pool. > 2. Fetch the hypervisor type for volume from cluster table if the voluem is in CLUSTER scope storage pool. > > > Diffs > ----- > > engine/schema/src/com/cloud/storage/dao/VolumeDao.java 7b58e7d > engine/schema/src/com/cloud/storage/dao/VolumeDaoImpl.java e6595b2 > > Diff: https://reviews.apache.org/r/13237/diff/ > > > Testing > ------- > > Setup: > KVM and Xenserver with Adv Zone. > Added pool Zone scope on KVM and Cluster Scope on Xenserver > 1. created instances on KVM and xenserver. > 2. Create two volumes attached to instances on KVM and Xenserver. > 3. vol1 is in Zone scope and vol2 is in cluster scope. > 4. Successfully performed resize opertions on vol1 and vol2. > 5. Succssfully attached/detaches volumes > > > Thanks, > > Rajesh Battala > > --===============3439420871501778205==--