Github user EronWright commented on a diff in the pull request: https://github.com/apache/flink/pull/2703#discussion_r88522783 --- Diff: flink-mesos/src/main/java/org/apache/flink/mesos/runtime/clusterframework/MesosApplicationMasterRunner.java --- @@ -601,6 +601,54 @@ else if (recoveryMode == HighAvailabilityMode.ZOOKEEPER) { info.setCommand(cmd); + // Set base container for task manager if specified in configs. + String taskManagerContainerName = flinkConfig.getString( + ConfigConstants.MESOS_RESOURCEMANAGER_TASKS_CONTAINER_IMAGE_NAME, ""); + + if (taskManagerContainerName.length() > 0) { + String taskManagerContainerType = flinkConfig.getString( + ConfigConstants.MESOS_RESOURCEMANAGER_TASKS_CONTAINER_TYPE, + ConfigConstants.DEFAULT_MESOS_RESOURCEMANAGER_TASKS_CONTAINER_IMAGE_TYPE); + + Protos.ContainerInfo.Builder containerInfo; + + switch (taskManagerContainerType) { + case ConfigConstants.MESOS_RESOURCEMANAGER_TASKS_CONTAINER_TYPE_MESOS: + containerInfo = Protos.ContainerInfo.newBuilder() + .setType(Protos.ContainerInfo.Type.MESOS) + .setMesos(Protos.ContainerInfo.MesosInfo.newBuilder() + .setImage(Protos.Image.newBuilder() + .setType(Protos.Image.Type.DOCKER) + .setDocker(Protos.Image.Docker.newBuilder() + .setName(taskManagerContainerName)))); + break; + case ConfigConstants.MESOS_RESOURCEMANAGER_TASKS_CONTAINER_TYPE_DOCKER: + containerInfo = Protos.ContainerInfo.newBuilder() + .setType(Protos.ContainerInfo.Type.DOCKER) + .setDocker(Protos.ContainerInfo.DockerInfo.newBuilder() + .setNetwork(Protos.ContainerInfo.DockerInfo.Network.HOST) + .setForcePullImage(true) --- End diff -- Force pulling does have side-effects, it causes docker to make additional network requests that might not be desirable. This behavior is not typical of other DCOS packages, nor is it consistent between the containerizers. Please turn it off.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---