You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2018/11/13 09:29:53 UTC

[GitHub] chetanmeh commented on a change in pull request #4109: update mesos-actor; cleanup orphaned failed task launches

chetanmeh commented on a change in pull request #4109: update mesos-actor; cleanup orphaned failed task launches
URL: https://github.com/apache/incubator-openwhisk/pull/4109#discussion_r232952018
 
 

 ##########
 File path: common/scala/src/main/scala/org/apache/openwhisk/core/mesos/MesosTask.scala
 ##########
 @@ -142,9 +140,14 @@ object MesosTask {
           transid.finished(this, start, s"launched task ${taskId} at ${taskDetails.hostname}:${taskDetails
             .hostports(0)}", logLevel = InfoLevel)
         case Failure(ate: AskTimeoutException) =>
-          transid.failed(this, start, ate.getMessage, ErrorLevel)
+          transid.failed(this, start, s"task launch timed out ${ate.getMessage}", ErrorLevel)
           MetricEmitter.emitCounterMetric(LoggingMarkers.INVOKER_MESOS_CMD_TIMEOUT(LAUNCH_CMD))
-        case Failure(t) => transid.failed(this, start, t.getMessage, ErrorLevel)
+          //kill the task whose launch timed out
+          destroy(mesosClientActor, mesosConfig, taskId)
+        case Failure(t) =>
+          //kill the task whose launch timed out
+          destroy(mesosClientActor, mesosConfig, taskId)
 
 Review comment:
   Note that the future returned by `destroy` for `andThen` call would be discarded so its more like ask and forget here. Is that the intention or it would be better to have destroy completed by the time `create`s resulting future completes?

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