This is an automated email from the ASF dual-hosted git repository.

rabbah pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openwhisk.git


The following commit(s) were added to refs/heads/master by this push:
     new 4babe39  Make runtime delete timeout configurable (#5028)
4babe39 is described below

commit 4babe39fd2dbcc900ccedb5a5e9561d301361205
Author: ningyougang <[email protected]>
AuthorDate: Fri Nov 20 12:32:50 2020 +0800

    Make runtime delete timeout configurable (#5028)
    
    Co-authored-by: ning.yougang <[email protected]>
---
 core/invoker/src/main/resources/application.conf                       | 1 +
 .../core/containerpool/kubernetes/KubernetesContainerFactory.scala     | 3 ++-
 core/standalone/src/main/resources/standalone-kcf.conf                 | 1 +
 tests/src/test/resources/application.conf.j2                           | 1 +
 4 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/core/invoker/src/main/resources/application.conf 
b/core/invoker/src/main/resources/application.conf
index 8ddb68d..be68333 100644
--- a/core/invoker/src/main/resources/application.conf
+++ b/core/invoker/src/main/resources/application.conf
@@ -173,4 +173,5 @@ whisk {
   invoker {
     protocol: http
   }
+  runtime.delete.timeout = "30 seconds"
 }
diff --git 
a/core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/kubernetes/KubernetesContainerFactory.scala
 
b/core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/kubernetes/KubernetesContainerFactory.scala
index a73cb0d..8292eba 100644
--- 
a/core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/kubernetes/KubernetesContainerFactory.scala
+++ 
b/core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/kubernetes/KubernetesContainerFactory.scala
@@ -64,7 +64,7 @@ class KubernetesContainerFactory(
     logging.info(this, "Cleaning up function runtimes")
     val labels = Map("invoker" -> label, "release" -> 
KubernetesContainerFactoryProvider.release)
     val cleaning = kubernetes.rm(labels, true)(TransactionId.invokerNanny)
-    Await.ready(cleaning, 30.seconds)
+    Await.ready(cleaning, 
KubernetesContainerFactoryProvider.runtimeDeleteTimeout)
   }
 
   override def createContainer(tid: TransactionId,
@@ -90,6 +90,7 @@ class KubernetesContainerFactory(
 object KubernetesContainerFactoryProvider extends ContainerFactoryProvider {
 
   val release = loadConfigOrThrow[String]("whisk.helm.release")
+  val runtimeDeleteTimeout = 
loadConfigOrThrow[FiniteDuration]("whisk.runtime.delete.timeout")
 
   override def instance(actorSystem: ActorSystem,
                         logging: Logging,
diff --git a/core/standalone/src/main/resources/standalone-kcf.conf 
b/core/standalone/src/main/resources/standalone-kcf.conf
index 5ab38b1..9194d80 100644
--- a/core/standalone/src/main/resources/standalone-kcf.conf
+++ b/core/standalone/src/main/resources/standalone-kcf.conf
@@ -34,4 +34,5 @@ whisk {
     port-forwarding-enabled = true
   }
   helm.release = "release"
+  runtime.delete.timeout = "30 seconds"
 }
diff --git a/tests/src/test/resources/application.conf.j2 
b/tests/src/test/resources/application.conf.j2
index e2eaa0f..53d1cc9 100644
--- a/tests/src/test/resources/application.conf.j2
+++ b/tests/src/test/resources/application.conf.j2
@@ -103,6 +103,7 @@ whisk {
     }
 
     helm.release = "release"
+    runtime.delete.timeout = "30 seconds"
 }
 
 #test-only overrides so that tests can override defaults in application.conf 
(todo: move all defaults to reference.conf)

Reply via email to