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 079A310C17 for ; Fri, 27 Sep 2013 01:33:00 +0000 (UTC) Received: (qmail 16647 invoked by uid 500); 27 Sep 2013 01:32:59 -0000 Delivered-To: apmail-cloudstack-dev-archive@cloudstack.apache.org Received: (qmail 16605 invoked by uid 500); 27 Sep 2013 01:32:59 -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 16595 invoked by uid 99); 27 Sep 2013 01:32:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Sep 2013 01:32:59 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of mike.tutkowski@solidfire.com designates 209.85.128.176 as permitted sender) Received: from [209.85.128.176] (HELO mail-ve0-f176.google.com) (209.85.128.176) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Sep 2013 01:32:55 +0000 Received: by mail-ve0-f176.google.com with SMTP id jx11so1521043veb.21 for ; Thu, 26 Sep 2013 18:32:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=dzdqgSB+BXiCSa3DaJDJMHa/fNkuI3re/MDPjv5WC6o=; b=LVwV6Di/1rkx7X7jUGHL96q6a0QjJYrgXmVrrQcfuCrSbBvvB7ZovEdTX5WpKrDLPY DBkcPGG4U/PzfW4SxASUtXhLhWMvo4f7GEbDRm3HvH1lcjBkMuTtQaZH4GOO22MPRM0P NeVpx3rHYBNk9W+0dEah8THiuND3dsSa3kF5zV2ckFiu+Gv/ApDfJBa7jRXIx3g0g6pE qrW/yFzeOp1NzINKu31oD0e9Vyg8gaOsw9f28SOzmNmXaNFAOoMbYmK35fAxejxrtZ8K QOx/mF6BD4277XfRIc9ptDxyMd6gJyOHGrMEiqfz6R9TFlYaPL797xv3r6A3/B1B/peK 9KVQ== X-Gm-Message-State: ALoCoQl4keMgnpqusCuyZbZg30/ZHppUfKFK8rcL1tivAe+gdu06PtQlUHGG/m71KDieYvhOQhvf MIME-Version: 1.0 X-Received: by 10.58.77.65 with SMTP id q1mr3589136vew.8.1380245554520; Thu, 26 Sep 2013 18:32:34 -0700 (PDT) Received: by 10.58.248.200 with HTTP; Thu, 26 Sep 2013 18:32:34 -0700 (PDT) In-Reply-To: References: Date: Thu, 26 Sep 2013 19:32:34 -0600 Message-ID: Subject: Re: add connect method on KVM storage code From: Mike Tutkowski To: "dev@cloudstack.apache.org" Content-Type: multipart/alternative; boundary=e89a8f6474edfaf82404e7537532 X-Virus-Checked: Checked by ClamAV on apache.org --e89a8f6474edfaf82404e7537532 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable I mention this is my comments on GitHub, as well, but CHAP info is associated with an account - not a storage pool. Ideally we could do without CHAP info entirely if we had a reliable way to tell the storage plug-in that a given host wants to access a given volume. In this case, my storage plug-in could create what we call a Volume Access Group on the SAN. It would essentially say, "The host with IQN can access the volume with IQN without using CHAP credentials." Of course we'd need a way to revoke this privilege in the event of a live migration of a VM. Right now, I do not believe such a facility is supported with the storage plug-ins. On Thu, Sep 26, 2013 at 4:56 PM, Marcus Sorensen wrote= : > Looking at your code, is the chap info stored with the pool, so we > could pass the pool to the adaptor? That would be more agnostic, > anyone implementing a plugin could pull the specifics they need for > their stuff out of the pool on the adaptor side, rather than creating > custom signatures. > > Also, I think we may want to consider implementing connect/disconnect > as just dummy methods in LibvirtStorageAdaptor, so we don't have to be > picky about which adaptors/types in every single place we may want to > connect/disconnect (in 4.1 there were several, I'm not sure if > everything goes through this in 4.2). We can just call > adaptor.connectPhysicalDisk and the adaptor can decide if it needs to > do anything. > > Comments are attached to your commit, I just wanted to echo them here > on-list. > > On Thu, Sep 26, 2013 at 4:32 PM, Mike Tutkowski > wrote: > > Oh, SnapshotTestWithFakeData is just modified because the code wasn't > > building until I corrected this. It has nothing really to do with my re= al > > changes. > > > > > > On Thu, Sep 26, 2013 at 4:31 PM, Mike Tutkowski < > > mike.tutkowski@solidfire.com> wrote: > > > >> Hey Marcus, > >> > >> I implemented your recommendations regarding adding connect and > disconnect > >> methods. It is not yet checked in (as you know, having trouble with my > KVM > >> environment), but it is on GitHub here: > >> > >> > >> > https://github.com/mike-tutkowski/incubator-cloudstack/commit/f2897c65689= 012e6157c0a0c2ed7e5355900c59a > >> > >> Please let me know if you have any more comments. > >> > >> Thanks! > >> > >> > >> On Thu, Sep 26, 2013 at 4:05 PM, Marcus Sorensen >wrote: > >> > >>> Mike, everyone, > >>> As I've mentioned on the board, I'm working on getting our own > >>> internal KVM storage plugin working on 4.2. In the interest of making > >>> it forward compatible, I just wanted to confirm what you were doing > >>> with the solidfire plugin as far as attaching your iscsi LUNs. We had > >>> discussed a new connectPhysicalDisk method for the StorageAdaptor > >>> class, something perhaps like: > >>> > >>> public boolean connectPhysicalDisk(String volumeUuid, KVMStoragePool > >>> pool); > >>> > >>> then added to KVMStoragePoolManager: > >>> > >>> public boolean connectPhysicalDisk(StoragePoolType type, String > >>> poolUuid, String volPath) { > >>> StorageAdaptor adaptor =3D getStorageAdaptor(type); > >>> KVMStoragePool pool =3D adaptor.getStoragePool(poolUuid); > >>> return adaptor.connectPhysicalDisk(volPath, pool); > >>> } > >>> > >>> Something similar to this for disconnect as well. Then in the > >>> KVMStorageProcessor these can be called as needed for attach/detach. > >>> We can probably stub out one in LibvirtStorageAdaptor so there's no > >>> need to switch or if/else for pool types, for example in > >>> KVMStorageProcessor.attachVolume. > >>> > >>> I have debated on whether or not it should just be rolled into > >>> getPhysicalDisk, having it connect the disk if it's not already > >>> connected. getPhysicalDisk is called a lot, and I'm not sure it alway= s > >>> needs to connect the disk when it does. In past iterations > >>> getPhysicalDisk has simply spoken to our SAN api and returned the dis= k > >>> details, nothing more. So it seemed more flexible and granular to do > >>> the connectPhysicalDisk (we have one now in our 4.1 version). > >>> > >> > >> > >> > >> -- > >> *Mike Tutkowski* > >> *Senior CloudStack Developer, SolidFire Inc.* > >> e: mike.tutkowski@solidfire.com > >> o: 303.746.7302 > >> Advancing the way the world uses the cloud< > http://solidfire.com/solution/overview/?video=3Dplay> > >> *=99* > >> > > > > > > > > -- > > *Mike Tutkowski* > > *Senior CloudStack Developer, SolidFire Inc.* > > e: mike.tutkowski@solidfire.com > > o: 303.746.7302 > > Advancing the way the world uses the > > cloud > > *=99* > --=20 *Mike Tutkowski* *Senior CloudStack Developer, SolidFire Inc.* e: mike.tutkowski@solidfire.com o: 303.746.7302 Advancing the way the world uses the cloud *=99* --e89a8f6474edfaf82404e7537532--