You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2017/12/08 11:05:46 UTC
[GitHub] niteshsarda commented on a change in pull request #2354: CLOUDSTACK-10176:VM Start Api Job returns success for failed Job
niteshsarda commented on a change in pull request #2354: CLOUDSTACK-10176:VM Start Api Job returns success for failed Job
URL: https://github.com/apache/cloudstack/pull/2354#discussion_r155753174
##########
File path: engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java
##########
@@ -4731,7 +4732,8 @@ protected VirtualMachine retrieve() {
}
catch (CloudRuntimeException e){
s_logger.info("Caught CloudRuntimeException, returning job failed");
- return new Pair<JobInfo.Status, String>(JobInfo.Status.FAILED, null);
+ CloudRuntimeException ex = new CloudRuntimeException("Unable to start VM instance : " + e);
+ return new Pair<JobInfo.Status, String>(JobInfo.Status.FAILED, JobSerializerHelper.toObjectSerializedString(ex));
Review comment:
@rhtyd : Only intention to create a new CloudRuntimeException ex is that proper error text can be shown to user in the output of startVirtualMachine API. Following is the output, user will get after this fix :
`2017-12-06 17:11:10,329 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (API-Job-Executor-3:ctx-a8a7ec4b job-355) (logid:92a01680) Complete async job-355, jobStatus: FAILED, resultCode: 530, result: org.apache.cloudstack.api.response.ExceptionResponse/null/{"uuidList":[],"errorcode":530,"**errortext":"Unable to start VM instance**`
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services