You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ko...@apache.org on 2013/06/29 02:27:57 UTC

git commit: updated refs/heads/master-6-17-stable to 661e32b

Updated Branches:
  refs/heads/master-6-17-stable 9e4b4a707 -> 661e32b3e


CLOUDSTACK-2276: NPE while attaching the volume to the instance which is created from ROOT Disk Snapshot
Storage pool id was not getting set while creating volume from snapshot. Fix is to set the storage pool id.


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

Branch: refs/heads/master-6-17-stable
Commit: 661e32b3e2ddff253acf83749738b3bc0d7e7509
Parents: 9e4b4a7
Author: Koushik Das <ko...@citrix.com>
Authored: Fri Jun 28 17:23:51 2013 -0700
Committer: Koushik Das <ko...@citrix.com>
Committed: Fri Jun 28 17:23:51 2013 -0700

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


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/661e32b3/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 54dcbd2..b6c73d4 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
@@ -464,6 +464,9 @@ public class VolumeServiceImpl implements VolumeService {
 
         try {
             volume.processEvent(event);
+            VolumeVO vol = this.volDao.findById(volume.getId());
+            vol.setPoolId(context.primaryStore.getId());
+            this.volDao.update(vol.getId(), vol);
         } catch (Exception e) {
             s_logger.debug("create volume from snapshot failed", e);
             apiResult.setResult(e.toString());