bug 9456: added the host id that was already tried to avoid list. Added more debug logs in case that condition happens.

This commit is contained in:
Alex Huang 2011-04-28 14:43:44 -07:00
parent a1fa03ab4b
commit b273d74c35
2 changed files with 10 additions and 2 deletions

View File

@ -1789,9 +1789,9 @@ public class StorageManagerImpl implements StorageManager, StorageService, Manag
}
return new Pair<Long, Answer[]>(hostId, answers.toArray(new Answer[answers.size()]));
} catch (AgentUnavailableException e) {
s_logger.debug("Unable to send storage pool command to " + pool, e);
s_logger.debug("Unable to send storage pool command to " + pool + " via " + hostId, e);
} catch (OperationTimedoutException e) {
s_logger.debug("Unable to send storage pool command to " + pool, e);
s_logger.debug("Unable to send storage pool command to " + pool + " via " + hostId, e);
}
}

View File

@ -216,6 +216,10 @@ public class SnapshotManagerImpl implements SnapshotManager, SnapshotService, Ma
if (result.second().getResult()) {
return result.second();
}
if (s_logger.isDebugEnabled()) {
s_logger.debug("The result for " + cmd.getClass().getName() + " is " + result.second().getDetails() + " through " + result.first());
}
hostIdsToAvoid.add(result.first());
} catch (StorageUnavailableException e1) {
s_logger.warn("Storage unavailable ", e1);
return null;
@ -225,7 +229,11 @@ public class SnapshotManagerImpl implements SnapshotManager, SnapshotService, Ma
Thread.sleep(_pauseInterval * 1000);
} catch (InterruptedException e) {
}
s_logger.debug("Retrying...");
}
s_logger.warn("After " + _totalRetries + " retries, the command " + cmd.getClass().getName() + " did not succeed.");
return null;
}