cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mc...@apache.org
Subject git commit: updated refs/heads/master to 181fb03
Date Tue, 23 Jul 2013 00:14:39 GMT
Updated Branches:
  refs/heads/master 7974dfe8d -> 181fb03e7


CLOUDSTACK-3716:NPE triggered in DownloadListener


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

Branch: refs/heads/master
Commit: 181fb03e7e6ed89102a8b5f0acfddf88d148d55c
Parents: 7974dfe
Author: Min Chen <min.chen@citrix.com>
Authored: Mon Jul 22 17:12:02 2013 -0700
Committer: Min Chen <min.chen@citrix.com>
Committed: Mon Jul 22 17:14:30 2013 -0700

----------------------------------------------------------------------
 .../org/apache/cloudstack/storage/volume/VolumeServiceImpl.java | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/181fb03e/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
----------------------------------------------------------------------
diff --git a/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
b/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
index 9338d38..3b544b1 100644
--- a/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
+++ b/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
@@ -1045,6 +1045,11 @@ public class VolumeServiceImpl implements VolumeService {
         List<VolumeDataStoreVO> toBeDownloaded = new ArrayList<VolumeDataStoreVO>(dbVolumes);
         for (VolumeDataStoreVO volumeStore : dbVolumes) {
             VolumeVO volume = _volumeDao.findById(volumeStore.getVolumeId());
+            if (volume == null ){
+                s_logger.warn("Volume_store_ref shows that volume " + volumeStore.getVolumeId()
+ " is on image store " + storeId
+                        + ", but the volume is not found in volumes table, potentially some
bugs in deleteVolume, so we just treat this volume to be deleted");
+                continue;
+            }
             // Exists then don't download
             if (volumeInfos.containsKey(volume.getId())) {
                 TemplateProp volInfo = volumeInfos.remove(volume.getId());


Mime
View raw message