slavkap commented on pull request #4878:
URL: https://github.com/apache/cloudstack/pull/4878#issuecomment-889726562


   @DaanHoogland, I've tested with the latest changes and it works as expected. 
I have only one suggestion, @GutoVeronezi, if you can add in 
VirtualMachineManagerImpl::reConfigureVM to check for RuntimeException.
   ```
   else if (jobResult instanceof RuntimeException) {
           throw (RuntimeException)jobResult;
   }
   ```
   
   Someone on the mailing list complained that CS does not send proper error 
msgs to the users in some cases.
   
   > {
   >   "accountid": "b3e15775-77f4-11eb-a307-02000a0201ba",
   >   "cmd": "org.apache.cloudstack.api.command.admin.vm.ScaleVMCmdByAdmin",
   >   "completed": "2021-07-30T10:42:43+0300",
   >   "created": "2021-07-30T10:42:42+0300",
   >   "jobid": "71c2811b-76b9-47fc-b678-e8b737c46d2e",
   >   "jobprocstatus": 0,
   >   "jobresult": {
   >     "errorcode": 530,
   >     "errortext": "Unhandled exception"
   >   },
   >   "jobresultcode": 530,
   >   "jobresulttype": "object",
   >   "jobstatus": 2,
   >   "userid": "b3e18e06-77f4-11eb-a307-02000a0201ba"
   > }
   
   > {
   >   "accountid": "b3e15775-77f4-11eb-a307-02000a0201ba",
   >   "cmd": "org.apache.cloudstack.api.command.admin.vm.ScaleVMCmdByAdmin",
   >   "completed": "2021-07-30T11:10:21+0300",
   >   "created": "2021-07-30T11:10:20+0300",
   >   "jobid": "b4a42cfb-c37f-43ad-aac1-d07a0800bf06",
   >   "jobprocstatus": 0,
   >   "jobresult": {
   >     "errorcode": 530,
   >     "errortext": "Unable to scale vm due to Unable to scale VM {id: 
\"244\", name: \"i-2-244-VM\", uuid: \"917bea0b-78a2-4923-b0a6-8a056c641cc8\", 
type: \"User\"} memory to [4194304 KiB] and CPU cores to [4] due to [The VM 
{id: \"244\", name: \"i-2-244-VM\", uuid: 
\"917bea0b-78a2-4923-b0a6-8a056c641cc8\", type: \"User\"} is not prepared for 
dynamic scaling. To be prepared, the VM must be deployed with a dynamic service 
offering, VM dynamic scale enabled and global setting 
\"enable.dynamic.scale.vm\" as \"true\". If you changed one of these settings 
after deploying the VM, consider stopping and starting it again to prepared it 
to dynamic scaling.]."
   >   },
   >   "jobresultcode": 530,
   >   "jobresulttype": "object",
   >   "jobstatus": 2,
   >   "userid": "b3e18e06-77f4-11eb-a307-02000a0201ba"
   > }


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