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 A1B51FB2A for ; Thu, 25 Apr 2013 00:11:27 +0000 (UTC) Received: (qmail 1811 invoked by uid 500); 25 Apr 2013 00:11:27 -0000 Delivered-To: apmail-cloudstack-dev-archive@cloudstack.apache.org Received: (qmail 1736 invoked by uid 500); 25 Apr 2013 00:11:27 -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 1726 invoked by uid 500); 25 Apr 2013 00:11:27 -0000 Delivered-To: apmail-incubator-cloudstack-dev@incubator.apache.org Received: (qmail 1718 invoked by uid 99); 25 Apr 2013 00:11:27 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Apr 2013 00:11:27 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 942DD1C8F29; Thu, 25 Apr 2013 00:11:23 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============5455427067266380240==" MIME-Version: 1.0 Subject: Re: Review Request: Delete KVMHA dir contents if found when deleting templates, volumes from nfs secondary storage From: "Marcus Sorensen" To: "Chip Childers" Cc: "Marcus Sorensen" , "cloudstack" , "edison su" Date: Thu, 25 Apr 2013 00:11:23 -0000 Message-ID: <20130425001123.22548.45764@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org Auto-Submitted: auto-generated Sender: "Marcus Sorensen" X-ReviewGroup: cloudstack X-ReviewRequest-URL: https://reviews.apache.org/r/10766/ X-Sender: "Marcus Sorensen" References: <20130424230542.22548.16302@reviews.apache.org> In-Reply-To: <20130424230542.22548.16302@reviews.apache.org> Reply-To: "Marcus Sorensen" --===============5455427067266380240== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable > On April 24, 2013, 11:05 p.m., edison su wrote: > > The HA will write data into secondary storage also? It should only writ= e data into primary storage. > = > Marcus Sorensen wrote: > The KVMStoragePoolManager is currently adding any NFS type to the lis= t of HA pools to write to. I can change that as well, I'm just not very fam= iliar with why it was working that way in the first place. Will look at it = now. Ok, I think I know what the issue is. In 4.0, primary storage pools were cr= eated via KVMStoragePoolManager's createStoragePool, which calls LibvirtSto= rageAdaptor's createStoragePool, and then adds it to the HA list. Secondary= storage shortcuts directly into LibvirtStorageAdaptor's createStoragePool,= and never gets added to the HA list. In 4.1, everything goes through KVMSt= oragePool so we can identify the proper storage adaptor. I see no simple wa= y to differentiate primary vs secondary NFS storage from within KVMStorageP= oolManager, other than the 'template/tmpl', 'volumes', and 'snapshots' dire= ctories in their paths. We may have to pass that in. - Marcus ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/10766/#review19676 ----------------------------------------------------------- On April 24, 2013, 9:23 p.m., Marcus Sorensen wrote: > = > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/10766/ > ----------------------------------------------------------- > = > (Updated April 24, 2013, 9:23 p.m.) > = > = > Review request for cloudstack and Chip Childers. > = > = > Description > ------- > = > the KVM HA runner uses any NFS secondary storage resource available to a = host to store it's HA data. This causes template deletes to fail because it= cannot delete KVMHA, which is a directory that is not empty. So if KVMHA d= irectory is found, delete it's contents before trying to delete it. > = > = > This addresses bug CLOUDSTACK-2173. > = > = > Diffs > ----- > = > core/src/com/cloud/storage/resource/NfsSecondaryStorageResource.java e6= 5cbe1 = > = > Diff: https://reviews.apache.org/r/10766/diff/ > = > = > Testing > ------- > = > Had a bunch of templates that the scavenger was failing to clean up. Appl= ied this patch, installed the code, and the templates all cleaned up succes= sfully. > = > = > Thanks, > = > Marcus Sorensen > = > --===============5455427067266380240==--