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


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

Review Comment:
   Done, thanks



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