You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Jie Yu <yu...@gmail.com> on 2016/04/04 21:10:19 UTC

Re: Review Request 45358: Improved overlay backend to make the rootfs writable.

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



I don't like the fact that we use 'sandbox' for scratch space. There are two reasons: 1) for command tasks, we'll bind mount rootfs into the sandbox. I don't want to introduce the complexity of cyclic dependency (rootfs depends on sandbox, sandbox has rootfs bind mounts). 2) we don't remove scratch space after container terminates. I'd like to avoid that.

Instead, could you please use the provisioner directory for that. More precisely, this is probably what you need:
1) in paths.hpp|cpp, introduce a method to get the backend directory: `getBackendDir(provisionerDir, containerId, backend);`
2) create scratch space for each container under backends/overlay/scratch/<rootfsid>.
3) For `provision` interface, you need to add a new parameter which is the backend dir for that container (provision(layers, rootfs, backendDir);)

In `provision`, you can use 'basename' to get the rootfsid and create the scratch space under backends/overlay/scratch.

- Jie Yu


On March 27, 2016, 2:41 p.m., Shuai Lin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45358/
> -----------------------------------------------------------
> 
> (Updated March 27, 2016, 2:41 p.m.)
> 
> 
> Review request for mesos, Gilbert Song, Guangya Liu, and Jie Yu.
> 
> 
> Bugs: MESOS-4944
>     https://issues.apache.org/jira/browse/MESOS-4944
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Improved overlay backend to make the rootfs writable.
> 
> 
> Diffs
> -----
> 
>   src/slave/containerizer/mesos/containerizer.cpp e7f7e7fd1304e14dbfaab8b53cea16efc0417911 
>   src/slave/containerizer/mesos/provisioner/backend.hpp c6cca81e287bb9a62e0390f96e1773841887a206 
>   src/slave/containerizer/mesos/provisioner/backends/bind.hpp 9eda944e14f2b05f28620c2e40594ed4e7bab69e 
>   src/slave/containerizer/mesos/provisioner/backends/bind.cpp 9b9f0b9e99a0fc0e9bad8fb2dad41acdc0ca1da1 
>   src/slave/containerizer/mesos/provisioner/backends/copy.hpp b62507f9fc757349d39f39a6654ddd69053bf0e7 
>   src/slave/containerizer/mesos/provisioner/backends/copy.cpp f353c89806816e85bb27875ef5fa68d5c0eaf9ca 
>   src/slave/containerizer/mesos/provisioner/backends/overlay.hpp 85cc737438c88b355f37611bfde50dc80efab017 
>   src/slave/containerizer/mesos/provisioner/backends/overlay.cpp 5cc0f8b5a8cd4c945023f874056a8184113186c5 
>   src/slave/containerizer/mesos/provisioner/provisioner.hpp 5c96e9f6603d39889e6bc807874d35d0cb3556be 
>   src/slave/containerizer/mesos/provisioner/provisioner.cpp 8a4938ebe4e00779e88e7c538445e9ffd51202e2 
>   src/tests/containerizer/mesos_containerizer_tests.cpp 09742ff21513dc2570684d384b257868dd57a9ce 
>   src/tests/containerizer/provisioner_appc_tests.cpp 23a5b1059b4d9fde1e4a1aab5cd4fa6d05862332 
>   src/tests/containerizer/provisioner_backend_tests.cpp d49204f220c6212f83c2adf5544d04b3386c8eb7 
> 
> Diff: https://reviews.apache.org/r/45358/diff/
> 
> 
> Testing
> -------
> 
> - make check
> - tested manually, with slave using overlay backend. Create a task with mesos containerizer, ubuntu docker image, with the command `mkdir -p /abc && touch /abc/def.txt`.
> - also tested manually with alpine image to verify overlay backend could support 1-layer images.
> 
> 
> Thanks,
> 
> Shuai Lin
> 
>