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);
}
}
Aggregations