Andrei Budnik created MESOS-9838:
------------------------------------

             Summary: Leaked HTTP input connection between agent and 
IOSwitchboard when launched with TTY enabled.
                 Key: MESOS-9838
                 URL: https://issues.apache.org/jira/browse/MESOS-9838
             Project: Mesos
          Issue Type: Bug
          Components: agent
            Reporter: Andrei Budnik


Steps to reproduce:
 1) Launch a TTY container.
 2) Send the `ATTACH_CONTAINER_INPUT` request to the agent via an HTTP 
connection.
 3) Close a tcp socket used to send `ATTACH_CONTAINER_INPUT`.
 4) Send another `ATTACH_CONTAINER_INPUT` request to the agent - it returns 
`409 Conflict` HTTP error.

For each incoming `ATTACH_CONTAINER_INPUT` request the agent creates an HTTP 
connection to the IOSwitchboard via unix socket. This connection is used to 
retransmit client requests to the IOSwitchboard. IOSwitchboard closes this 
connection automatically once the client closes its HTTP connection to the 
agent: for more details see HTTP handlers in [the 
agent|https://github.com/apache/mesos/blob/1961e41a61def2b7baca7563c0b7e1855880b55c/src/slave/http.cpp#L3105-L3116]
 and in the 
[IOSwitchboard|https://github.com/apache/mesos/blob/1961e41a61def2b7baca7563c0b7e1855880b55c/src/slave/containerizer/mesos/io/switchboard.cpp#L1665-L1758].
 IOSwitchboard does not allow [multiple input 
connections|https://github.com/apache/mesos/blob/1961e41a61def2b7baca7563c0b7e1855880b55c/src/slave/containerizer/mesos/io/switchboard.cpp#L1654-L1657].
Currently, IOSwitchboard does not close HTTP connection for the 
`ATTACH_CONTAINER_INPUT` in the case described above. Hence, IOSwitchboard 
returns an error for the subsequent attempts to attach to the container input. 
The root cause needs to be found.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to