use of org.ovirt.engine.core.common.action.SetStoragePoolStatusParameters in project ovirt-engine by oVirt.
the class VdsNotRespondingTreatmentCommand method setStoragePoolNonOperational.
private void setStoragePoolNonOperational() {
log.info("Fence failed on vds '{}' which is spm of pool '{}' - moving pool to non operational", getVds().getName(), getVds().getStoragePoolId());
CommandContext commandContext = getContext().clone();
// CommandContext clone is 'shallow' and does not clone the internal ExecutionContext.
// So ExecutionContext is cloned here manually to prevent a bug (BZ1145099).
commandContext.withExecutionContext(new ExecutionContext(commandContext.getExecutionContext()));
runInternalAction(ActionType.SetStoragePoolStatus, new SetStoragePoolStatusParameters(getVds().getStoragePoolId(), StoragePoolStatus.NotOperational, AuditLogType.SYSTEM_CHANGE_STORAGE_POOL_STATUS_NO_HOST_FOR_SPM), commandContext);
}
use of org.ovirt.engine.core.common.action.SetStoragePoolStatusParameters in project ovirt-engine by oVirt.
the class VdsEventListener method storagePoolStatusChange.
@Override
public void storagePoolStatusChange(Guid storagePoolId, StoragePoolStatus status, AuditLogType auditLogType, EngineError error, TransactionScopeOption transactionScopeOption) {
SetStoragePoolStatusParameters tempVar = new SetStoragePoolStatusParameters(storagePoolId, status, auditLogType);
tempVar.setError(error);
if (transactionScopeOption != null) {
tempVar.setTransactionScopeOption(transactionScopeOption);
}
backend.runInternalAction(ActionType.SetStoragePoolStatus, tempVar);
}
use of org.ovirt.engine.core.common.action.SetStoragePoolStatusParameters in project ovirt-engine by oVirt.
the class StoragePoolStatusHandler method nonOperationalPoolTreatment.
private static void nonOperationalPoolTreatment(StoragePool pool) {
boolean changeStatus = false;
if (getAllRunningVdssInPool(pool).size() > 0) {
changeStatus = true;
}
if (changeStatus) {
log.info("Moving data center '{}' with Id '{}' to status Problematic from status NotOperational on a one" + " time basis to try to recover", pool.getName(), pool.getId());
Backend.getInstance().runInternalAction(ActionType.SetStoragePoolStatus, new SetStoragePoolStatusParameters(pool.getId(), StoragePoolStatus.NonResponsive, AuditLogType.SYSTEM_CHANGE_STORAGE_POOL_STATUS_PROBLEMATIC_FROM_NON_OPERATIONAL));
synchronized (nonOperationalPools) {
nonOperationalPools.remove(pool.getId());
}
}
}
Aggregations