mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Changes for Bug 8997 - Fail to create volume from snapshot: NPE at "allocateToPool(FirstFitStoragePoolAllocator.java:63)
- ClusterId passed in could be null
This commit is contained in:
parent
63593c5057
commit
2076eec42b
@ -90,8 +90,8 @@ public class FirstFitAllocator implements HostAllocator {
|
||||
ExcludeList avoid, int returnUpTo) {
|
||||
|
||||
long dcId = plan.getDataCenterId();
|
||||
long podId = plan.getPodId();
|
||||
long clusterId = plan.getClusterId();
|
||||
Long podId = plan.getPodId();
|
||||
Long clusterId = plan.getClusterId();
|
||||
ServiceOffering offering = vmProfile.getServiceOffering();
|
||||
VMTemplateVO template = (VMTemplateVO)vmProfile.getTemplate();
|
||||
|
||||
|
||||
@ -53,8 +53,8 @@ public class RandomAllocator implements HostAllocator {
|
||||
ExcludeList avoid, int returnUpTo) {
|
||||
|
||||
long dcId = plan.getDataCenterId();
|
||||
long podId = plan.getPodId();
|
||||
long clusterId = plan.getClusterId();
|
||||
Long podId = plan.getPodId();
|
||||
Long clusterId = plan.getClusterId();
|
||||
ServiceOffering offering = vmProfile.getServiceOffering();
|
||||
|
||||
List<Host> suitableHosts = new ArrayList<Host>();
|
||||
|
||||
@ -59,8 +59,8 @@ public class FirstFitStoragePoolAllocator extends AbstractStoragePoolAllocator {
|
||||
return suitablePools;
|
||||
}
|
||||
long dcId = plan.getDataCenterId();
|
||||
long podId = plan.getPodId();
|
||||
long clusterId = plan.getClusterId();
|
||||
Long podId = plan.getPodId();
|
||||
Long clusterId = plan.getClusterId();
|
||||
|
||||
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()));
|
||||
|
||||
@ -57,8 +57,8 @@ public class RandomStoragePoolAllocator extends AbstractStoragePoolAllocator {
|
||||
return suitablePools;
|
||||
}
|
||||
long dcId = plan.getDataCenterId();
|
||||
long podId = plan.getPodId();
|
||||
long clusterId = plan.getClusterId();
|
||||
Long podId = plan.getPodId();
|
||||
Long clusterId = plan.getClusterId();
|
||||
s_logger.debug("Looking for pools in dc: " + dcId + " pod:" + podId + " cluster:" + clusterId);
|
||||
List<StoragePoolVO> pools = _storagePoolDao.listBy(dcId, podId, clusterId);
|
||||
if (pools.size() == 0) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user