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 A191110AE4 for ; Tue, 22 Oct 2013 23:42:17 +0000 (UTC) Received: (qmail 57199 invoked by uid 500); 22 Oct 2013 23:42:17 -0000 Delivered-To: apmail-cloudstack-dev-archive@cloudstack.apache.org Received: (qmail 57168 invoked by uid 500); 22 Oct 2013 23:42:17 -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 57160 invoked by uid 99); 22 Oct 2013 23:42:17 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Oct 2013 23:42:17 +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.214.182 as permitted sender) Received: from [209.85.214.182] (HELO mail-ob0-f182.google.com) (209.85.214.182) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Oct 2013 23:42:13 +0000 Received: by mail-ob0-f182.google.com with SMTP id va2so56685obc.41 for ; Tue, 22 Oct 2013 16:41:52 -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:cc:content-type; bh=6gE2IAHnEVuke0ze6ybGxY/avYZ/R3X+4y5pWOQr6+U=; b=Ko60J4dhhoGoJCEObIs3zchZ5mww2gVg36kyYdrf5V//zKwTeQ/E8R2SQlMbOsVyiA LEiGJo6oKpblB/kHRKYnzm4QWcPRLn3t31TZrxs4B7b9Se1xhZO+BKVkesgLh55ruTkR CT+XzSoJI7yXCQ8QAmhKFbGB5FsRMgeLz1jPAAP3O6m43kLsNs1Q12/JHgh/qfeEl0qJ DQ+Yjxv5sc5FYPOhF2v/B5CkN7bCWPk4AK6M1joFkL4JEW1lDVtSuEdKYLNmAV4Ph+t+ cpo++F6gBaIhbRyLqbXzEWJEhoPXOFq8Ru5rCsE2PR5D+3BN+SYnwAEgmhxLulDg9ZM2 J3qA== X-Gm-Message-State: ALoCoQn2RVAz9p3ko2FnBLgCqgqplstTmARW9mCmAOL/XdIyFdf64sG/7Owe3No7ZStFiS1La1qn MIME-Version: 1.0 X-Received: by 10.60.44.178 with SMTP id f18mr4074836oem.43.1382485312063; Tue, 22 Oct 2013 16:41:52 -0700 (PDT) Received: by 10.182.79.130 with HTTP; Tue, 22 Oct 2013 16:41:51 -0700 (PDT) In-Reply-To: <77B337AF224FD84CBF8401947098DD8715BFD4EF@SJCPEX01CL02.citrite.net> References: <77B337AF224FD84CBF8401947098DD8715BFD4EF@SJCPEX01CL02.citrite.net> Date: Tue, 22 Oct 2013 17:41:52 -0600 Message-ID: Subject: Re: Question about StoragePoolHostVO From: Mike Tutkowski To: Edison Su Cc: "dev@cloudstack.apache.org" Content-Type: multipart/alternative; boundary=001a11333a4eeedbd304e95cf188 X-Virus-Checked: Checked by ClamAV on apache.org --001a11333a4eeedbd304e95cf188 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Thanks, Edison. What I was noticing is when I attach a disk to a Stopped VM on KVM and then try to start it, the operation was failing because my data disk did not have a row in this table tying the host ID to the storage pool ID. I modified my SolidFireHostListener class to create such a row and now it works. On Tue, Oct 22, 2013 at 4:52 PM, Edison Su wrote: > The storage_pool_host_ref table is usually used to build the > relationship between storage pool and hypervisor host only. The local pat= h > in this table is not used by other code any more. **** > > If you have specific requirement, such as store a path in this table, we > can add it DefaultHostListener, or you subclass DefaultHostListener.**** > > HypervisorHostListener is a callback you can use, in case of host up and > down. If you don=92t care about this events, you don=92t need to use the > DefaultHostListener at all.**** > > From cloudstack=92s point of view, the only requirement is that, there > should be one entry in storage_pool_host_ref for each host and its primar= y > storage. As you pointed out, we should remove the entry when > hostDisconnected is called.**** > > *From:* Mike Tutkowski [mailto:mike.tutkowski@solidfire.com] > *Sent:* Tuesday, October 22, 2013 12:28 PM > *To:* dev@cloudstack.apache.org; Edison Su > *Subject:* Question about StoragePoolHostVO**** > > ** ** > > Hi Edison (or anyone else viewing this :) ),**** > > ** ** > > I'm looking at the DefaultHostListener class you had written up a while > ago.**** > > ** ** > > A couple questions:**** > > ** ** > > 1) In the "else" below, it does not appear we update the DB with the loca= l > path. Is this correct behavior (this is just a snippet of the method, of > course, but I didn't see any DB update related to this)?**** > > ** ** > > 2) As you know, my storage is zone wide. Should I be adding a row to this > table for each host that connects to the management server that's in the > same zone as my storage? Assuming I should, should I implement the > hostDisconnected method to remove the row? The DefaultHostListener just > returns true for the hostDisconnected method.**** > > ** ** > > StoragePoolHostVO poolHost =3D > storagePoolHostDao.findByPoolHost(pool.getId(), hostId);**** > > if (poolHost =3D=3D null) {**** > > poolHost =3D new StoragePoolHostVO(pool.getId(), hostId, > mspAnswer.getPoolInfo().getLocalPath()**** > > .replaceAll("//", "/"));**** > > storagePoolHostDao.persist(poolHost);**** > > } else {**** > > > poolHost.setLocalPath(mspAnswer.getPoolInfo().getLocalPath().replaceAll("= //", > "/"));**** > > }**** > > Thanks! > **** > > ** ** > > -- > *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* --001a11333a4eeedbd304e95cf188--