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

Eric Badger commented on YARN-9184:
-----------------------------------

Thanks for the update, [~uranus]!

{noformat}
+    if (LOG.isDebugEnabled()) {
+      LOG.debug("now pull docker image." + " image name: " + imageName + ","
+          + " container: " + containerIdStr + ".");
+    }
{noformat}
The check for {{isDebugEnabled()}} is unnecessary here. When you call 
LOG.debug, it already does this check for you.

{noformat}
+      LOG.debug("now pull docker image." + " image name: " + imageName + ","
+          + " container: " + containerIdStr + ".");
{noformat}
Nit: Should be "now _pulling_ docker image"
Nit: The ending period is unnecessary and makes the container string harder to 
highlight and copy. Same nit for this in the other debug message

For the unit test, we should also have a test case where we set the config 
value to true and check to make sure that there are 2 separate invocations of 
{{executePrivilegedOperation()}}, with one of them being the DockerPullCommand 
and the other being the DockerRunCommand. Right now we're only testing that 
this patch doesn't affect anything when the config is set to falsle, but 
doesn't prove that the config works correctly when it is set to true

> Docker run doesn't pull down latest image if the image exists locally 
> ----------------------------------------------------------------------
>
>                 Key: YARN-9184
>                 URL: https://issues.apache.org/jira/browse/YARN-9184
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: nodemanager
>    Affects Versions: 3.1.0, 3.0.3
>            Reporter: Zhaohui Xin
>            Assignee: Zhaohui Xin
>            Priority: Major
>         Attachments: YARN-9184.001.patch, YARN-9184.002.patch, 
> YARN-9184.003.patch
>
>
> SeeĀ [docker run doesn't pull down latest image if the image exists 
> locally|https://github.com/moby/moby/issues/13331].
> So, I think we should pull image before run to make image always latest.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org

Reply via email to