Search in sources :

Example 11 with EventResult

use of org.ovirt.engine.core.common.eventqueue.EventResult in project ovirt-engine by oVirt.

the class InitVdsOnUpCommand method connectHostToPool.

/**
 * The following method should connect host to pool
 * The method will perform a connect storage pool operation,
 * if operation will wail on StoragePoolWrongMaster or StoragePoolMasterNotFound errors
 * we will try to run reconstruct
 */
private EventResult connectHostToPool() {
    final VDS vds = getVds();
    EventResult result = eventQueue.submitEventSync(new Event(getStoragePool().getId(), null, vds.getId(), EventType.VDSCONNECTTOPOOL, "Trying to connect host " + vds.getHostName() + " with id " + vds.getId() + " to the pool " + getStoragePool().getId()), () -> runConnectHostToPoolEvent(getStoragePool().getId(), vds));
    return result;
}
Also used : EventResult(org.ovirt.engine.core.common.eventqueue.EventResult) VDS(org.ovirt.engine.core.common.businessentities.VDS) Event(org.ovirt.engine.core.common.eventqueue.Event)

Aggregations

EventResult (org.ovirt.engine.core.common.eventqueue.EventResult)11 Event (org.ovirt.engine.core.common.eventqueue.Event)6 StoragePoolIsoMap (org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap)4 ArrayList (java.util.ArrayList)3 VDS (org.ovirt.engine.core.common.businessentities.VDS)3 Guid (org.ovirt.engine.core.compat.Guid)3 HashMap (java.util.HashMap)2 Map (java.util.Map)2 ConcurrentHashMap (java.util.concurrent.ConcurrentHashMap)2 StorageDomain (org.ovirt.engine.core.common.businessentities.StorageDomain)2 StorageDomainStatic (org.ovirt.engine.core.common.businessentities.StorageDomainStatic)2 StoragePool (org.ovirt.engine.core.common.businessentities.StoragePool)2 VdsSpmIdMap (org.ovirt.engine.core.common.businessentities.VdsSpmIdMap)2 EngineException (org.ovirt.engine.core.common.errors.EngineException)2 List (java.util.List)1 Callable (java.util.concurrent.Callable)1 ReentrantLock (java.util.concurrent.locks.ReentrantLock)1 CommandContext (org.ovirt.engine.core.bll.context.CommandContext)1 ActionParametersBase (org.ovirt.engine.core.common.action.ActionParametersBase)1 ActionReturnValue (org.ovirt.engine.core.common.action.ActionReturnValue)1