mirror of https://github.com/apache/cloudstack.git
bug : 6095 Show proper error when vm create fails due to insufficient capacity
This commit is contained in:
parent
576e4f163b
commit
0765e4b5e2
|
|
@ -143,7 +143,7 @@ public class UserConcentratedAllocator implements PodAllocator {
|
|||
}
|
||||
|
||||
if (availablePods.size() == 0) {
|
||||
s_logger.debug("There are no pods with enough memory/CPU capacity in zone" + zone.getName());
|
||||
s_logger.debug("There are no pods with enough memory/CPU capacity in zone " + zone.getName());
|
||||
return null;
|
||||
} else {
|
||||
// Return a random pod
|
||||
|
|
|
|||
|
|
@ -1511,6 +1511,10 @@ public class UserVmManagerImpl implements UserVmManager {
|
|||
podsToAvoid.add(pod.first().getId());
|
||||
}
|
||||
|
||||
if(pod == null){
|
||||
throw new ResourceAllocationException("Create VM " + ((vm == null) ? vmId : vm.toString()) + " failed. There are no pods with enough CPU/memory");
|
||||
}
|
||||
|
||||
if ((vm == null) || (poolid == 0)) {
|
||||
throw new ResourceAllocationException("Create VM " + ((vm == null) ? vmId : vm.toString()) + " failed due to no Storage Pool is available");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue