Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 3E1A5160C06 for ; Fri, 15 Dec 2017 12:48:54 +0100 (CET) Received: (qmail 39651 invoked by uid 500); 15 Dec 2017 11:48:53 -0000 Mailing-List: contact commits-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list commits@cloudstack.apache.org Received: (qmail 39642 invoked by uid 99); 15 Dec 2017 11:48:53 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Dec 2017 11:48:53 +0000 From: GitBox To: commits@cloudstack.apache.org Subject: [GitHub] rhtyd closed pull request #2354: CLOUDSTACK-10176:VM Start Api Job returns success for failed Job Message-ID: <151333853282.27881.1447132228337481974.gitbox@gitbox.apache.org> archived-at: Fri, 15 Dec 2017 11:48:54 -0000 rhtyd closed pull request #2354: CLOUDSTACK-10176:VM Start Api Job returns success for failed Job URL: https://github.com/apache/cloudstack/pull/2354 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java b/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java index fe7fcdfd093..74927b9d465 100755 --- a/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java +++ b/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java @@ -38,6 +38,7 @@ import javax.inject.Inject; import javax.naming.ConfigurationException; +import org.apache.cloudstack.framework.jobs.impl.JobSerializerHelper; import com.cloud.agent.api.AttachOrDettachConfigDriveCommand; import org.apache.cloudstack.affinity.dao.AffinityGroupVMMapDao; import org.apache.cloudstack.ca.CAManager; @@ -4730,8 +4731,9 @@ protected VirtualMachine retrieve() { orchestrateStart(vm.getUuid(), work.getParams(), work.getPlan(), _dpMgr.getDeploymentPlannerByName(work.getDeploymentPlanner())); } catch (CloudRuntimeException e){ - s_logger.info("Caught CloudRuntimeException, returning job failed"); - return new Pair(JobInfo.Status.FAILED, null); + s_logger.info("Caught CloudRuntimeException, returning job failed " + e); + CloudRuntimeException ex = new CloudRuntimeException("Unable to start VM instance"); + return new Pair(JobInfo.Status.FAILED, JobSerializerHelper.toObjectSerializedString(ex)); } return new Pair(JobInfo.Status.SUCCEEDED, null); } ---------------------------------------------------------------- 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