You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by al...@apache.org on 2018/03/19 21:51:54 UTC

mesos git commit: Fixed disconnection for ATTACH_CONTAINER_INPUT call in IOSwitchboard.

Repository: mesos
Updated Branches:
  refs/heads/master aae6d0cc5 -> 02ebf9986


Fixed disconnection for ATTACH_CONTAINER_INPUT call in IOSwitchboard.

Previously, an http response for the `ATTACH_CONTAINER_INPUT` call
could be lost due to immediate termination of the IOSwitchboard
process after the termination of the IOSwitchboard actor. Since the
IOSwitchboard process didn't wait for completion of sending all
responses back to the agent, the agent received disconnection error.
To fix the issue, this patch adds explicit finalization of libprocess
before returning from the IOSwitchboard's main function.

Review: https://reviews.apache.org/r/66147/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/02ebf998
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/02ebf998
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/02ebf998

Branch: refs/heads/master
Commit: 02ebf9986ab5ce883a71df72e9e3392a3e37e40e
Parents: aae6d0c
Author: Andrei Budnik <ab...@mesosphere.com>
Authored: Mon Mar 19 22:48:31 2018 +0100
Committer: Alexander Rukletsov <al...@apache.org>
Committed: Mon Mar 19 22:48:31 2018 +0100

----------------------------------------------------------------------
 src/slave/containerizer/mesos/io/switchboard_main.cpp | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/02ebf998/src/slave/containerizer/mesos/io/switchboard_main.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/io/switchboard_main.cpp b/src/slave/containerizer/mesos/io/switchboard_main.cpp
index 0ff58e1..3838aac 100644
--- a/src/slave/containerizer/mesos/io/switchboard_main.cpp
+++ b/src/slave/containerizer/mesos/io/switchboard_main.cpp
@@ -116,6 +116,8 @@ int main(int argc, char** argv)
                        << " '" + stringify(strsignal(SIGTERM)) << "'";
   }
 
+  process::initialize();
+
   Try<Owned<IOSwitchboardServer>> server = IOSwitchboardServer::create(
       flags.tty,
       flags.stdin_to_fd.get(),
@@ -149,6 +151,11 @@ int main(int argc, char** argv)
   Future<Nothing> run = server.get()->run();
   run.await();
 
+  // NOTE: We need to finalize libprocess, on Windows especially,
+  // as any binary that uses the networking stack on Windows must
+  // also clean up the networking stack before exiting.
+  process::finalize(true);
+
   if (!run.isReady()) {
     EXIT(EXIT_FAILURE) << "The io switchboard server failed: "
                        << (run.isFailed() ? run.failure() : "discarded");