DaanHoogland commented on code in PR #11981:
URL: https://github.com/apache/cloudstack/pull/11981#discussion_r2548973940


##########
engine/orchestration/src/main/java/com/cloud/vm/VirtualMachineManagerImpl.java:
##########
@@ -935,7 +935,7 @@ public void start(final String vmUuid, final 
Map<VirtualMachineProfile.Param, Ob
             throw new CloudRuntimeException(String.format("Unable to start a 
VM [%s] due to [%s].", vmUuid, e.getMessage()), e).add(VirtualMachine.class, 
vmUuid);
         } catch (final ResourceUnavailableException e) {
             if (e.getScope() != null && 
e.getScope().equals(VirtualRouter.class)){
-                throw new CloudRuntimeException("Network is unavailable. 
Please contact administrator", e).add(VirtualMachine.class, vmUuid);
+                throw new CloudRuntimeException("The Guest Network is 
unavailable. Please contact administrator: " + 
e.getMessage()).add(VirtualMachine.class, vmUuid);

Review Comment:
   @daviftorres , I think @nvazquez means to make the output in the exception 
conditions of whether the calling user is a root admin or some other type of 
user.
   ```suggestion
                   if (callingUser.isRootAdmin()) {
                       throw new CloudRuntimeException("The Guest Network is 
unavailable: " + e.getMessage()).add(VirtualMachine.class, vmUuid);
                   } else {
                       throw new CloudRuntimeException("The Guest Network is 
unavailable. Please contact administrator. ").add(VirtualMachine.class, vmUuid);
                   }
   ```
   (NOTE: needs testing)



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