DaanHoogland commented on a change in pull request #3563: Limit API from trying 
to start a VM that is already running
URL: https://github.com/apache/cloudstack/pull/3563#discussion_r318014288
 
 

 ##########
 File path: server/src/main/java/com/cloud/vm/UserVmManagerImpl.java
 ##########
 @@ -4591,6 +4591,10 @@ public void finalizeStop(VirtualMachineProfile profile, 
Answer answer) {
             throw new PermissionDeniedException("The owner of " + vm + " is 
disabled: " + vm.getAccountId());
         }
 
+        if (vm.getState()== State.Running){
+            throw new InvalidParameterValueException("The virtual machine "+ 
vm.getDisplayName()+ " is already running");
 
 Review comment:
   or even the id? Who is this message for, I think it can be directed both at 
an end user and at an admin. So maybe regular name or id/displayname 
combination?

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


With regards,
Apache Git Services

Reply via email to