mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilbert Song <>
Subject Review Request 49690: Supported docker config agent flag with invalid value.
Date Wed, 06 Jul 2016 07:30:58 GMT

This is an automatically generated e-mail. To reply, visit:

Review request for mesos, Benjamin Mahler, Artem Harutyunyan, Jie Yu, and Timothy Chen.

Repository: mesos


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.


  src/slave/containerizer/docker.cpp f1ecf3b25d85597f6c3dcaa47968860ed119dbd5 
  src/slave/containerizer/mesos/provisioner/docker/store.cpp 81e9d94553874a74cc115d9a1fd659652313a94c

  src/slave/flags.hpp ff45876a44ed00fdea36986f052f10e8b8031925 



make check

and tested manually with a private repo in both docker containerizer and mesos containerizer:

sudo ./src/mesos-execute --master= --name=test --docker_image=gilbertsong/inky
--shell=true --command="env"

sudo ./src/mesos-execute --master= --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.


Gilbert Song

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