You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by wi...@apache.org on 2015/01/02 15:36:05 UTC
[13/50] [abbrv] git commit: updated refs/heads/reporter to b26f3fc
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/reporter
Commit: e559b15b6a166e2eb5f9b044338295fe8c9d219d
Parents: ea63455
Author: Min Chen <mi...@citrix.com>
Authored: Fri Dec 19 16:48:45 2014 -0800
Committer: Min Chen <mi...@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());