use of org.ovirt.engine.core.common.action.SyncLunsParameters in project ovirt-engine by oVirt.
the class SyncAllUsedLunsCommand method syncStorageDomainsLuns.
private void syncStorageDomainsLuns(List<LUNs> deviceList) {
SyncLunsParameters parameters = new SyncLunsParameters(getParameters().getStoragePoolId(), deviceList);
runInternalAction(ActionType.SyncAllStorageDomainsLuns, parameters);
}
use of org.ovirt.engine.core.common.action.SyncLunsParameters in project ovirt-engine by oVirt.
the class UpdateStoragePoolCommand method syncAllUsedLunsInStoragePool.
/**
* Synchronizes all the direct luns that are attached to a vm in the storage pool,
* and all the active block storage domains' luns.
*/
private void syncAllUsedLunsInStoragePool() {
if (discardInformationWasIntroduced() || reduceDeviceFromStorageDomainWasIntroduced()) {
if (getOldStoragePool().getStatus() == StoragePoolStatus.Up) {
/*
- We don't want to fail the whole storage pool upgrade because some of the
luns could not be synced, so SyncAllUsedLuns only logs errors on such cases.
*/
runInternalAction(ActionType.SyncAllUsedLuns, new SyncLunsParameters(getStoragePoolId()));
} else {
List<DiskLunMap> diskLunMapsForVmsInPool = diskLunMapDao.getDiskLunMapsForVmsInPool(getStoragePoolId());
if (!diskLunMapsForVmsInPool.isEmpty()) {
addCustomValue("DirectLunDisksIds", diskLunMapsForVmsInPool.stream().map(DiskLunMap::getDiskId).map(Guid::toString).collect(Collectors.joining(", ")));
auditLogDirector.log(this, AuditLogType.DIRECT_LUNS_COULD_NOT_BE_SYNCED);
}
}
}
}
Aggregations