SadiJr commented on code in PR #7214:
URL: https://github.com/apache/cloudstack/pull/7214#discussion_r1330518896


##########
api/src/main/java/com/cloud/deploy/DeploymentPlanner.java:
##########
@@ -104,13 +107,26 @@ public ExcludeList(Set<Long> dcIds, Set<Long> podIds, 
Set<Long> clusterIds, Set<
             }
         }
 
+        private void logAvoid(Class<?> scope, CloudException e) {
+            Long id = null;
+            if (e instanceof InsufficientCapacityException) {
+                id = ((InsufficientCapacityException) e).getId();
+            } else if (e instanceof ResourceUnavailableException) {
+                id = ((ResourceUnavailableException) e).getResourceId();
+            } else {
+                LOGGER.trace(String.format("Failed to log avoided component 
due to unexpected exception type [%s].", e.getMessage()));
+                return;
+            }
+            LOGGER.trace(String.format("Adding %s [%s] to the avoid set due to 
[%s].", scope.getSimpleName(), id, e.getMessage()));

Review Comment:
   Changed to debug, thanks for the suggestion.



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