> On Sept. 25, 2015, 6:18 p.m., Timothy Chen wrote:
> > Can you add a test for this logic?
> 
> haosdent huang wrote:
>     Could, but because volume-driver depends on flocker, my test ideas for 
> this is verify the docker run command is correct.

Docker also supports "local" as a volume driver. If the value is "local" it 
won't connect to any backed driver, flocker etc. 

docker run -d --volume-driver=local -v /tmp:/src  <image> 

If local is given ... the value of volume would start from "/" ... the logic 
below should ideally ...

https://docs.docker.com/extend/plugins_volume/ 

If test-case is really required ... local can probably be used ...


- Vaibhav


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/38338/#review100643
-----------------------------------------------------------


On Oct. 3, 2015, 3:55 p.m., haosdent huang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/38338/
> -----------------------------------------------------------
> 
> (Updated Oct. 3, 2015, 3:55 p.m.)
> 
> 
> Review request for mesos and Timothy Chen.
> 
> 
> Bugs: MESOS-3392
>     https://issues.apache.org/jira/browse/MESOS-3392
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Enhanced option for Docker cli volume plugin.
> 
> 
> Diffs
> -----
> 
>   include/mesos/mesos.proto 4a16be1f570769f3ce42a50a9da9f4fb1c227999 
>   src/docker/docker.cpp afcedf1f1a309bd0626c33ee25694ac1b43bdec7 
> 
> Diff: https://reviews.apache.org/r/38338/diff/
> 
> 
> Testing
> -------
> 
> # When use volume-driver
> ```
> I1003 23:49:41.986047 11268 docker.cpp:571] Running docker -H 
> unix:///var/run/docker.sock run -e MESOS_SANDBOX=/mnt/mesos/sandbox -e 
> MESOS_CONTAINER_NAME=mesos-docker-test -v src:target:rw -v 
> /tmp/DockerTest_ROOT_DOCKER_volume_driver_D3Fxye:/mnt/mesos/sandbox 
> --volume-driver=flocker --net host --entrypoint /bin/sh --name 
> mesos-docker-test busybox -c sleep 120
> ```
> Could see `-v src:target`
> 
> # When don't use volume-driver
> ```
> 1003 23:53:48.028715 12125 docker.cpp:571] Running docker -H 
> unix:///var/run/docker.sock run -e MESOS_SANDBOX=/mnt/mesos/sandbox -e 
> MESOS_CONTAINER_NAME=mesos-docker-test -v 
> /tmp/DockerTest_ROOT_DOCKER_volume_driver_jmtVzt/src:target:rw -v 
> /tmp/DockerTest_ROOT_DOCKER_volume_driver_jmtVzt:/mnt/mesos/sandbox --net 
> host --entrypoint /bin/sh --name mesos-docker-test busybox -c sleep 120
> ```
> Could see `-v /tmp/DockerTest_ROOT_DOCKER_volume_driver_jmtVzt/src:target:rw`
> 
> 
> Thanks,
> 
> haosdent huang
> 
>

Reply via email to