Search in sources :

Example 1 with IRSErrorException

use of org.ovirt.engine.core.vdsbroker.irsbroker.IRSErrorException in project ovirt-engine by oVirt.

the class VdsManager method afterRefreshTreatment.

public void afterRefreshTreatment(boolean succeeded) {
    if (!succeeded) {
        lockManager.releaseLock(monitoringLock);
        return;
    }
    try {
        synchronized (this) {
            unrespondedAttempts.set(0);
            setLastUpdate();
            Guid storagePoolId = null;
            ArrayList<VDSDomainsData> domainsList = null;
            try {
                hostMonitoring.afterRefreshTreatment();
                // the storage anymore (so there is no sense in updating the domains list in that case).
                if (cachedVds != null && cachedVds.getStatus() != VDSStatus.Maintenance) {
                    storagePoolId = cachedVds.getStoragePoolId();
                    domainsList = cachedVds.getDomains();
                }
                hostMonitoring = null;
            } catch (IRSErrorException ex) {
                logAfterRefreshFailureMessage(ex);
                if (log.isDebugEnabled()) {
                    logException(ex);
                }
            } catch (RuntimeException ex) {
                logAfterRefreshFailureMessage(ex);
                logException(ex);
            }
            // synchronized part of code
            if (domainsList != null) {
                updateVdsDomainsData(cachedVds, storagePoolId, domainsList);
            }
        }
    } catch (Exception e) {
        log.error("Timer update runtime info failed. Exception:", ExceptionUtils.getRootCauseMessage(e));
        log.debug("Exception:", e);
    } finally {
        lockManager.releaseLock(monitoringLock);
    }
}
Also used : VDSDomainsData(org.ovirt.engine.core.common.businessentities.VDSDomainsData) IRSErrorException(org.ovirt.engine.core.vdsbroker.irsbroker.IRSErrorException) Guid(org.ovirt.engine.core.compat.Guid) VDSNetworkException(org.ovirt.engine.core.vdsbroker.vdsbroker.VDSNetworkException) IRSErrorException(org.ovirt.engine.core.vdsbroker.irsbroker.IRSErrorException) VDSRecoveringException(org.ovirt.engine.core.vdsbroker.vdsbroker.VDSRecoveringException)

Aggregations

VDSDomainsData (org.ovirt.engine.core.common.businessentities.VDSDomainsData)1 Guid (org.ovirt.engine.core.compat.Guid)1 IRSErrorException (org.ovirt.engine.core.vdsbroker.irsbroker.IRSErrorException)1 VDSNetworkException (org.ovirt.engine.core.vdsbroker.vdsbroker.VDSNetworkException)1 VDSRecoveringException (org.ovirt.engine.core.vdsbroker.vdsbroker.VDSRecoveringException)1