DaanHoogland commented on a change in pull request #4707:
URL: https://github.com/apache/cloudstack/pull/4707#discussion_r584515890
##########
File path: server/src/main/java/org/apache/cloudstack/ha/HAManagerImpl.java
##########
@@ -315,14 +321,10 @@ public Status getHostStatus(final Host host) {
final HAConfig haConfig = haConfigDao.findHAResource(host.getId(),
HAResource.ResourceType.Host);
if (haConfig != null) {
if (haConfig.getState() == HAConfig.HAState.Fenced) {
- if (LOG.isDebugEnabled()){
- LOG.debug("HA: Agent is available/suspect/checking Up " +
host.getId());
- }
+ LOG.debug(String.format("HA: Agent [%s] is
available/suspect/checking Up.", host.getId()));
return Status.Down;
} else if (haConfig.getState() == HAConfig.HAState.Degraded ||
haConfig.getState() == HAConfig.HAState.Recovering || haConfig.getState() ==
HAConfig.HAState.Fencing) {
- if (LOG.isDebugEnabled()){
- LOG.debug("HA: Agent is disconnected " + host.getId());
- }
+ LOG.debug(String.format("HA: Agent [%s] is disconnected.
State: %s, %s.", host.getId(), haConfig.getState(),
haConfig.getState().getDescription()));
Review comment:
I still really don't like this
----------------------------------------------------------------
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]