[ 
https://issues.apache.org/jira/browse/YARN-8523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16562260#comment-16562260
 ] 

Eric Yang commented on YARN-8523:
---------------------------------

There are a couple possible approaches to support docker exec on yarn:

1.  System administrator approach:
When system administrator needs to perform same operation on all instances of a 
component or service.  It is possible to create a YARN cli command to pass 
simple docker exec command to targeted components and services.  Stdout and 
stderr are aggregated, and report back to application master and YARN cli.  
This would be similar to kubectl exec on kubernetes.  There is no session 
persistence to remember the directory, or hot key lookup because there is no 
terminal bind to the YARN cli. 

2.  Developer friendly approach:
The alternative approach is to avoid building this into YARN framework but 
depend on docker container to run multi-processes container.  This allows sshd 
to run inside the docker container.  User can use ssh and pdsh to login to the 
docker container.  Dumb Terminal and hot key can be supported depending on 
Linux bits in the docker image.

3.  Build a pseudo terminal rewiring to YARN UI:
There are software like [ttyd|https://tsl0922.github.io/ttyd/] that offers 
ability to share docker interactive terminal over javascript.  It might be 
possible to modify the code to interface with container-executor started docker 
exec session to provide a full experience.

Option 3 would be fun from research point of view, but it is more practical to 
build 1 for diagnosing production problems at scale.  Which approach is most 
useful to the community?

> Interactive docker shell
> ------------------------
>
>                 Key: YARN-8523
>                 URL: https://issues.apache.org/jira/browse/YARN-8523
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>            Reporter: Eric Yang
>            Priority: Major
>              Labels: Docker
>
> Some application might require interactive unix commands executions to carry 
> out operations.  Container-executor can interface with docker exec to debug 
> or analyze docker containers while the application is running.  It would be 
> nice to support an API to invoke docker exec to perform unix commands and 
> report back the output to application master.  Application master can 
> distribute and aggregate execution of the commands to record in application 
> master log file.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to