[
https://issues.apache.org/jira/browse/YARN-7848?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16814627#comment-16814627
]
Jim Brennan commented on YARN-7848:
-----------------------------------
Thanks [~eyang] for the update!
Some comments:
In get_docker_rm_command(), we are not setting the return code if the
add_to_args() for {{"-f"}} fails., and it seems like it would be cleaner to
structure it as:
{noformat}
ret = add_to_args(args, DOCKER_RM_COMMAND);
if (ret != 0) {
ret = BUFFER_TOO_SMALL;
goto free_and_exit;
}
ret = add_to_args(args, "-f");
if (ret != 0) {
ret = BUFFER_TOO_SMALL;
goto free_and_exit;
}
ret = add_to_args(args, container_name);
if (ret != 0) {
ret = BUFFER_TOO_SMALL;
goto free_and_exit;
}
{noformat}
(nit) In remove_docker_container(), if you wanted to minimize the changes, you
could have kept {{start_index}} and just set {{args[1] = argv[start_index];}}
after the if.
In remove_docker_container(), I don't think it is appropriate to use
free_values(args). The values are on the stack, not the heap. You do want to
do a free(args) to free the array of pointers you allocated.
I think you need to do this free in both the child and the parent.
> Force removal of docker containers that do not get removed on first try
> -----------------------------------------------------------------------
>
> Key: YARN-7848
> URL: https://issues.apache.org/jira/browse/YARN-7848
> Project: Hadoop YARN
> Issue Type: Sub-task
> Reporter: Eric Badger
> Assignee: Eric Yang
> Priority: Major
> Labels: Docker
> Attachments: YARN-7848.001.patch, YARN-7848.002.patch,
> YARN-7848.003.patch
>
>
> After the addition of YARN-5366, containers will get removed after a certain
> debug delay. However, this is a one-time effort. If the removal fails for
> whatever reason, the container will persist. We need to add a mechanism for a
> forced removal of those containers.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]