cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mc...@apache.org
Subject [1/2] git commit: updated refs/heads/4.2 to 0243f04
Date Tue, 06 Aug 2013 22:22:05 GMT
Updated Branches:
  refs/heads/4.2 016fe3ecb -> 0243f043c


CLOUDSTACK-4116: don't update db if hypervisor storage processor does
not return volume size.


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

Branch: refs/heads/4.2
Commit: 0243f043cb4814b0c8dbb13f44c34436db50de87
Parents: 923c4fd
Author: Min Chen <min.chen@citrix.com>
Authored: Tue Aug 6 15:21:36 2013 -0700
Committer: Min Chen <min.chen@citrix.com>
Committed: Tue Aug 6 15:21:56 2013 -0700

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


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0243f043/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeObject.java
----------------------------------------------------------------------
diff --git a/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeObject.java
b/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeObject.java
index da90dc3..404e3b2 100644
--- a/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeObject.java
+++ b/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeObject.java
@@ -471,7 +471,9 @@ public class VolumeObject implements VolumeInfo {
                     VolumeVO vol = this.volumeDao.findById(this.getId());
                     VolumeObjectTO newVol = (VolumeObjectTO) cpyAnswer.getNewData();
                     vol.setPath(newVol.getPath());
-                    vol.setSize(newVol.getSize());
+                    if (newVol.getSize() != null) {
+                        vol.setSize(newVol.getSize());
+                    }
                     vol.setPoolId(this.getDataStore().getId());
                     volumeDao.update(vol.getId(), vol);
                 } else if (answer instanceof CreateObjectAnswer) {
@@ -479,7 +481,9 @@ public class VolumeObject implements VolumeInfo {
                     VolumeObjectTO newVol = (VolumeObjectTO) createAnswer.getData();
                     VolumeVO vol = this.volumeDao.findById(this.getId());
                     vol.setPath(newVol.getPath());
-                    vol.setSize(newVol.getSize());
+                    if (newVol.getSize() != null) {
+                        vol.setSize(newVol.getSize());
+                    }
                     vol.setPoolId(this.getDataStore().getId());
                     volumeDao.update(vol.getId(), vol);
                 }


Mime
View raw message