ysjjovo commented on a change in pull request #4424: Delete pod when creating 
timeout
URL: 
https://github.com/apache/incubator-openwhisk/pull/4424#discussion_r272036666
 
 

 ##########
 File path: 
core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/kubernetes/KubernetesClient.scala
 ##########
 @@ -170,6 +170,15 @@ class KubernetesClient(
       }
     }.recoverWith {
       case e =>
+        Future {
+          kubeRestClient
+            .inNamespace(kubeRestClient.getNamespace)
+            .pods()
+            .withName(name)
+            .delete()
+        }.recover {
+          case ex => log.error(this, s"Failed delete pod for '$name': 
${ex.getClass} - ${ex.getMessage}")
+        }
 
 Review comment:
   I'am scala newbie,You consideration is right,thanks for your advice!I'll do 
that as you suggested!

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to