[ 
https://issues.apache.org/jira/browse/MESOS-6467?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Kevin Klues updated MESOS-6467:
-------------------------------
    Description: 
In order to facilitate attach operations for a running container, we plan to 
introduce a new component into Mesos known as an “I/O switchboard”. The goal of 
this switchboard is to allow external components to *dynamically* interpose on 
the {{stdin}}, {{stdout}} and {{stderr}} of the init process of a running Mesos 
container. It will be implemented as a per-container, stand-alone process 
launched by the mesos containerizer at the time a container is first launched.

Each per-container switchboard will be responsible for the following:
 * Accepting a single dynamic request to register an fd for streaming data to 
the {{stdin}} of a container’s init process.
 * Accepting *multiple* dynamic requests to register fds for streaming data 
from the {{stdout}} and {{stderr}} of a container’s init process to those fds.
 * Allocating a pty for the new process (if requested), and directing data 
through the master fd of the pty as necessary.
 * Passing the *actual* set of file descriptors that should be dup’d onto the 
{{stdin}}, {{stdout}} and {{stderr}} of a container’s init process back to the 
containerizer. 

The idea being that the switchboard will maintain three asynchronous loops (one 
each for {{stdin}}, {{stdout}} and {{stderr}}) that constantly pipe data 
to/from a container’s init process to/from all of the file descriptors that 
have been dynamically registered with it.

  was:Currently, the existing mesos loggers are the only ones in charge of the 
file descriptors used to redirect the IO of a launched task to/from whatever 
source/destination they choose. Once we add our debugging APIs, the loggers 
will need to be extended to allow external components to interpose their own 
file descriptors between the ones they set up themselves. 


> Build a Container I/O Switchboard
> ---------------------------------
>
>                 Key: MESOS-6467
>                 URL: https://issues.apache.org/jira/browse/MESOS-6467
>             Project: Mesos
>          Issue Type: Task
>            Reporter: Kevin Klues
>            Assignee: Kevin Klues
>              Labels: debugging, mesosphere
>
> In order to facilitate attach operations for a running container, we plan to 
> introduce a new component into Mesos known as an “I/O switchboard”. The goal 
> of this switchboard is to allow external components to *dynamically* 
> interpose on the {{stdin}}, {{stdout}} and {{stderr}} of the init process of 
> a running Mesos container. It will be implemented as a per-container, 
> stand-alone process launched by the mesos containerizer at the time a 
> container is first launched.
> Each per-container switchboard will be responsible for the following:
>  * Accepting a single dynamic request to register an fd for streaming data to 
> the {{stdin}} of a container’s init process.
>  * Accepting *multiple* dynamic requests to register fds for streaming data 
> from the {{stdout}} and {{stderr}} of a container’s init process to those fds.
>  * Allocating a pty for the new process (if requested), and directing data 
> through the master fd of the pty as necessary.
>  * Passing the *actual* set of file descriptors that should be dup’d onto the 
> {{stdin}}, {{stdout}} and {{stderr}} of a container’s init process back to 
> the containerizer. 
> The idea being that the switchboard will maintain three asynchronous loops 
> (one each for {{stdin}}, {{stdout}} and {{stderr}}) that constantly pipe data 
> to/from a container’s init process to/from all of the file descriptors that 
> have been dynamically registered with it.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to