mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-3665:Failed to create volume from snapshot.
This commit is contained in:
parent
7c5b48425f
commit
13a9b94193
|
|
@ -59,9 +59,13 @@ public class ClusterScopeStoragePoolAllocator extends AbstractStoragePoolAllocat
|
|||
Long podId = plan.getPodId();
|
||||
Long clusterId = plan.getClusterId();
|
||||
|
||||
if (clusterId == null) {
|
||||
return null;
|
||||
}
|
||||
if (podId == null) {
|
||||
// for zone wide storage, podId should be null. We cannot check
|
||||
// clusterId == null here because it will break ClusterWide primary
|
||||
// storage volume operation where
|
||||
// only podId is passed into this call.
|
||||
return null;
|
||||
}
|
||||
if (dskCh.getTags() != null && dskCh.getTags().length != 0) {
|
||||
s_logger.debug("Looking for pools in dc: " + dcId + " pod:" + podId + " cluster:" + clusterId
|
||||
+ " having tags:" + Arrays.toString(dskCh.getTags()));
|
||||
|
|
|
|||
|
|
@ -96,7 +96,8 @@ public class LocalStoragePoolAllocator extends AbstractStoragePoolAllocator {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
if (plan.getClusterId() == null) {
|
||||
if (plan.getPodId() == null) {
|
||||
// zone wide primary storage deployment
|
||||
return null;
|
||||
}
|
||||
List<StoragePoolVO> availablePools = _storagePoolDao.findLocalStoragePoolsByTags(plan.getDataCenterId(),
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ public class RandomStoragePoolAllocator extends AbstractStoragePoolAllocator {
|
|||
Long podId = plan.getPodId();
|
||||
Long clusterId = plan.getClusterId();
|
||||
|
||||
if (clusterId == null) {
|
||||
if (podId == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue