mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Timothy Chen" <tnac...@apache.org>
Subject Re: Review Request 37921: Add Copy backend for provisioners.
Date Wed, 02 Sep 2015 04:32:30 GMT


> On Sept. 2, 2015, 3:07 a.m., Jiang Yan Xu wrote:
> > src/slave/containerizer/provisioners/backends/copy.cpp, lines 108-116
> > <https://reviews.apache.org/r/37921/diff/1-3/?file=1059333#file1059333line108>
> >
> >     Wow, I guess I hadn't realized what you meant by "making sure the layers have
the same basename" and I overlooked the fact that when multiple layers are applied every layer
other than the 1st one is going to have the rootfs dir already created...
> >     
> >     I think it's too much of a restriction to impose the same basename for all rootfes
and it's not the backend's position to know that they should all be the same.
> >     
> >     Given that there is unfortunately no standard way of doing this, I think I'll
be OK with either of the following two approaches:
> >     
> >     1) The following two commands can make sure the source overwrites the target
event if it is a diretory.
> >     
> >     GNU cp:
> >     cp -aT source target // -T makes sure the contents are copied.
> >     
> >     OSX cp:
> >     cp a source/ target // The trailing slash makes sure the contents instead of
the directory is copied.
> >     
> >     So we can do something like 
> >     
> >     #ifdef __APPLE__
> >       source += "/"
> >     #else
> >       options += "T"
> >     #endif
> >     
> >     2) Use your previous approach with "/*" expansion but with quotes around the
paths.
> >     
> >     Neither is ideal but is no worse than the system commands we are already invoking.
> >     
> >     I am OK with either. What do you think?

hmm, I think I'll go for 1) option.


- Timothy


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


On Sept. 1, 2015, 12:58 a.m., Timothy Chen wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37921/
> -----------------------------------------------------------
> 
> (Updated Sept. 1, 2015, 12:58 a.m.)
> 
> 
> Review request for mesos, Jie Yu and Jiang Yan Xu.
> 
> 
> Bugs: MESOS-2968
>     https://issues.apache.org/jira/browse/MESOS-2968
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Add Copy backend for provisioners.
> 
> 
> Diffs
> -----
> 
>   src/Makefile.am 7b4d9f65506e7fa8425966009401aae73cdb79a5 
>   src/slave/containerizer/provisioners/backend.cpp 2f7c335f62fdeb27526ab9a38a07c097422ae92b

>   src/slave/containerizer/provisioners/backends/copy.hpp PRE-CREATION 
>   src/slave/containerizer/provisioners/backends/copy.cpp PRE-CREATION 
>   src/tests/containerizer/provisioner_backend_tests.cpp d321850613223a2357ca1646a9d988d05171772c

> 
> Diff: https://reviews.apache.org/r/37921/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Timothy Chen
> 
>


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