[
https://issues.apache.org/jira/browse/MESOS-6469?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Kevin Klues updated MESOS-6469:
-------------------------------
Description:
The new agent API calls for ATTACH_CONTAINER_INPUT and ATTACH_CONTAINER_OUTPUT
are intimately intertwined. That is, most attach operations will likely want to
call both ATTACH_CONTAINER_INPUT and ATTACH_CONTAINER_OUTPUT in order to attach
all three of stdin, stdout and stderr to a local terminal.
Moreover, we plan to allow multiple ATTACH_CONTAINER_OUTPUT calls can be made
for the same container (i.e. from multiple clients), while only one
ATTACH_CONTAINER_INPUT call will be allowed to connect at a time.
In order to ensure that these calls are properly grouped (as well as to ensure
that any state they need to share is properly confined), we will lazily launch
a “per-container” actor to manage all ATTACH_CONTAINER_OUTPUT and
ATTACH_CONTAINER_INPUT calls on behalf of a container.
It will be the responsibility of this actor to:
* Manage the read end of the pipe set up by the HTTP handler for the
ATTACH_CONTAINER_INPUT call for a given container.
* Manage the write end of the pipes set up by the HTTP handler for all
ATTACH_CONTAINER_OUTPUT calls for a given container.
* Establish a connection to a per-container “I/O switchboard” (discussed
below) in order to forward data coming from the ATTACH_CONTAINER_INPUT pipe to
the switchboard.
* Establish a second connection to the per-container “I/O switchboard” to
stream all stdout data coming from the switchboard to all
ATTACH_CONTAINER_OUTPUT pipes.
* Establish a third connection to the per-container “I/O switchboard” to
stream all stderr data coming from the switchboard to all
ATTACH_CONTAINER_OUTPUT pipes.
was:
This will involve updating the mesos logger components to handle on-the-fly
redirecting of {{stdin/stdout/stderr}} for a task. When an attach stream is
initiated, the logger will be informed and will begin to redirect all I/O to
the appropriate channels (both over the HTTP stream and to any necessary files).
This does not involve hooking this support up with the HTTP APIs yet.
> Build an Attach Container Actor
> -------------------------------
>
> Key: MESOS-6469
> URL: https://issues.apache.org/jira/browse/MESOS-6469
> Project: Mesos
> Issue Type: Task
> Reporter: Kevin Klues
> Assignee: Kevin Klues
> Labels: debugging, mesosphere
>
> The new agent API calls for ATTACH_CONTAINER_INPUT and
> ATTACH_CONTAINER_OUTPUT are intimately intertwined. That is, most attach
> operations will likely want to call both ATTACH_CONTAINER_INPUT and
> ATTACH_CONTAINER_OUTPUT in order to attach all three of stdin, stdout and
> stderr to a local terminal.
> Moreover, we plan to allow multiple ATTACH_CONTAINER_OUTPUT calls can be made
> for the same container (i.e. from multiple clients), while only one
> ATTACH_CONTAINER_INPUT call will be allowed to connect at a time.
> In order to ensure that these calls are properly grouped (as well as to
> ensure that any state they need to share is properly confined), we will
> lazily launch a “per-container” actor to manage all ATTACH_CONTAINER_OUTPUT
> and ATTACH_CONTAINER_INPUT calls on behalf of a container.
> It will be the responsibility of this actor to:
> * Manage the read end of the pipe set up by the HTTP handler for the
> ATTACH_CONTAINER_INPUT call for a given container.
> * Manage the write end of the pipes set up by the HTTP handler for all
> ATTACH_CONTAINER_OUTPUT calls for a given container.
> * Establish a connection to a per-container “I/O switchboard” (discussed
> below) in order to forward data coming from the ATTACH_CONTAINER_INPUT pipe
> to the switchboard.
> * Establish a second connection to the per-container “I/O switchboard” to
> stream all stdout data coming from the switchboard to all
> ATTACH_CONTAINER_OUTPUT pipes.
> * Establish a third connection to the per-container “I/O switchboard” to
> stream all stderr data coming from the switchboard to all
> ATTACH_CONTAINER_OUTPUT pipes.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)