mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Mahler <bmah...@apache.org>
Subject Re: Review Request 49690: Supported docker config agent flag with invalid value.
Date Wed, 06 Jul 2016 17:03:47 GMT
We almost never accept badly formed configuration, why allow it here?

On Wednesday, July 6, 2016, Jie Yu <yujie.jay@gmail.com> wrote:

> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/49690/
>
> Can you also follow up with some documentation?
>
>
> - Jie Yu
>
> On July 6th, 2016, 7:30 a.m. UTC, Gilbert Song wrote:
> Review request for mesos, Benjamin Mahler, Artem Harutyunyan, Jie Yu, and
> Timothy Chen.
> By Gilbert Song.
>
> *Updated July 6, 2016, 7:30 a.m.*
> *Repository: * mesos
> Description
>
> The agent flag 'docker_config' can be either a path of the docker
> config file or as a JSON Object. Currently, if the 'docker_config'
> is invalid, e.g., non-existed file or invalid JSON Object, the
> agent cannot start. This is not ideal because the agent should
> have many other tasks without interacting with docker private
> registries. We should just return error/failure while pulling a
> private repo without correct 'docker_config', instead of blocking
> the agent to start.
>
> Secondly, the semantic of specifying 'docker_config' as a path is
> changed. The path used to be starting with 'file://', so the file
> can be automatically loaded/fetched from the agent flag. Now, in
> order to unblock the agent from an invalid 'docker_config', the
> path has to be an absolute path starting with '/', in which case
> the path will be read explicitly. However, if users still follow
> the old semantic, it should still work, because the 'docker_config'
> starting with 'file://' will be parsed as a string, then it would
> be regarded as a JSON Object case.
>
> So the behavior is if the 'docker_config' is invalid, mesos will
> log a warning and continue to start. The task pulling a private
> repo without the correct docker config file will fail.
>
> Testing
>
> make check
>
> and tested manually with a private repo in both docker containerizer and mesos containerizer:
>
> sudo ./src/mesos-execute --master=127.0.0.1:5050 --name=test --docker_image=gilbertsong/inky
--shell=true --command="env"
>
> sudo ./src/mesos-execute --master=127.0.0.1:5050 --name=test --containerizer=docker --docker_image=gilbertsong/inky
--shell=true --command="env"
>
> Verified that invalid docker_config (non-existed path or invalid JSON) will still have
the agent launch correctly, with a correct warning printed out.
>
> Diffs
>
>    - src/slave/containerizer/docker.cpp
>    (f1ecf3b25d85597f6c3dcaa47968860ed119dbd5)
>    - src/slave/containerizer/mesos/provisioner/docker/store.cpp
>    (81e9d94553874a74cc115d9a1fd659652313a94c)
>    - src/slave/flags.hpp (ff45876a44ed00fdea36986f052f10e8b8031925)
>
> View Diff <https://reviews.apache.org/r/49690/diff/>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message