Github user marcaurele commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1832#discussion_r92676861 --- Diff: engine/orchestration/src/com/cloud/agent/manager/AgentAttache.java --- @@ -399,10 +414,22 @@ public void send(final Request req, final Listener listener) throws AgentUnavail try { for (int i = 0; i < 2; i++) { Answer[] answers = null; + job = _agentMgr._asyncJobDao.findById(jobId); + if (job != null && job.getStatus() == JobInfo.Status.CANCELLED) { + throw new OperationCancelledException(req.getCommands(), _id, seq, wait, false); + } try { answers = sl.waitFor(wait); + job = _agentMgr._asyncJobDao.findById(jobId); + if (job != null && job.getStatus() == JobInfo.Status.CANCELLED) { + throw new OperationCancelledException(req.getCommands(), _id, seq, wait, false); --- End diff -- Why do you want to throw an `OperationCancelledException` if the we have the job answer. It's better to let the normal response come back to the user.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---