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 CDB69200C38 for ; Wed, 15 Mar 2017 12:00:38 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id CCF70160B8A; Wed, 15 Mar 2017 11:00:38 +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 479C8160B70 for ; Wed, 15 Mar 2017 12:00:38 +0100 (CET) Received: (qmail 67912 invoked by uid 500); 15 Mar 2017 11:00:36 -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 67878 invoked by uid 99); 15 Mar 2017 11:00:36 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Mar 2017 11:00:36 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id E7E5FE029E; Wed, 15 Mar 2017 11:00:35 +0000 (UTC) From: koushik-das To: dev@cloudstack.apache.org Reply-To: dev@cloudstack.apache.org References: In-Reply-To: Subject: [GitHub] cloudstack pull request #1867: CLOUDSTACK-9706: Added snapshots cleanup in s... Content-Type: text/plain Message-Id: <20170315110035.E7E5FE029E@git1-us-west.apache.org> Date: Wed, 15 Mar 2017 11:00:35 +0000 (UTC) archived-at: Wed, 15 Mar 2017 11:00:39 -0000 Github user koushik-das commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1867#discussion_r106137098 --- Diff: server/src/com/cloud/storage/StorageManagerImpl.java --- @@ -1078,6 +1082,16 @@ public void cleanupStorage(boolean recurring) { } } + //destroy snapshots in destroying state in snapshot_store_ref + List ssSnapshots = _snapshotStoreDao.listByState(ObjectInDataStoreStateMachine.State.Destroying); + for(SnapshotDataStoreVO ssSnapshotVO : ssSnapshots){ + try { + _snapshotService.deleteSnapshot(snapshotFactory.getSnapshot(ssSnapshotVO.getSnapshotId(), DataStoreRole.Image)); --- End diff -- deleteSnapshot() is going to send an agent command to cleanup the snapshot from secondary, if there is any failure will cleanup be retried or the DB entry is simply updated? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. ---