> On Sept. 1, 2015, 3:59 a.m., Timothy Chen wrote: > > Have you ran the Docker unit tests with your change? I'm currently getting > > tests failed. > > Timothy Chen wrote: > Actually all the docker tests fail now, because of the MockDocker not > being created with Docker::create and therefore isn't being injected with a > prefix. I'm ending up just pad the prefix in the Docker constructor. > > Timothy Chen wrote: > And also I realize you missed the Docker pull path to add the socket as > well. > > Vaibhav Khanduja wrote: > You have to guide me on the unit test. In my environment, they have never > worked and one reason for it is I am behind a firewall. The Docker pull > fails, since it is not allowed to come in. I am try putting up another > environment outside firewall. > > I am executing "sudo make check". Is that right?
Okay .. I will update the code ... Do you think it is good idea to have default value for the socket? as it was in the first version of code review? - Vaibhav ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/37114/#review97236 ----------------------------------------------------------- On Aug. 30, 2015, 6:39 a.m., Vaibhav Khanduja wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/37114/ > ----------------------------------------------------------- > > (Updated Aug. 30, 2015, 6:39 a.m.) > > > Review request for mesos, Benjamin Hindman, Ben Mahler, Timothy Chen, and > Vinod Kone. > > > Bugs: MESOS-3187 > https://issues.apache.org/jira/browse/MESOS-3187 > > > Repository: mesos > > > Description > ------- > > MESOS-3187, support docker host command line option. > > Docker daemon supports starting on a non-default port. Such scenarios would > needed when starting Docker daemon on TCP or non-default unix port. Mesos > slave does not work if Docker daemon is started on any of such non-default > port. The code change is needed in Mesos slave to accept this parameter so as > connect for its operations to the right Docker daemon. The change is made in > Mesos slave, so as it is available to any framework making using Docker > executor. > > The code is added to start slave binary with --docker_host, instructing it to > connect on port as specified in the parameter. The default value of > --default_host is "unix:///var/run/docker.sock, which is default port for > Docker daemon. > > The main class src/docker.cpp/.hpp is kept backward compartible to make > Docker cli execute on default Docker port. > > > Diffs > ----- > > src/docker/docker.hpp 6086710 > src/docker/docker.cpp 12dc050 > src/docker/executor.hpp fa13b6e > src/docker/executor.cpp 256d53d > src/slave/containerizer/docker.cpp a17e4f2 > src/tests/containerizer/docker_containerizer_tests.cpp 936f8c7 > src/tests/containerizer/docker_tests.cpp a4a2725 > src/tests/environment.cpp d9dc266 > src/tests/flags.hpp 3644956 > src/tests/hook_tests.cpp cfde49e > src/tests/mesos.hpp b2160f5 > > Diff: https://reviews.apache.org/r/37114/diff/ > > > Testing > ------- > > Following scenarios were executed to test the code changes. Kindly suggest if > more test-cases are required: > > > a) Mesos slave with unix port : unix:///var/run/docker_myport.sock > > i) Start slave with --docker_host parameter > "unix:///var/run/docker_myport.sock > ii) Using a framework, in my case Marathon, post a Docker job > iii) The docker job does get started on the slave, confirmed with docker > ps command output > > docker -H unix:///var/run/docker_myport.sock ps > > CONTAINER ID IMAGE COMMAND CREATED > STATUS PORTS NAMES > 07fc4ec86bac mygoserver "/bin/sh -c /mygoser 19 minutes ago > Up 19 minutes */tcp, */udp > mesos-20150731-104052-1051068938-5050-7913-S33.17b355cd-2754-4fb2-a558-66820dff033c > > iv) Stop or destroy the job from Marathon GUI > > b) Two mesos slave with non-default docker port > i) On two different hosts, start slave, with one running on default port > and other non-default. The start slaves with attributes - default and or > non-default. > ii) Give jobs to these slaves, using Marathon UNIQUE attribute, selecting > slave - non-default & default > iii) Stop/destroy the jobs > > d) Modified unit test-case taking docker port value - make check > > > Thanks, > > Vaibhav Khanduja > >