You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by mt...@apache.org on 2015/08/12 20:49:01 UTC
[1/2] git commit: updated refs/heads/master to 55ae168
Repository: cloudstack
Updated Branches:
refs/heads/master fa56b3f37 -> 55ae168cd
getUsedBytes should query the SolidFire cluster to acquire the size of the given volume if there is no volume_details info for that volume (and then create a volume_details row for this volume so we don't have to make that cluster call for this purpose again)
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/bcfbc6d7
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/bcfbc6d7
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/bcfbc6d7
Branch: refs/heads/master
Commit: bcfbc6d73c39213b65334bfd5e2cac1a235462f5
Parents: a5e563a
Author: Mike Tutkowski <mi...@solidfire.com>
Authored: Thu Aug 6 11:59:30 2015 -0600
Committer: Mike Tutkowski <mi...@solidfire.com>
Committed: Wed Aug 12 12:24:17 2015 -0600
----------------------------------------------------------------------
.../driver/SolidFirePrimaryDataStoreDriver.java | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bcfbc6d7/plugins/storage/volume/solidfire/src/org/apache/cloudstack/storage/datastore/driver/SolidFirePrimaryDataStoreDriver.java
----------------------------------------------------------------------
diff --git a/plugins/storage/volume/solidfire/src/org/apache/cloudstack/storage/datastore/driver/SolidFirePrimaryDataStoreDriver.java b/plugins/storage/volume/solidfire/src/org/apache/cloudstack/storage/datastore/driver/SolidFirePrimaryDataStoreDriver.java
index 46ecd69..b545931 100644
--- a/plugins/storage/volume/solidfire/src/org/apache/cloudstack/storage/datastore/driver/SolidFirePrimaryDataStoreDriver.java
+++ b/plugins/storage/volume/solidfire/src/org/apache/cloudstack/storage/datastore/driver/SolidFirePrimaryDataStoreDriver.java
@@ -307,6 +307,18 @@ public class SolidFirePrimaryDataStoreDriver implements PrimaryDataStoreDriver {
usedSpace += volumeSize;
}
+ else {
+ SolidFireUtil.SolidFireConnection sfConnection = SolidFireUtil.getSolidFireConnection(storagePool.getId(), _storagePoolDetailsDao);
+ long lVolumeId = Long.valueOf(volume.getFolder());
+
+ SolidFireUtil.SolidFireVolume sfVolume = SolidFireUtil.getSolidFireVolume(sfConnection, lVolumeId);
+
+ // SolidFireUtil.VOLUME_SIZE was introduced in 4.5.
+ // To be backward compatible with releases prior to 4.5, call updateVolumeDetails here.
+ // That way if SolidFireUtil.VOLUME_SIZE wasn't put in the volume_details table when the
+ // volume was initially created, it can be placed in volume_details here.
+ updateVolumeDetails(volume.getId(), sfVolume.getTotalSize());
+ }
}
}
@@ -417,8 +429,6 @@ public class SolidFirePrimaryDataStoreDriver implements PrimaryDataStoreDriver {
if (dataObject.getType() == DataObjectType.VOLUME) {
VolumeInfo volumeInfo = (VolumeInfo)dataObject;
- AccountVO account = _accountDao.findById(volumeInfo.getAccountId());
- String sfAccountName = SolidFireUtil.getSolidFireAccountName(account.getUuid(), account.getAccountId());
long storagePoolId = dataStore.getId();
@@ -427,6 +437,8 @@ public class SolidFirePrimaryDataStoreDriver implements PrimaryDataStoreDriver {
AccountDetailVO accountDetail = SolidFireUtil.getAccountDetail(volumeInfo.getAccountId(), storagePoolId, _accountDetailsDao);
if (accountDetail == null || accountDetail.getValue() == null) {
+ AccountVO account = _accountDao.findById(volumeInfo.getAccountId());
+ String sfAccountName = SolidFireUtil.getSolidFireAccountName(account.getUuid(), account.getAccountId());
SolidFireUtil.SolidFireAccount sfAccount = SolidFireUtil.getSolidFireAccount(sfConnection, sfAccountName);
if (sfAccount == null) {
[2/2] git commit: updated refs/heads/master to 55ae168
Posted by mt...@apache.org.
Merge pull request #674 from Mike Tutkowski (mike.tutkowski@solidfire.com)
* pr/674:
getUsedBytes should query the SolidFire cluster to acquire the size of the given volume if there is no volume_details info for that volume (and then create a volume_details row for this volume so we don't have to make that cluster call for this purpose again)
Signed-off-by: Mike Tutkowski
Signed-off-by: Mike Tutkowski <mi...@solidfire.com>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/55ae168c
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/55ae168c
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/55ae168c
Branch: refs/heads/master
Commit: 55ae168cdd034c3a5ce53fe6186d5318a3eb1a80
Parents: fa56b3f bcfbc6d
Author: Mike Tutkowski <mi...@solidfire.com>
Authored: Wed Aug 12 12:47:14 2015 -0600
Committer: Mike Tutkowski <mi...@solidfire.com>
Committed: Wed Aug 12 12:48:36 2015 -0600
----------------------------------------------------------------------
.../driver/SolidFirePrimaryDataStoreDriver.java | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
----------------------------------------------------------------------