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
3232479106
commit
e001d7e577
|
|
@ -142,7 +142,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
|
||||
|
|
|
|||
|
|
@ -1299,6 +1299,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