mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
Check there is at least a host to verify pool compatibility for a storage policy
This commit is contained in:
parent
795dc01212
commit
7d7e7f7941
@ -1496,6 +1496,10 @@ public class VmwareManagerImpl extends ManagerBase implements VmwareManager, Vmw
|
|||||||
for (StoragePoolVO pool : poolsInZone) {
|
for (StoragePoolVO pool : poolsInZone) {
|
||||||
StorageFilerTO storageFilerTO = new StorageFilerTO(pool);
|
StorageFilerTO storageFilerTO = new StorageFilerTO(pool);
|
||||||
List<Long> hostIds = storageManager.getUpHostsInPool(pool.getId());
|
List<Long> hostIds = storageManager.getUpHostsInPool(pool.getId());
|
||||||
|
if (CollectionUtils.isNullOrEmpty(hostIds)) {
|
||||||
|
s_logger.debug("Did not find a suitable host to verify compatibility of the pool " + pool.getName());
|
||||||
|
continue;
|
||||||
|
}
|
||||||
Collections.shuffle(hostIds);
|
Collections.shuffle(hostIds);
|
||||||
CheckDataStoreStoragePolicyComplainceCommand command = new CheckDataStoreStoragePolicyComplainceCommand(storagePolicy.getPolicyId(), storageFilerTO);
|
CheckDataStoreStoragePolicyComplainceCommand command = new CheckDataStoreStoragePolicyComplainceCommand(storagePolicy.getPolicyId(), storageFilerTO);
|
||||||
long targetHostId = hypervisorGuruManager.getGuruProcessedCommandTargetHost(hostIds.get(0), command);
|
long targetHostId = hypervisorGuruManager.getGuruProcessedCommandTargetHost(hostIds.get(0), command);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user