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

Kevin Klues updated MESOS-6879:
-------------------------------
    Description: 
Currently, the IOSwitchboard assumes that whenever a container's {{stdout}} and 
{{stderr}} have been closed, then it is OK to exit the switchboard process. We 
assume this because {{stdout}} and {{stderr}} will only be closed after both 
the read end of the {{stdout}} stream and the read end of the {{stderr}} stream 
have been drained. Since draining these {{fds}} represents having read 
everything possible from a container's {{stdout}} and {{stderr}} this is likely 
sufficient termination criteria. However, there's a non-zero chance that *some* 
containers may decide to close their {{stdout}} and {{stderr}} while expecting 
to continue reading from {{stdin}}. For now we don't support containers with 
this behavior and we will exit out of the switchboard process early.

The reason we don't support this currently is that {{libevent}} and {{libev} 
don't provide a nice way of asynchronously detecting when an {{fd}} has been 
closed. If they did, we could easily leverage this to asynchronously wait until 
{{stdin}} was closed before killing the IOSwitchboard process.

Once these libraries support this (or we find a workaround) we should update 
the IOSwitchboard appropriately.



  was:[~klueska] can you fill the description for this?


> IOSwitchboard should wait for stdin to be closed and drained before exiting
> ---------------------------------------------------------------------------
>
>                 Key: MESOS-6879
>                 URL: https://issues.apache.org/jira/browse/MESOS-6879
>             Project: Mesos
>          Issue Type: Improvement
>            Reporter: Vinod Kone
>            Assignee: Kevin Klues
>
> Currently, the IOSwitchboard assumes that whenever a container's {{stdout}} 
> and {{stderr}} have been closed, then it is OK to exit the switchboard 
> process. We assume this because {{stdout}} and {{stderr}} will only be closed 
> after both the read end of the {{stdout}} stream and the read end of the 
> {{stderr}} stream have been drained. Since draining these {{fds}} represents 
> having read everything possible from a container's {{stdout}} and {{stderr}} 
> this is likely sufficient termination criteria. However, there's a non-zero 
> chance that *some* containers may decide to close their {{stdout}} and 
> {{stderr}} while expecting to continue reading from {{stdin}}. For now we 
> don't support containers with this behavior and we will exit out of the 
> switchboard process early.
> The reason we don't support this currently is that {{libevent}} and {{libev} 
> don't provide a nice way of asynchronously detecting when an {{fd}} has been 
> closed. If they did, we could easily leverage this to asynchronously wait 
> until {{stdin}} was closed before killing the IOSwitchboard process.
> Once these libraries support this (or we find a workaround) we should update 
> the IOSwitchboard appropriately.



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

Reply via email to