You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by ty...@apache.org on 2020/09/09 00:40:59 UTC

[openwhisk] branch master updated: fixing ContainerProxy - don't terminate early on failures (#4969)

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

tysonnorris 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 4956362  fixing ContainerProxy - don't terminate early on failures (#4969)
4956362 is described below

commit 4956362f8f9feb217d3c96feb644cdb2ffb7ee6c
Author: tysonnorris <tn...@adobe.com>
AuthorDate: Tue Sep 8 17:40:39 2020 -0700

    fixing ContainerProxy - don't terminate early on failures (#4969)
    
    * fixing ContainerProxy - don't terminate early on failures
    
    * cleanup
---
 .../org/apache/openwhisk/core/containerpool/ContainerProxy.scala      | 4 +++-
 .../openwhisk/core/containerpool/test/ContainerProxyTests.scala       | 4 ++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/ContainerProxy.scala b/core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/ContainerProxy.scala
index 7a255fa..ab26b01 100644
--- a/core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/ContainerProxy.scala
+++ b/core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/ContainerProxy.scala
@@ -335,6 +335,7 @@ class ContainerProxy(factory: (TransactionId,
             // implicitly via a FailureMessage which will be processed later when the state
             // transitions to Running
             val activation = ContainerProxy.constructWhiskActivation(job, None, Interval.zero, false, response)
+
             sendActiveAck(
               transid,
               activation,
@@ -497,7 +498,8 @@ class ContainerProxy(factory: (TransactionId,
       activeCount -= 1
       context.parent ! ContainerRemoved(true)
       abortBuffered()
-      stop()
+      rescheduleJob = true
+      goto(Removing)
 
     case _ => delay
   }
diff --git a/tests/src/test/scala/org/apache/openwhisk/core/containerpool/test/ContainerProxyTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/containerpool/test/ContainerProxyTests.scala
index 1c80bd6..51285cf 100644
--- a/tests/src/test/scala/org/apache/openwhisk/core/containerpool/test/ContainerProxyTests.scala
+++ b/tests/src/test/scala/org/apache/openwhisk/core/containerpool/test/ContainerProxyTests.scala
@@ -1307,7 +1307,7 @@ class ContainerProxyTests
 
     expectMsg(ContainerRemoved(true))
     //go to Removing state when a failure happens while others are in flight
-    expectNoMessage(100.milliseconds)
+    expectMsg(Transition(machine, Running, Removing))
     awaitAssert {
       factory.calls should have size 1
       container.initializeCount shouldBe 0
@@ -1437,7 +1437,7 @@ class ContainerProxyTests
     machine ! Run(action, message)
     expectMsg(Transition(machine, Uninitialized, Running))
     expectMsg(ContainerRemoved(true))
-
+    expectMsg(Transition(machine, Running, Removing))
     awaitAssert {
       factory.calls should have size 1
       container.initializeCount shouldBe 0