Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@
import org.ovirt.engine.core.vdsbroker.ResourceManager;
import org.ovirt.engine.core.vdsbroker.TransportFactory;
import org.ovirt.engine.core.vdsbroker.storage.StoragePoolDomainHelper;
import org.ovirt.engine.core.vdsbroker.vdsbroker.VDSNetworkException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down Expand Up @@ -299,6 +298,7 @@ private void proceedStoragePoolStats(StoragePool storagePool) {
new SpmStatusVDSCommandParameters(curVdsId, storagePoolId));
}

// if spm status didn't work or not spm then cause failover with attempts
if (result == null
|| !result.getSucceeded()
|| result.getSucceeded() && ((SpmStatusResult) result.getReturnValue()).getSpmStatus() != SpmStatus.SPM) {
Expand All @@ -316,10 +316,7 @@ private void proceedStoragePoolStats(StoragePool storagePool) {
}
}

// if spm status didn't work or not spm and NOT NETWORK
// PROBLEM
// then cause failover with attempts
if (result != null && !(result.getExceptionObject() instanceof VDSNetworkException)) {
if (curVdsId != null) { // If there was already SPM host, then we can start failover process
Map<Guid, AsyncTaskStatus> tasksList =
(Map<Guid, AsyncTaskStatus>) resourceManager
.runVdsCommand(VDSCommandType.HSMGetAllTasksStatuses,
Expand All @@ -336,7 +333,7 @@ private void proceedStoragePoolStats(StoragePool storagePool) {
if (tasksList == null || allTasksFinished) {
nullifyInternalProxies();
} else {
if (_errorAttempts < Config.<Integer> getValue(ConfigValues.SPMFailOverAttempts)) {
if (_errorAttempts < Config.<Integer>getValue(ConfigValues.SPMFailOverAttempts)) {
_errorAttempts++;
log.warn("failed getting spm status for pool '{}' ({}), attempt number: {}",
storagePoolId, storagePool.getName(), _errorAttempts);
Expand Down