shwstppr commented on code in PR #10042:
URL: https://github.com/apache/cloudstack/pull/10042#discussion_r1954440227


##########
server/src/main/java/com/cloud/resource/ResourceManagerImpl.java:
##########
@@ -1840,9 +1840,9 @@ private void handleAutoEnableDisableKVMHost(boolean 
autoEnableDisableKVMSetting,
                 _hostDetailsDao.update(hostDetail.getId(), hostDetail);
             } else if (!isUpdateFromHostHealthCheck && hostDetail != null &&
                     Boolean.parseBoolean(hostDetail.getValue()) && 
resourceEvent == ResourceState.Event.Disable) {
-                logger.info(String.format("The setting %s is enabled but the 
host %s is manually set into %s state," +
+                logger.info("The setting {} is enabled but the host {} is 
manually set into {} state," +
                                 "ignoring future auto enabling of the host 
based on health check results",
-                        AgentManager.EnableKVMAutoEnableDisable.key(), 
host.getName(), resourceEvent));
+                        AgentManager.EnableKVMAutoEnableDisable.key(), 
host.getName(), resourceEvent);

Review Comment:
   ```suggestion
                           AgentManager.EnableKVMAutoEnableDisable.key(), host, 
resourceEvent);
   ```



##########
server/src/main/java/com/cloud/resource/ResourceManagerImpl.java:
##########
@@ -1840,9 +1840,9 @@ private void handleAutoEnableDisableKVMHost(boolean 
autoEnableDisableKVMSetting,
                 _hostDetailsDao.update(hostDetail.getId(), hostDetail);
             } else if (!isUpdateFromHostHealthCheck && hostDetail != null &&
                     Boolean.parseBoolean(hostDetail.getValue()) && 
resourceEvent == ResourceState.Event.Disable) {
-                logger.info(String.format("The setting %s is enabled but the 
host %s is manually set into %s state," +
+                logger.info("The setting {} is enabled but the host {} is 
manually set into {} state," +

Review Comment:
   ```suggestion
                   logger.info("The setting {} is enabled but the {} is 
manually set into {} state," +
   ```



##########
engine/orchestration/src/main/java/com/cloud/agent/manager/AgentManagerImpl.java:
##########
@@ -1399,7 +1399,7 @@ private void processHostHealthCheckResult(Boolean 
hostHealthCheckResult, long ho
             }
             if 
(!BooleanUtils.toBoolean(EnableKVMAutoEnableDisable.valueIn(host.getClusterId())))
 {
                 logger.debug("{} is disabled for the cluster {}, cannot 
process the health check result " +
-                        "received for the host {}", 
EnableKVMAutoEnableDisable.key(), host.getClusterId(), host);
+                        "received for the host {}", 
EnableKVMAutoEnableDisable.key(), host.getClusterId(), host.getName());

Review Comment:
   I would prefer this without `host.getName()` change as then it would give 
more details of hosts using 
   ```suggestion
                           "received for the {}", 
EnableKVMAutoEnableDisable.key(), host.getClusterId(), host);
   ```



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to