[
https://issues.apache.org/jira/browse/YARN-7654?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16467977#comment-16467977
]
Jason Lowe commented on YARN-7654:
----------------------------------
I'll try to find time to take a closer look at this patch tomorrow, but I'm
wondering if we really need to separate the detached vs. foreground launching
for override vs. entry-point containers. The main problem with running
containers in the foreground is that we have no idea how long it takes to
actually start a container. As I mentioned above, any required localization
for the image is likely to cause the container launch to fail due to docker
inspect retries hitting the retry limit and failing, leaving the container
uncontrolled or at best finally killed sometime later if Shane's lifecycle
changes cause the container to get recognized long afterwards and killed.
I think a cleaner approach would be to always run containers as detached, so
when the {{docker run}} command returns we will know the {{docker inspect}}
command will work. If I understand correctly, the main obstacle to this
approach is finding out what to do with the container's standard out and
standard error streams which aren't directly visible when the container runs
detached. However I think we can use the {{docker logs}} command after the
container is launched to reacquire the container's stdout and stderr streams
and tie them to the intended files. At least my local experiments show
{{docker logs}} is able to obtain the separate stdout and stderr streams for
containers whether they were started detached or not. Thoughts?
> Support ENTRY_POINT for docker container
> ----------------------------------------
>
> Key: YARN-7654
> URL: https://issues.apache.org/jira/browse/YARN-7654
> Project: Hadoop YARN
> Issue Type: Sub-task
> Components: yarn
> Affects Versions: 3.1.0
> Reporter: Eric Yang
> Assignee: Eric Yang
> Priority: Blocker
> Labels: Docker
> Attachments: YARN-7654.001.patch, YARN-7654.002.patch,
> YARN-7654.003.patch, YARN-7654.004.patch, YARN-7654.005.patch,
> YARN-7654.006.patch, YARN-7654.007.patch, YARN-7654.008.patch,
> YARN-7654.009.patch, YARN-7654.010.patch, YARN-7654.011.patch,
> YARN-7654.012.patch, YARN-7654.013.patch, YARN-7654.014.patch,
> YARN-7654.015.patch, YARN-7654.016.patch, YARN-7654.017.patch,
> YARN-7654.018.patch, YARN-7654.019.patch, YARN-7654.020.patch
>
>
> Docker image may have ENTRY_POINT predefined, but this is not supported in
> the current implementation. It would be nice if we can detect existence of
> {{launch_command}} and base on this variable launch docker container in
> different ways:
> h3. Launch command exists
> {code}
> docker run [image]:[version]
> docker exec [container_id] [launch_command]
> {code}
> h3. Use ENTRY_POINT
> {code}
> docker run [image]:[version]
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]