mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jie Yu <yujie....@gmail.com>
Subject Re: Review Request 53500: Used an environment variable to pass command environment.
Date Tue, 08 Nov 2016 06:48:42 GMT


> On Nov. 5, 2016, 9:38 p.m., Jie Yu wrote:
> > src/slave/containerizer/mesos/containerizer.cpp, line 1405
> > <https://reviews.apache.org/r/53500/diff/1/?file=1554707#file1554707line1405>
> >
> >     I'll be nice to use environment variable for all flags here. I think we probably
need a helper in FlagsBase to return the corresponding environment variables for the flags:
> >     ```
> >     // Export flags as environment variables.
> >     map<string, string> FlagsBase::environment(
> >         const Option<string>& prefix);
> >     ```
> >     
> >     And then, we can just merge with os::environment and pass it to Launcher::fork
> 
> Jiang Yan Xu wrote:
>     This helper looks like handy. 
>     
>     I am not necessarily against this but wanted us to give it more thought. 
>     
>     1. Should all Mesos libexec binaries work this way?
>     2. Removing all of the flags makes all the helper binary instances look the same
through `ps`. Yes privileged users can still get the info in /proc for individual processes
but we loose  we lose easy "grep-pability" for debugging. 
>     
>     To me the line to draw is between user-supplied info (prefer env vars) and Mesos
generated info (e.g., runtime dir which encodes contianerId) which is not sensitive. Thoughts?

This is just a suggestion. That's the reason I didn't put an issue there.

For 1, yes, I would say so because libexec binaries are Mesos details, which should not be
exposed to users
For 2, one can still log that in the agent log.

But we can do that later, we don't have to do it now.


- Jie


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


On Nov. 7, 2016, 8:13 p.m., Jiang Yan Xu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/53500/
> -----------------------------------------------------------
> 
> (Updated Nov. 7, 2016, 8:13 p.m.)
> 
> 
> Review request for mesos, Anindya Sinha, Gilbert Song, and Jie Yu.
> 
> 
> Bugs: MESOS-6526
>     https://issues.apache.org/jira/browse/MESOS-6526
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Used an environment variable to pass command environment.
> 
> 
> Diffs
> -----
> 
>   src/slave/containerizer/mesos/containerizer.cpp 67cc595278f124cdf518d2f4fcfb257439f067e2

>   src/slave/containerizer/mesos/main.cpp 1a0e765ddb6d8519426b8d47067efdfa3432e07a 
> 
> Diff: https://reviews.apache.org/r/53500/diff/
> 
> 
> Testing
> -------
> 
> make check.
> 
> No new tests are written but the fact the existing tests that run exectuors depends on
this to work correctly is a proof.
> 
> 
> Thanks,
> 
> Jiang Yan Xu
> 
>


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