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 2019/04/04 06:49:10 UTC

[GitHub] [incubator-openwhisk] ysjjovo commented on a change in pull request #4424: Delete pod when creating timeout

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:
users@infra.apache.org


With regards,
Apache Git Services