Re: Review Request 56711: Fixed fetcher to not pick up environment variables it should not see.

2017-02-22 Thread Adam B

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


Ship it!




Ship It!

- Adam B


On Feb. 22, 2017, 4:41 p.m., Till Toenshoff wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/56711/
> ---
> 
> (Updated Feb. 22, 2017, 4:41 p.m.)
> 
> 
> Review request for mesos, Adam B, Benjamin Bannier, and Greg Mann.
> 
> 
> Bugs: MESOS-6751 and MESOS-7133
> https://issues.apache.org/jira/browse/MESOS-6751
> https://issues.apache.org/jira/browse/MESOS-7133
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Fixed fetcher to not pick up environment variables it should not see.
> 
> 
> Diffs
> -
> 
>   src/slave/containerizer/fetcher.cpp 
> 9ec38dc95dddfcd990369d0146986e20b15da1a0 
> 
> Diff: https://reviews.apache.org/r/56711/diff/
> 
> 
> Testing
> ---
> 
> make check
> 
> 
> Thanks,
> 
> Till Toenshoff
> 
>



Re: Review Request 56711: Fixed fetcher to not pick up environment variables it should not see.

2017-02-22 Thread Till Toenshoff

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

(Updated Feb. 23, 2017, 12:41 a.m.)


Review request for mesos, Adam B, Benjamin Bannier, and Greg Mann.


Changes
---

Addressed comments - thanks for those!


Bugs: MESOS-6751 and MESOS-7133
https://issues.apache.org/jira/browse/MESOS-6751
https://issues.apache.org/jira/browse/MESOS-7133


Repository: mesos


Description
---

Fixed fetcher to not pick up environment variables it should not see.


Diffs (updated)
-

  src/slave/containerizer/fetcher.cpp 9ec38dc95dddfcd990369d0146986e20b15da1a0 

Diff: https://reviews.apache.org/r/56711/diff/


Testing
---

make check


Thanks,

Till Toenshoff



Re: Review Request 56711: Fixed fetcher to not pick up environment variables it should not see.

2017-02-21 Thread Adam B

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


Fix it, then Ship it!




Looks good; just a couple of minor comments


src/slave/containerizer/fetcher.cpp (lines 833 - 838)


Alphabetize these?



src/slave/containerizer/fetcher.cpp (lines 843 - 844)


If you do `using std::startsWith;` then you could fit these two one one 
line.


- Adam B


On Feb. 21, 2017, 3:46 p.m., Till Toenshoff wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/56711/
> ---
> 
> (Updated Feb. 21, 2017, 3:46 p.m.)
> 
> 
> Review request for mesos, Adam B, Benjamin Bannier, and Greg Mann.
> 
> 
> Bugs: MESOS-6751 and MESOS-7133
> https://issues.apache.org/jira/browse/MESOS-6751
> https://issues.apache.org/jira/browse/MESOS-7133
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Fixed fetcher to not pick up environment variables it should not see.
> 
> 
> Diffs
> -
> 
>   src/slave/containerizer/fetcher.cpp 
> 9ec38dc95dddfcd990369d0146986e20b15da1a0 
> 
> Diff: https://reviews.apache.org/r/56711/diff/
> 
> 
> Testing
> ---
> 
> make check
> 
> 
> Thanks,
> 
> Till Toenshoff
> 
>



Re: Review Request 56711: Fixed fetcher to not pick up environment variables it should not see.

2017-02-21 Thread Till Toenshoff

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

(Updated Feb. 21, 2017, 11:46 p.m.)


Review request for mesos, Adam B, Benjamin Bannier, and Greg Mann.


Changes
---

Addressed comments - thanks for the reviews!


Bugs: MESOS-6751 and MESOS-7133
https://issues.apache.org/jira/browse/MESOS-6751
https://issues.apache.org/jira/browse/MESOS-7133


Repository: mesos


Description
---

Fixed fetcher to not pick up environment variables it should not see.


Diffs (updated)
-

  src/slave/containerizer/fetcher.cpp 9ec38dc95dddfcd990369d0146986e20b15da1a0 

Diff: https://reviews.apache.org/r/56711/diff/


Testing
---

make check


Thanks,

Till Toenshoff



Re: Review Request 56711: Fixed fetcher to not pick up environment variables it should not see.

2017-02-21 Thread Till Toenshoff

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

(Updated Feb. 21, 2017, 11:32 p.m.)


Review request for mesos, Adam B, Benjamin Bannier, and Greg Mann.


Bugs: MESOS-6751 and MESOS-7133
https://issues.apache.org/jira/browse/MESOS-6751
https://issues.apache.org/jira/browse/MESOS-7133


Repository: mesos


Description
---

Fixed fetcher to not pick up environment variables it should not see.


Diffs
-

  src/slave/containerizer/fetcher.cpp 9ec38dc95dddfcd990369d0146986e20b15da1a0 

Diff: https://reviews.apache.org/r/56711/diff/


Testing
---

make check


Thanks,

Till Toenshoff



Re: Review Request 56711: Fixed fetcher to not pick up environment variables it should not see.

2017-02-21 Thread Adam B

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




src/slave/containerizer/fetcher.cpp (line 846)


Why not `whitelist.contains(toUpper(key))`?


- Adam B


On Feb. 21, 2017, 8:04 a.m., Till Toenshoff wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/56711/
> ---
> 
> (Updated Feb. 21, 2017, 8:04 a.m.)
> 
> 
> Review request for mesos, Adam B, Benjamin Bannier, and Greg Mann.
> 
> 
> Bugs: MESOS-6751 and MESOS-7133
> https://issues.apache.org/jira/browse/MESOS-6751
> https://issues.apache.org/jira/browse/MESOS-7133
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Fixed fetcher to not pick up environment variables it should not see.
> 
> 
> Diffs
> -
> 
>   src/slave/containerizer/fetcher.cpp 
> 9ec38dc95dddfcd990369d0146986e20b15da1a0 
> 
> Diff: https://reviews.apache.org/r/56711/diff/
> 
> 
> Testing
> ---
> 
> make check
> 
> 
> Thanks,
> 
> Till Toenshoff
> 
>



Re: Review Request 56711: Fixed fetcher to not pick up environment variables it should not see.

2017-02-21 Thread Till Toenshoff

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

(Updated Feb. 21, 2017, 4:04 p.m.)


Review request for mesos, Adam B, Benjamin Bannier, and Greg Mann.


Changes
---

inbetween - update pending shortly...


Bugs: MESOS-6751 and MESOS-7133
https://issues.apache.org/jira/browse/MESOS-6751
https://issues.apache.org/jira/browse/MESOS-7133


Repository: mesos


Description (updated)
---

Fixed fetcher to not pick up environment variables it should not see.


Diffs (updated)
-

  src/slave/containerizer/fetcher.cpp 9ec38dc95dddfcd990369d0146986e20b15da1a0 

Diff: https://reviews.apache.org/r/56711/diff/


Testing
---

make check


Thanks,

Till Toenshoff



Re: Review Request 56711: Fixed fetcher to not pick up environment variables it should not see.

2017-02-19 Thread Adam B


> On Feb. 16, 2017, 1:39 a.m., Adam B wrote:
> > src/slave/containerizer/fetcher.cpp, lines 827-828
> > 
> >
> > How confident are you that the fetcher doesn't actually need any of 
> > these env vars? How can we test/prove it?
> 
> Till Toenshoff wrote:
> So far I simply tried to identify such possible conflicts by looking at 
> the code.
> 
> The `mesos-fetcher` itself is offering support for 
> `mesos::internal::logging::Flags` which add the following options:
> ```
>   add(::quiet,
>   add(::logging_level,
>   add(::log_dir,
>   add(::logbufsecs,
>   add(::initialize_driver_logging,
>   add(::external_log_file,
> ```
> All of the above are certainly supported by use if `MESOS_` prefixed 
> environment variable names. Other than that, the `mesos-fetcher` has support 
> for `MESOS_FETCHER_INFO` which we explicitly pass on even after that patch we 
> are discussing here. 
> So the things to look at should be limited towards the candidates covered 
> by those `Flags`. To be entirely clean we might want to consider passing 
> those candidates through explicitly.

Well, we certainly want to support MESOS_FETCHER_INFO and the others, so let's 
consider blacklist/whitelist.


- Adam


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


On Feb. 15, 2017, 5:31 p.m., Till Toenshoff wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/56711/
> ---
> 
> (Updated Feb. 15, 2017, 5:31 p.m.)
> 
> 
> Review request for mesos, Adam B, Benjamin Bannier, and Greg Mann.
> 
> 
> Bugs: MESOS-6751 and MESOS-7133
> https://issues.apache.org/jira/browse/MESOS-6751
> https://issues.apache.org/jira/browse/MESOS-7133
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> see summary.
> 
> 
> Diffs
> -
> 
>   src/slave/containerizer/fetcher.cpp 
> 9ec38dc95dddfcd990369d0146986e20b15da1a0 
> 
> Diff: https://reviews.apache.org/r/56711/diff/
> 
> 
> Testing
> ---
> 
> make check
> 
> 
> Thanks,
> 
> Till Toenshoff
> 
>



Re: Review Request 56711: Fixed fetcher to not pick up environment variables it should not see.

2017-02-16 Thread Till Toenshoff


> On Feb. 16, 2017, 9:39 a.m., Adam B wrote:
> > src/slave/containerizer/fetcher.cpp, lines 827-828
> > 
> >
> > How confident are you that the fetcher doesn't actually need any of 
> > these env vars? How can we test/prove it?

So far I simply tried to identify such possible conflicts by looking at the 
code.

The `mesos-fetcher` itself is offering support for 
`mesos::internal::logging::Flags` which add the following options:
```
  add(::quiet,
  add(::logging_level,
  add(::log_dir,
  add(::logbufsecs,
  add(::initialize_driver_logging,
  add(::external_log_file,
```
All of the above are certainly supported by use if `MESOS_` prefixed 
environment variable names. Other than that, the `mesos-fetcher` has support 
for `MESOS_FETCHER_INFO` which we explicitly pass on even after that patch we 
are discussing here. 
So the things to look at should be limited towards the candidates covered by 
those `Flags`. To be entirely clean we might want to consider passing those 
candidates through explicitly.


- Till


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


On Feb. 16, 2017, 1:31 a.m., Till Toenshoff wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/56711/
> ---
> 
> (Updated Feb. 16, 2017, 1:31 a.m.)
> 
> 
> Review request for mesos, Adam B, Benjamin Bannier, and Greg Mann.
> 
> 
> Bugs: MESOS-6751 and MESOS-7133
> https://issues.apache.org/jira/browse/MESOS-6751
> https://issues.apache.org/jira/browse/MESOS-7133
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> see summary.
> 
> 
> Diffs
> -
> 
>   src/slave/containerizer/fetcher.cpp 
> 9ec38dc95dddfcd990369d0146986e20b15da1a0 
> 
> Diff: https://reviews.apache.org/r/56711/diff/
> 
> 
> Testing
> ---
> 
> make check
> 
> 
> Thanks,
> 
> Till Toenshoff
> 
>



Re: Review Request 56711: Fixed fetcher to not pick up environment variables it should not see.

2017-02-16 Thread Adam B

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




src/slave/containerizer/fetcher.cpp (lines 827 - 828)


How confident are you that the fetcher doesn't actually need any of these 
env vars? How can we test/prove it?


- Adam B


On Feb. 15, 2017, 5:31 p.m., Till Toenshoff wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/56711/
> ---
> 
> (Updated Feb. 15, 2017, 5:31 p.m.)
> 
> 
> Review request for mesos, Adam B, Benjamin Bannier, and Greg Mann.
> 
> 
> Bugs: MESOS-6751 and MESOS-7133
> https://issues.apache.org/jira/browse/MESOS-6751
> https://issues.apache.org/jira/browse/MESOS-7133
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> see summary.
> 
> 
> Diffs
> -
> 
>   src/slave/containerizer/fetcher.cpp 
> 9ec38dc95dddfcd990369d0146986e20b15da1a0 
> 
> Diff: https://reviews.apache.org/r/56711/diff/
> 
> 
> Testing
> ---
> 
> make check
> 
> 
> Thanks,
> 
> Till Toenshoff
> 
>



Re: Review Request 56711: Fixed fetcher to not pick up environment variables it should not see.

2017-02-15 Thread Till Toenshoff

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

(Updated Feb. 16, 2017, 1:31 a.m.)


Review request for mesos, Adam B, Benjamin Bannier, and Greg Mann.


Bugs: MESOS-6751 and MESOS-7133
https://issues.apache.org/jira/browse/MESOS-6751
https://issues.apache.org/jira/browse/MESOS-7133


Repository: mesos


Description (updated)
---

see summary.


Diffs
-

  src/slave/containerizer/fetcher.cpp 9ec38dc95dddfcd990369d0146986e20b15da1a0 

Diff: https://reviews.apache.org/r/56711/diff/


Testing
---

make check


Thanks,

Till Toenshoff



Re: Review Request 56711: Fixed fetcher to not pick up environment variables it should not see.

2017-02-15 Thread Till Toenshoff

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

(Updated Feb. 16, 2017, 1:30 a.m.)


Review request for mesos, Adam B and Benjamin Bannier.


Bugs: MESOS-6751 and MESOS-7133
https://issues.apache.org/jira/browse/MESOS-6751
https://issues.apache.org/jira/browse/MESOS-7133


Repository: mesos


Description
---

Fixed fetcher to not pick up environment variables it should not see.


Diffs
-

  src/slave/containerizer/fetcher.cpp 9ec38dc95dddfcd990369d0146986e20b15da1a0 

Diff: https://reviews.apache.org/r/56711/diff/


Testing
---

make check


Thanks,

Till Toenshoff



Re: Review Request 56711: Fixed fetcher to not pick up environment variables it should not see.

2017-02-15 Thread Till Toenshoff


> On Feb. 15, 2017, 7:11 p.m., Benjamin Bannier wrote:
> > I think we agree that since we now have three instance of this same code in 
> > the codebase (already in `src/slave/container_loggers/lib_logrotate.cpp` 
> > and in `src/slave/containerizer/mesos/io/switchboard.cpp`), we have passed 
> > an arbitrary threshold to prioritize MESOS-6751 higher, cf. 
> > http://wiki.c2.com/?ThreeStrikesAndYouRefactor.

100%


- Till


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


On Feb. 15, 2017, 3:35 p.m., Till Toenshoff wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/56711/
> ---
> 
> (Updated Feb. 15, 2017, 3:35 p.m.)
> 
> 
> Review request for mesos, Adam B and Benjamin Bannier.
> 
> 
> Bugs: MESOS-6751
> https://issues.apache.org/jira/browse/MESOS-6751
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Fixed fetcher to not pick up environment variables it should not see.
> 
> 
> Diffs
> -
> 
>   src/slave/containerizer/fetcher.cpp 
> 9ec38dc95dddfcd990369d0146986e20b15da1a0 
> 
> Diff: https://reviews.apache.org/r/56711/diff/
> 
> 
> Testing
> ---
> 
> make check
> 
> 
> Thanks,
> 
> Till Toenshoff
> 
>



Re: Review Request 56711: Fixed fetcher to not pick up environment variables it should not see.

2017-02-15 Thread Benjamin Bannier

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


Ship it!




I think we agree that since we now have three instance of this same code in the 
codebase (already in `src/slave/container_loggers/lib_logrotate.cpp` and in 
`src/slave/containerizer/mesos/io/switchboard.cpp`), we have passed an 
arbitrary threshold to prioritize MESOS-6751 higher, cf. 
http://wiki.c2.com/?ThreeStrikesAndYouRefactor.

- Benjamin Bannier


On Feb. 15, 2017, 4:35 p.m., Till Toenshoff wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/56711/
> ---
> 
> (Updated Feb. 15, 2017, 4:35 p.m.)
> 
> 
> Review request for mesos, Adam B and Benjamin Bannier.
> 
> 
> Bugs: MESOS-6751
> https://issues.apache.org/jira/browse/MESOS-6751
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Fixed fetcher to not pick up environment variables it should not see.
> 
> 
> Diffs
> -
> 
>   src/slave/containerizer/fetcher.cpp 
> 9ec38dc95dddfcd990369d0146986e20b15da1a0 
> 
> Diff: https://reviews.apache.org/r/56711/diff/
> 
> 
> Testing
> ---
> 
> make check
> 
> 
> Thanks,
> 
> Till Toenshoff
> 
>



Re: Review Request 56711: Fixed fetcher to not pick up environment variables it should not see.

2017-02-15 Thread Mesos Reviewbot

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



Patch looks great!

Reviews applied: [56711]

Passed command: export OS='ubuntu:14.04' BUILDTOOL='autotools' COMPILER='gcc' 
CONFIGURATION='--verbose' ENVIRONMENT='GLOG_v=1 MESOS_VERBOSE=1'; 
./support/docker-build.sh

- Mesos Reviewbot


On Feb. 15, 2017, 3:35 p.m., Till Toenshoff wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/56711/
> ---
> 
> (Updated Feb. 15, 2017, 3:35 p.m.)
> 
> 
> Review request for mesos, Adam B and Benjamin Bannier.
> 
> 
> Bugs: MESOS-6751
> https://issues.apache.org/jira/browse/MESOS-6751
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Fixed fetcher to not pick up environment variables it should not see.
> 
> 
> Diffs
> -
> 
>   src/slave/containerizer/fetcher.cpp 
> 9ec38dc95dddfcd990369d0146986e20b15da1a0 
> 
> Diff: https://reviews.apache.org/r/56711/diff/
> 
> 
> Testing
> ---
> 
> make check
> 
> 
> Thanks,
> 
> Till Toenshoff
> 
>