hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Badger (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-9184) Docker run doesn't pull down latest image if the image exists locally
Date Thu, 10 Jan 2019 16:26:00 GMT

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

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

Thanks for the patch, [~uranus]!

{noformat}
+  /** Default option to decide whether to pull the latest image or not. **/
+  public static final String NM_DOCKER_IMAGE_UPDATE =
+      DOCKER_CONTAINER_RUNTIME_PREFIX + "image-update";
+
{noformat}
This should be a boolean, not a string. 

{noformat}
+  <property>
+    <description>Default option to decide whether to pull the latest image
+      or not.</description>
+    <name>yarn.nodemanager.runtime.linux.docker.image-update</name>
+    <value></value>
+  </property>
{noformat}
We should set this to false. 

{noformat}
+    String containerIdStr = containerId.toString();
{noformat}

{noformat}
-    String containerIdStr = containerId.toString();
{noformat}
Is this change necessary? Just looks like we're moving the line when we don't need to. 

{noformat}
+  public static final String ENV_DOCKER_CONTAINER_IMAGE_UPDATE =
+      "YARN_CONTAINER_RUNTIME_DOCKER_IMAGE_UPDATE";
+  @InterfaceAudience.Private
{noformat}
I'm hesitant to make this a job-specific property. If we allow that then one job could affect
a different job. If both jobs use the same image, then one job could force an update on an
image and the other job would see that change. [~shanekumpf@gmail.com], [~eyang], [~Jim_Brennan],
thoughts?

{noformat}
+      LOG.info("now pull docker image."
+          + " image name: " + imageName + ","
+          + " container: " + containerIdStr + ".");
{noformat}

{noformat}
+      LOG.info("pull docker image done with "
+          + String.valueOf(pullImageTimeMs) + "ms spent."
+          + " image name: " + imageName + ","
+          + " container: " + containerIdStr + ".");
{noformat}
This seems like repetitive logging. If we are going to continue to use it as a job-specific
env property, then I think the second message is probably good, but I think the first one
should be set to debug level. If we are going to a NM-wide config, then I think that they
should both be debug level logs

Last comment is that this will need a unit test to accompany it. HadoopQA noted that in the
precommit build above. 

> 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
>
>
> 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-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-issues-help@hadoop.apache.org


Mime
View raw message