mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Wood via Review Board <nore...@reviews.apache.org>
Subject Re: Review Request 60280: Provide full path to the custom executor.
Date Wed, 05 Jul 2017 17:37:28 GMT


> On July 5, 2017, 4:48 p.m., Jie Yu wrote:
> > src/slave/containerizer/mesos/launch.cpp
> > Lines 799 (patched)
> > <https://reviews.apache.org/r/60280/diff/6/?file=1768561#file1768561line799>
> >
> >     This is still based on the assumption that `launchInfo` has `working_directory()`
set. Can you do the following instead:
> >     ```
> >     Result<string> realpath = os::realpath(executable);
> >     if (!realpath.isSome()) {
> >       ...
> >     }
> >     ```
> 
> Jie Yu wrote:
>     I also realized that using realpath will make the search for PATH not possible. This
issue is indeed not trivial. The best way I can think of is to test if executable is relative
and see if it exists in the sandbox or not and test if it is executable or not. Alternatively,
we can add cwd to PATH, but this will polute PATH i would rather avoid.
>     
>     Do you have other thoughts?

Is it possible to assume that any custom executor would always be in the sandbox? E.g. assume
that a framework will always provide a URI to fetch the executor and have Mesos execute it
in the usual way. If that's the case then would we need to search `PATH` at all?


- Aaron


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


On July 3, 2017, 6:35 p.m., Aaron Wood wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60280/
> -----------------------------------------------------------
> 
> (Updated July 3, 2017, 6:35 p.m.)
> 
> 
> Review request for mesos, Jie Yu, James Peach, and Zhitao Li.
> 
> 
> Bugs: MESOS-7703
>     https://issues.apache.org/jira/browse/MESOS-7703
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> If a framework specifies use of its own executor and sets shell to false the executor
is never found. This provides the full path to the executor so that the `execvp` or `execvpe`
is successful.
> 
> 
> Diffs
> -----
> 
>   src/slave/containerizer/mesos/launch.cpp 162ca1c2e 
> 
> 
> Diff: https://reviews.apache.org/r/60280/diff/6/
> 
> 
> Testing
> -------
> 
> `cd build && cmake .. -DCMAKE_BUILD_TYPE=Release && make -j4`
> Also spun up a master and agent, connected and sent a task using the UCR (both with and
without the use of an OCI image) via our own framework, and checked the sandbox to verify
that things went accordingly.
> 
> 
> Thanks,
> 
> Aaron Wood
> 
>


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