cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mtutkow...@apache.org
Subject git commit: updated refs/heads/master to 08995b6
Date Fri, 29 Aug 2014 05:58:39 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master de6a3112b -> 08995b68e


Name the SolidFire Volume Access Group after the UUID of the CloudStack cluster it serves

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

Branch: refs/heads/master
Commit: 08995b68e65a9f5aba919f8de878bab3f8998fe3
Parents: de6a311
Author: Mike Tutkowski <mike.tutkowski@solidfire.com>
Authored: Thu Aug 28 23:57:52 2014 -0600
Committer: Mike Tutkowski <mike.tutkowski@solidfire.com>
Committed: Thu Aug 28 23:57:52 2014 -0600

----------------------------------------------------------------------
 .../datastore/driver/SolidFirePrimaryDataStoreDriver.java     | 7 ++++++-
 .../lifecycle/SolidFireSharedPrimaryDataStoreLifeCycle.java   | 3 ++-
 .../cloudstack/storage/datastore/util/SolidFireUtil.java      | 6 +++---
 3 files changed, 11 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/08995b68/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 6eee9fe..e5a1585 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
@@ -43,9 +43,11 @@ import com.cloud.agent.api.to.DataObjectType;
 import com.cloud.agent.api.to.DataStoreTO;
 import com.cloud.agent.api.to.DataTO;
 import com.cloud.capacity.CapacityManager;
+import com.cloud.dc.ClusterVO;
 import com.cloud.dc.ClusterDetailsVO;
 import com.cloud.dc.ClusterDetailsDao;
 import com.cloud.dc.dao.DataCenterDao;
+import com.cloud.dc.dao.ClusterDao;
 import com.cloud.host.Host;
 import com.cloud.host.HostVO;
 import com.cloud.host.dao.HostDao;
@@ -65,6 +67,7 @@ public class SolidFirePrimaryDataStoreDriver implements PrimaryDataStoreDriver
{
     @Inject private AccountDao _accountDao;
     @Inject private AccountDetailsDao _accountDetailsDao;
     @Inject private CapacityManager _capacityMgr;
+    @Inject private ClusterDao _clusterDao;
     @Inject private ClusterDetailsDao _clusterDetailsDao;
     @Inject private DataCenterDao _zoneDao;
     @Inject private HostDao _hostDao;
@@ -135,7 +138,9 @@ public class SolidFirePrimaryDataStoreDriver implements PrimaryDataStoreDriver
{
             SolidFireUtil.modifySolidFireVag(sfConnection, sfVag.getId(), hostIqns, volumeIds);
         }
         else {
-            SolidFireUtil.placeVolumeInVolumeAccessGroup(sfConnection, sfVolumeId, storagePoolId,
hosts, _clusterDetailsDao);
+            ClusterVO cluster = _clusterDao.findById(clusterId);
+
+            SolidFireUtil.placeVolumeInVolumeAccessGroup(sfConnection, sfVolumeId, storagePoolId,
cluster.getUuid(), hosts, _clusterDetailsDao);
         }
 
         return true;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/08995b68/plugins/storage/volume/solidfire/src/org/apache/cloudstack/storage/datastore/lifecycle/SolidFireSharedPrimaryDataStoreLifeCycle.java
----------------------------------------------------------------------
diff --git a/plugins/storage/volume/solidfire/src/org/apache/cloudstack/storage/datastore/lifecycle/SolidFireSharedPrimaryDataStoreLifeCycle.java
b/plugins/storage/volume/solidfire/src/org/apache/cloudstack/storage/datastore/lifecycle/SolidFireSharedPrimaryDataStoreLifeCycle.java
index 30d6659..b70333d 100644
--- a/plugins/storage/volume/solidfire/src/org/apache/cloudstack/storage/datastore/lifecycle/SolidFireSharedPrimaryDataStoreLifeCycle.java
+++ b/plugins/storage/volume/solidfire/src/org/apache/cloudstack/storage/datastore/lifecycle/SolidFireSharedPrimaryDataStoreLifeCycle.java
@@ -255,8 +255,9 @@ public class SolidFireSharedPrimaryDataStoreLifeCycle implements PrimaryDataStor
         // place the newly created volume in the Volume Access Group
         try {
             List<HostVO> hosts = _hostDao.findByClusterId(clusterId);
+            ClusterVO cluster = _clusterDao.findById(clusterId);
 
-            SolidFireUtil.placeVolumeInVolumeAccessGroup(sfConnection, sfVolume.getId(),
dataStore.getId(), hosts, _clusterDetailsDao);
+            SolidFireUtil.placeVolumeInVolumeAccessGroup(sfConnection, sfVolume.getId(),
dataStore.getId(), cluster.getUuid(), hosts, _clusterDetailsDao);
 
             SolidFireUtil.SolidFireAccount sfAccount = sfCreateVolume.getAccount();
             Account csAccount = CallContext.current().getCallingAccount();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/08995b68/plugins/storage/volume/solidfire/src/org/apache/cloudstack/storage/datastore/util/SolidFireUtil.java
----------------------------------------------------------------------
diff --git a/plugins/storage/volume/solidfire/src/org/apache/cloudstack/storage/datastore/util/SolidFireUtil.java
b/plugins/storage/volume/solidfire/src/org/apache/cloudstack/storage/datastore/util/SolidFireUtil.java
index 2aa8914..f962289 100644
--- a/plugins/storage/volume/solidfire/src/org/apache/cloudstack/storage/datastore/util/SolidFireUtil.java
+++ b/plugins/storage/volume/solidfire/src/org/apache/cloudstack/storage/datastore/util/SolidFireUtil.java
@@ -229,8 +229,8 @@ public class SolidFireUtil {
         }
     }
 
-    public static long placeVolumeInVolumeAccessGroup(SolidFireConnection sfConnection, long
sfVolumeId, long storagePoolId, List<HostVO> hosts,
-            ClusterDetailsDao clusterDetailsDao) {
+    public static long placeVolumeInVolumeAccessGroup(SolidFireConnection sfConnection, long
sfVolumeId, long storagePoolId,
+            String vagUuid, List<HostVO> hosts, ClusterDetailsDao clusterDetailsDao)
{
         if (hosts == null || hosts.isEmpty()) {
             throw new CloudRuntimeException("There must be at least one host in the cluster.");
         }
@@ -238,7 +238,7 @@ public class SolidFireUtil {
         long lVagId;
 
         try {
-            lVagId = SolidFireUtil.createSolidFireVag(sfConnection, "CloudStack-" + UUID.randomUUID().toString(),
+            lVagId = SolidFireUtil.createSolidFireVag(sfConnection, "CloudStack-" + vagUuid,
                 SolidFireUtil.getIqnsFromHosts(hosts), new long[] { sfVolumeId });
         }
         catch (Exception ex) {


Mime
View raw message