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 AB313200BEF for ; Wed, 4 Jan 2017 21:19:59 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id AAAC6160B47; Wed, 4 Jan 2017 20:19:59 +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 263C4160B21 for ; Wed, 4 Jan 2017 21:19:59 +0100 (CET) Received: (qmail 41718 invoked by uid 500); 4 Jan 2017 20:19:53 -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 41699 invoked by uid 99); 4 Jan 2017 20:19:53 -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, 04 Jan 2017 20:19:53 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id E98CDDF9F9; Wed, 4 Jan 2017 20:19:52 +0000 (UTC) From: mike-tutkowski To: dev@cloudstack.apache.org Reply-To: dev@cloudstack.apache.org References: In-Reply-To: Subject: [GitHub] cloudstack pull request #1735: CLOUDSTACK-9570: Bug in listSnapshots for sna... Content-Type: text/plain Message-Id: <20170104201952.E98CDDF9F9@git1-us-west.apache.org> Date: Wed, 4 Jan 2017 20:19:52 +0000 (UTC) archived-at: Wed, 04 Jan 2017 20:19:59 -0000 Github user mike-tutkowski commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1735#discussion_r94657561 --- Diff: server/src/com/cloud/api/ApiResponseHelper.java --- @@ -526,16 +529,18 @@ public static DataStoreRole getDataStoreRole(Snapshot snapshot, SnapshotDataStor } long storagePoolId = snapshotStore.getDataStoreId(); - DataStore dataStore = dataStoreMgr.getDataStore(storagePoolId, DataStoreRole.Primary); + if (snapshotStore.getState() != null && ! snapshotStore.getState().equals(ObjectInDataStoreStateMachine.State.Destroyed)) { --- End diff -- For managed storage, that is true. For unmanaged storage, one should be able to delete the primary storage from which a snapshot was created and the snapshot should be able to remain (since the snapshot, in this case, is on secondary storage). --- 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. ---