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 864AA1009E for ; Thu, 30 Jan 2014 22:29:55 +0000 (UTC) Received: (qmail 27028 invoked by uid 500); 30 Jan 2014 22:29:54 -0000 Delivered-To: apmail-cloudstack-dev-archive@cloudstack.apache.org Received: (qmail 26959 invoked by uid 500); 30 Jan 2014 22:29:54 -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 26951 invoked by uid 99); 30 Jan 2014 22:29:54 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Jan 2014 22:29:54 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of shadowsor@gmail.com designates 209.85.214.54 as permitted sender) Received: from [209.85.214.54] (HELO mail-bk0-f54.google.com) (209.85.214.54) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Jan 2014 22:29:49 +0000 Received: by mail-bk0-f54.google.com with SMTP id u14so1707360bkz.13 for ; Thu, 30 Jan 2014 14:29:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=e5q3f+gmhlhnVmOCQF93BkKsNtnXC/rRgGus5OrLjBU=; b=I+B5qQDJbGzzMj3HotTymSq78YwfZE+5JGsZAkVE1M+ZrsZE2WwiJhR+31v6Jum3ZY CmYzAf3u7AJHI8su87Df1vsxM1h4kDxyJ4BnJd+TGB+7C0xYG9fdZF+nMI1D2+tD6NwD BxQB9mtCs4QRaPceHM7Fs7TGdo0ONFCB7iZAwkfuuW40TxC4CmOKyjLwqHhlsXLwlBgv CboJLP2r2sw2C2kSkunQMgG1JvLYg/OLuP6nwsogEaAfywOtCQrM5rMyKcHvj7r+o0Td CnfamLBQ/LqX++vVbrp2iyunGvxooPEg1mMlvdNOlP/l0MBrJ+iqh7UnpN9YPGUBOgRD 0RIg== MIME-Version: 1.0 X-Received: by 10.152.229.225 with SMTP id st1mr11440845lac.2.1391120968326; Thu, 30 Jan 2014 14:29:28 -0800 (PST) Received: by 10.114.18.143 with HTTP; Thu, 30 Jan 2014 14:29:28 -0800 (PST) In-Reply-To: References: Date: Thu, 30 Jan 2014 15:29:28 -0700 Message-ID: Subject: Re: volume lifecycle issue expunging From: Marcus To: "dev@cloudstack.apache.org" Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org My one hesitation is that it may cause problems by surfacing other bugs. For example, say a delete operation succeeds in deleting the image file, but fails in some subsequent code. The next time it runs, it may fail in deleting the image file (file not found), and thus get stuck in an endless loop trying to clean up. I think it's ultimately good to surface those (better than potentially orphaning disks on storage), but it may be something to watch for. On Thu, Jan 30, 2014 at 2:56 PM, Mike Tutkowski wrote: > I agree, Marcus. > > > On Thu, Jan 30, 2014 at 2:42 PM, Marcus wrote: > >> I think there's a hole in the volume lifecycle. I've been noticing >> volumes lingering that should have been cleaned up, and it seems to be >> a bug in the state machine for the volumes: >> >> s_fsm.addTransition(Destroy, Event.ExpungingRequested, >> Expunging); >> s_fsm.addTransition(Expunging, Event.ExpungingRequested, >> Expunging); >> s_fsm.addTransition(Expunging, Event.OperationSucceeded, >> Expunged); >> s_fsm.addTransition(Expunging, Event.OperationFailed, >> Expunging); >> >> If a volume is in Destroy state, it goes to Expunging when the delete >> operation is requested. If the delete fails, it remains in expunging. >> The storage garbage collector will never try to clean up that volume >> again, since it only lists volumes in 'Destroy' and attempts those. >> You can only get to Expunging from Destroy, it makes sense to change >> that last line to revert the volume state back to Destroy if the >> expunge operation failed, so that it will try again next time. >> > > > > -- > *Mike Tutkowski* > *Senior CloudStack Developer, SolidFire Inc.* > e: mike.tutkowski@solidfire.com > o: 303.746.7302 > Advancing the way the world uses the > cloud > *(tm)*