GabrielBrascher commented on a change in pull request #4978:
URL: https://github.com/apache/cloudstack/pull/4978#discussion_r643946838
##########
File path:
plugins/hypervisors/kvm/src/main/java/com/cloud/ha/KVMInvestigator.java
##########
@@ -101,24 +115,29 @@ public Status isAgentAlive(Host agent) {
hostStatus = answer.getResult() ? Status.Down : Status.Up;
}
} catch (Exception e) {
- s_logger.debug("Failed to send command to host: " + agent.getId());
+ s_logger.debug(String.format("Failed to send command to %s",
agent));
Review comment:
Thanks for bringing it up @GutoVeronezi, these are pertinent questions.
This is a perfect case of _Pokémon catch_ (catch them all). To be honest, I
cannot even find how an Exception could be raised by
`AgentManagementImpl.easySend` as the method itself handles `Exception`.
I was inclined to simply remove it; however, I avoided changing any behavior
of the HeartBeat execution flow avoiding any regression issue.
I will take a double-check at this `easySend` catch.
But it is a good thing to pay attention to, if I do not change it at this PR
we can always plan another PR/issue cleaning some of these catches.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]