Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 336F5200BAD for ; Tue, 25 Oct 2016 11:28:00 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 32133160AE6; Tue, 25 Oct 2016 09:28:00 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 7788E160AF3 for ; Tue, 25 Oct 2016 11:27:59 +0200 (CEST) Received: (qmail 79595 invoked by uid 500); 25 Oct 2016 09:27:58 -0000 Mailing-List: contact issues-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 issues@cloudstack.apache.org Received: (qmail 79531 invoked by uid 500); 25 Oct 2016 09:27:58 -0000 Delivered-To: apmail-incubator-cloudstack-issues@incubator.apache.org Received: (qmail 79497 invoked by uid 99); 25 Oct 2016 09:27:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Oct 2016 09:27:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 602412C1F5A for ; Tue, 25 Oct 2016 09:27:58 +0000 (UTC) Date: Tue, 25 Oct 2016 09:27:58 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: cloudstack-issues@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CLOUDSTACK-9560) Root volume of deleted VM left unremoved MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 25 Oct 2016 09:28:00 -0000 [ https://issues.apache.org/jira/browse/CLOUDSTACK-9560?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15604768#comment-15604768 ] ASF GitHub Bot commented on CLOUDSTACK-9560: -------------------------------------------- Github user koushik-das commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1726#discussion_r84862649 --- Diff: server/src/com/cloud/storage/StorageManagerImpl.java --- @@ -2199,15 +2199,20 @@ public void cleanupDownloadUrls(){ if(downloadUrlCurrentAgeInSecs < _downloadUrlExpirationInterval){ // URL hasnt expired yet continue; } - - s_logger.debug("Removing download url " + volumeOnImageStore.getExtractUrl() + " for volume id " + volumeOnImageStore.getVolumeId()); + long volumeId = volumeOnImageStore.getVolumeId(); + s_logger.debug("Removing download url " + volumeOnImageStore.getExtractUrl() + " for volume id " + volumeId); // Remove it from image store ImageStoreEntity secStore = (ImageStoreEntity) _dataStoreMgr.getDataStore(volumeOnImageStore.getDataStoreId(), DataStoreRole.Image); secStore.deleteExtractUrl(volumeOnImageStore.getInstallPath(), volumeOnImageStore.getExtractUrl(), Upload.Type.VOLUME); // Now expunge it from DB since this entry was created only for download purpose _volumeStoreDao.expunge(volumeOnImageStore.getId()); + Volume volume = _volumeDao.findById(volumeId); + if (volume.getState() == Volume.State.Expunged) --- End diff -- @yvsubhash It is not about the DB relationship, is it possible that some other thread went ahead and deleted the volume entry after the store_ref entries are queried? > Root volume of deleted VM left unremoved > ---------------------------------------- > > Key: CLOUDSTACK-9560 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9560 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the default.) > Components: Volumes > Affects Versions: 4.8.0 > Environment: XenServer > Reporter: subhash yedugundla > Fix For: 4.8.1 > > > In the following scenario root volume gets unremoved > Steps to reproduce the issue > 1. Create a VM. > 2. Stop this VM. > 3. On the page of the volume of the VM, click 'Download Volume' icon. > 4. Wait for the popup screen to display and cancel out with/without clicking the download link. > 5. Destroy the VM > Even after the corresponding VM is deleted,expunged, the root-volume is left in 'Expunging' state unremoved. -- This message was sent by Atlassian JIRA (v6.3.4#6332)