cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject [1/2] git commit: updated refs/heads/4.9 to a5d5784
Date Mon, 28 Nov 2016 11:18:51 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/4.9 fd6833b9c -> a5d578485


CLOUDSTACK-9538: FIX failure in Deleting Snapshot From Primary Storage RBD Storage if vm has
been removed


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/784c3358
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/784c3358
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/784c3358

Branch: refs/heads/4.9
Commit: 784c33585fbce93b363543c362d7b821e5896be8
Parents: 2ebf949
Author: Wei Zhou <w.zhou@tech.leaseweb.com>
Authored: Thu Oct 13 11:54:43 2016 +0200
Committer: Wei Zhou <w.zhou@tech.leaseweb.com>
Committed: Mon Oct 17 08:25:34 2016 +0200

----------------------------------------------------------------------
 .../cloudstack/storage/snapshot/XenserverSnapshotStrategy.java   | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/784c3358/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/XenserverSnapshotStrategy.java
----------------------------------------------------------------------
diff --git a/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/XenserverSnapshotStrategy.java
b/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/XenserverSnapshotStrategy.java
index 2544484..5771d9f 100644
--- a/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/XenserverSnapshotStrategy.java
+++ b/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/XenserverSnapshotStrategy.java
@@ -268,7 +268,9 @@ public class XenserverSnapshotStrategy extends SnapshotStrategyBase {
                 SnapshotDataStoreVO snapshotOnPrimary = snapshotStoreDao.findBySnapshot(snapshotId,
DataStoreRole.Primary);
                 if (snapshotOnPrimary != null) {
                     SnapshotInfo snapshotOnPrimaryInfo = snapshotDataFactory.getSnapshot(snapshotId,
DataStoreRole.Primary);
-                    if (((PrimaryDataStoreImpl)snapshotOnPrimaryInfo.getDataStore()).getPoolType()
== StoragePoolType.RBD) {
+                    long volumeId = snapshotOnPrimary.getVolumeId();
+                    VolumeVO volumeVO = volumeDao.findById(volumeId);
+                    if (((PrimaryDataStoreImpl)snapshotOnPrimaryInfo.getDataStore()).getPoolType()
== StoragePoolType.RBD && volumeVO != null) {
                         snapshotSvr.deleteSnapshot(snapshotOnPrimaryInfo);
                     }
                     snapshotOnPrimary.setState(State.Destroyed);


Mime
View raw message