Search in sources :

Example 11 with Event

use of org.ovirt.engine.core.common.eventqueue.Event 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

Event (org.ovirt.engine.core.common.eventqueue.Event)11 EventResult (org.ovirt.engine.core.common.eventqueue.EventResult)6 Guid (org.ovirt.engine.core.compat.Guid)6 StoragePoolIsoMap (org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap)3 VDS (org.ovirt.engine.core.common.businessentities.VDS)3 ArrayList (java.util.ArrayList)2 StorageDomain (org.ovirt.engine.core.common.businessentities.StorageDomain)2 AuditLogable (org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogable)2 AuditLogableImpl (org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableImpl)2 HashMap (java.util.HashMap)1 Map (java.util.Map)1 Callable (java.util.concurrent.Callable)1 ConcurrentHashMap (java.util.concurrent.ConcurrentHashMap)1 ReentrantLock (java.util.concurrent.locks.ReentrantLock)1 AfterDeactivateSingleAsyncOperationFactory (org.ovirt.engine.core.bll.storage.pool.AfterDeactivateSingleAsyncOperationFactory)1 DisconnectStoragePoolAsyncOperationFactory (org.ovirt.engine.core.bll.storage.pool.DisconnectStoragePoolAsyncOperationFactory)1 RefreshPoolSingleAsyncOperationFactory (org.ovirt.engine.core.bll.storage.pool.RefreshPoolSingleAsyncOperationFactory)1 ActionReturnValue (org.ovirt.engine.core.common.action.ActionReturnValue)1 SetNonOperationalVdsParameters (org.ovirt.engine.core.common.action.SetNonOperationalVdsParameters)1 StorageDomainStatic (org.ovirt.engine.core.common.businessentities.StorageDomainStatic)1