You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by da...@apache.org on 2014/06/23 09:52:55 UTC

[1/2] git commit: updated refs/heads/4.4 to 1b1a417

Repository: cloudstack
Updated Branches:
  refs/heads/4.4 c42293371 -> 1b1a417bb


CLOUDSTACK-6965: fixed the NullPointerException introduced by fix for cloudstack
6935 in AbstractStoragePoolAllocator#filter method for Zone Wide storage

(cherry picked from commit ef45f06f88c955dcf47f1fb69a3a0e87eb817e1d)


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

Branch: refs/heads/4.4
Commit: 423c23af4052b29e908110d35978a4a720501448
Parents: c422933
Author: Anshul Gangwar <an...@citrix.com>
Authored: Mon Jun 23 10:58:44 2014 +0530
Committer: Daan Hoogland <da...@onecht.net>
Committed: Mon Jun 23 09:50:04 2014 +0200

----------------------------------------------------------------------
 .../allocator/AbstractStoragePoolAllocator.java     | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/423c23af/engine/storage/src/org/apache/cloudstack/storage/allocator/AbstractStoragePoolAllocator.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/allocator/AbstractStoragePoolAllocator.java b/engine/storage/src/org/apache/cloudstack/storage/allocator/AbstractStoragePoolAllocator.java
index 2d958a6..847bad3 100755
--- a/engine/storage/src/org/apache/cloudstack/storage/allocator/AbstractStoragePoolAllocator.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/allocator/AbstractStoragePoolAllocator.java
@@ -27,11 +27,12 @@ import java.util.Random;
 import javax.inject.Inject;
 import javax.naming.ConfigurationException;
 
+import org.apache.log4j.Logger;
+
 import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreManager;
 import org.apache.cloudstack.engine.subsystem.api.storage.StoragePoolAllocator;
 import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
 import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao;
-import org.apache.log4j.Logger;
 
 import com.cloud.dc.ClusterVO;
 import com.cloud.dc.dao.ClusterDao;
@@ -171,10 +172,17 @@ public abstract class AbstractStoragePoolAllocator extends AdapterBase implement
         }
 
         Long clusterId = pool.getClusterId();
-        ClusterVO cluster = _clusterDao.findById(clusterId);
-        if (!(cluster.getHypervisorType() == dskCh.getHypervisorType())) {
+        if (clusterId != null) {
+            ClusterVO cluster = _clusterDao.findById(clusterId);
+            if (!(cluster.getHypervisorType() == dskCh.getHypervisorType())) {
+                if (s_logger.isDebugEnabled()) {
+                    s_logger.debug("StoragePool's Cluster does not have required hypervisorType, skipping this pool");
+                }
+                return false;
+            }
+        } else if (pool.getHypervisor() != null && !(pool.getHypervisor() == dskCh.getHypervisorType())) {
             if (s_logger.isDebugEnabled()) {
-                s_logger.debug("StoragePool's Cluster does not have required hypervisorType, skipping this pool");
+                s_logger.debug("StoragePool does not have required hypervisorType, skipping this pool");
             }
             return false;
         }


[2/2] git commit: updated refs/heads/4.4 to 1b1a417

Posted by da...@apache.org.
CLOUDSTACK-6968: Allowing cluster scope volumes to attach to any VM. If migration is
needed then first they will be migrated to appropriate cluster before attaching.

(cherry picked from commit e7ba46b5f7da21c4fc13dc3284aa802d177045f2)


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

Branch: refs/heads/4.4
Commit: 1b1a417bb43f507cf920b99b3c0d5ebca97c1724
Parents: 423c23a
Author: Anshul Gangwar <an...@citrix.com>
Authored: Fri Jun 20 16:35:06 2014 +0530
Committer: Daan Hoogland <da...@onecht.net>
Committed: Mon Jun 23 09:50:31 2014 +0200

----------------------------------------------------------------------
 server/src/com/cloud/storage/VolumeApiServiceImpl.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1b1a417b/server/src/com/cloud/storage/VolumeApiServiceImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/storage/VolumeApiServiceImpl.java b/server/src/com/cloud/storage/VolumeApiServiceImpl.java
index 6703e61..fd434a5 100644
--- a/server/src/com/cloud/storage/VolumeApiServiceImpl.java
+++ b/server/src/com/cloud/storage/VolumeApiServiceImpl.java
@@ -1944,7 +1944,9 @@ public class VolumeApiServiceImpl extends ManagerBase implements VolumeApiServic
                 }
                 if (storeForDataStoreScope.getScopeId().equals(vmClusterId)) {
                     return false;
-            }
+                } else {
+                    return true;
+                }
             } else if (storeForDataStoreScope.getScopeType() == ScopeType.HOST
                     && (storeForRootStoreScope.getScopeType() == ScopeType.CLUSTER || storeForRootStoreScope.getScopeType() == ScopeType.ZONE)) {
                 Long hostId = _vmInstanceDao.findById(rootVolumeOfVm.getInstanceId()).getHostId();