GabrielBrascher commented on a change in pull request #5148:
URL: https://github.com/apache/cloudstack/pull/5148#discussion_r657372616



##########
File path: 
engine/orchestration/src/main/java/org/apache/cloudstack/engine/cloud/entity/api/VMEntityManagerImpl.java
##########
@@ -253,6 +253,8 @@ public void deployVirtualMachine(String reservationId, 
VMEntityVO vmEntityVO, St
                     }
 
                     _itMgr.start(vm.getUuid(), params, plan, null);
+                }else{

Review comment:
       Can you please adjust the formation from  `}else{` to  `} else {`?

##########
File path: 
engine/orchestration/src/main/java/org/apache/cloudstack/engine/cloud/entity/api/VMEntityManagerImpl.java
##########
@@ -253,6 +253,8 @@ public void deployVirtualMachine(String reservationId, 
VMEntityVO vmEntityVO, St
                     }
 
                     _itMgr.start(vm.getUuid(), params, plan, null);
+                }else{
+                    throw ex;

Review comment:
       I would recommend presenting more details to the user/admin. A message 
that gives some context (where/how) regarding this exception could help the 
caller to understand what is going on.
   
   For instance:
   `
   throw new ResourceUnavailableException(String.format("message containing 
details of issue for VM %s", vm));
   `
   
   OR
   
   `
   throw new ResourceUnavailableException(String.format("message containing 
details of issue for VM %s due to exception: %s", vm, ex));
   `




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


Reply via email to