Repository: cloudstack
Updated Branches:
  refs/heads/master ea634550f -> e559b15b6


CLOUDSTACK-8101: volume sync not working as expected - MS restart during upload 
volume leaves volume in hung state.


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

Branch: refs/heads/master
Commit: e559b15b6a166e2eb5f9b044338295fe8c9d219d
Parents: ea63455
Author: Min Chen <min.c...@citrix.com>
Authored: Fri Dec 19 16:48:45 2014 -0800
Committer: Min Chen <min.c...@citrix.com>
Committed: Fri Dec 19 16:51:41 2014 -0800

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


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e559b15b/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 5d10c7f..c00785e 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
@@ -1382,8 +1382,8 @@ public class VolumeServiceImpl implements VolumeService {
                         return;
                     }
 
-                    // we can only resume those uploaded volume with a URL 
specified
-                    List<VolumeDataStoreVO> dbVolumes = 
_volumeStoreDao.listUploadedVolumesByStoreId(storeId);
+                    // find all the db volumes including those with NULL url 
column to avoid accidentally deleting volumes on image store later.
+                    List<VolumeDataStoreVO> dbVolumes = 
_volumeStoreDao.listByStoreId(storeId);
                     List<VolumeDataStoreVO> toBeDownloaded = new 
ArrayList<VolumeDataStoreVO>(dbVolumes);
                     for (VolumeDataStoreVO volumeStore : dbVolumes) {
                         VolumeVO volume = 
volDao.findById(volumeStore.getVolumeId());

Reply via email to