Re: Review Request 42035: Windows: Removed the `--switch_user` flag in Windows.

2016-01-18 Thread Alex Clemmer


> On Jan. 12, 2016, 11:22 p.m., Joseph Wu wrote:
> > src/slave/flags.cpp, lines 206-207
> > 
> >
> > This is sort of weird, in that you only see this Windows note on 
> > non-Windows systems :)
> > 
> > Maybe pull it out into a comment.

Just regrouping on this: it is a bit weird, but these comments are supposed 
identical to the markdown document. I put them in the markdown document just 
because it's nice to have up-to-date documentation. That said, empirically we 
know the Stout README doesn't get a lot of traffic anyway, so I think this 
really ends up being mostly a technicality, unfortunately.


- Alex


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


On Jan. 7, 2016, 9:47 p.m., Alex Clemmer wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42035/
> ---
> 
> (Updated Jan. 7, 2016, 9:47 p.m.)
> 
> 
> Review request for mesos, Alex Naparu, Daniel Pravat, Artem Harutyunyan, Jie 
> Yu, and Joris Van Remoortere.
> 
> 
> Bugs: MESOS-4310
> https://issues.apache.org/jira/browse/MESOS-4310
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> The Mesos agent provides a flag, `--[no-]switch_user`, which instructs
> the agent to run tasks as the user who submitted the task instead of the
> user that is running the agent process itself.
> 
> On POSIX, this requires the usual suspects (`su`, `chown`, and `chroot`,
> for example to do things like make sure the correct user owns the
> executor directory, and things like that.
> 
> On Windows, many of these operations have very different semantics. To
> use one example, to `chown` on Windows, you normally have to give
> *permission* for something to `chown` an object, and then that thing
> actually has to use that permission to `chown` it, on its own.
> 
> Clearly a semantic mismatch of this magnitude will require some work to
> formally bridge, and the result is that we will simply disable the
> functionality entirely on the Windows agent until we are prepared to go
> back and support it formally.
> 
> 
> Diffs
> -
> 
>   docs/configuration.md fb6f6784e5d11850ba0bafaeafa3213a1038e6b4 
>   src/slave/flags.hpp 6857fde027fd57b4934cb43ddf435d12900e0b87 
>   src/slave/flags.cpp 19c2996c4572b992030f8824380f3979ced7e526 
>   src/slave/slave.cpp 90d0fecd2d83fd174134870a577ac59d79c0006f 
> 
> Diff: https://reviews.apache.org/r/42035/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Alex Clemmer
> 
>



Re: Review Request 42035: Windows: Removed the `--switch_user` flag in Windows.

2016-01-16 Thread Joris Van Remoortere

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

Ship it!


Ship It!

- Joris Van Remoortere


On Jan. 7, 2016, 9:47 p.m., Alex Clemmer wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42035/
> ---
> 
> (Updated Jan. 7, 2016, 9:47 p.m.)
> 
> 
> Review request for mesos, Alex Naparu, Daniel Pravat, Artem Harutyunyan, Jie 
> Yu, and Joris Van Remoortere.
> 
> 
> Bugs: MESOS-4310
> https://issues.apache.org/jira/browse/MESOS-4310
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> The Mesos agent provides a flag, `--[no-]switch_user`, which instructs
> the agent to run tasks as the user who submitted the task instead of the
> user that is running the agent process itself.
> 
> On POSIX, this requires the usual suspects (`su`, `chown`, and `chroot`,
> for example to do things like make sure the correct user owns the
> executor directory, and things like that.
> 
> On Windows, many of these operations have very different semantics. To
> use one example, to `chown` on Windows, you normally have to give
> *permission* for something to `chown` an object, and then that thing
> actually has to use that permission to `chown` it, on its own.
> 
> Clearly a semantic mismatch of this magnitude will require some work to
> formally bridge, and the result is that we will simply disable the
> functionality entirely on the Windows agent until we are prepared to go
> back and support it formally.
> 
> 
> Diffs
> -
> 
>   docs/configuration.md fb6f6784e5d11850ba0bafaeafa3213a1038e6b4 
>   src/slave/flags.hpp 6857fde027fd57b4934cb43ddf435d12900e0b87 
>   src/slave/flags.cpp 19c2996c4572b992030f8824380f3979ced7e526 
>   src/slave/slave.cpp 90d0fecd2d83fd174134870a577ac59d79c0006f 
> 
> Diff: https://reviews.apache.org/r/42035/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Alex Clemmer
> 
>



Re: Review Request 42035: Windows: Removed the `--switch_user` flag in Windows.

2016-01-13 Thread Alex Clemmer


> On Jan. 13, 2016, 6:21 p.m., Daniel Pravat wrote:
> > src/slave/flags.cpp, line 196
> > 
> >
> > There is a reason why this change is so extensive. This block should be 
> > replaced with a reasonable default for switch_user in Windows and it should 
> > be enough.

Per our Slack discussion, we've decided this isn't a blocking issue.

The question was about why we would not compile this flag for Windows 
specifically, and why it is acceptable here, but not elsewhere in the codebase. 
The answer is that we already conditionally don't compile other Linux-specific 
features, so there is precedent in this code for not compiling features that 
don't exist on Windows. The reason we _need_ to do this (or something like it) 
because the POSIX notion of `chown` simply doesn't exist on Windows. So, the 
result is this patch. Specifically, we `#ifdef` out the parts of the code that 
would result in `chown` being called, which is very much inline with other 
parts of the same function that are conditionally compiled only on certain 
types of Linux.


- Alex


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


On Jan. 7, 2016, 9:47 p.m., Alex Clemmer wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42035/
> ---
> 
> (Updated Jan. 7, 2016, 9:47 p.m.)
> 
> 
> Review request for mesos, Alex Naparu, Daniel Pravat, Artem Harutyunyan, Jie 
> Yu, and Joris Van Remoortere.
> 
> 
> Bugs: MESOS-4310
> https://issues.apache.org/jira/browse/MESOS-4310
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> The Mesos agent provides a flag, `--[no-]switch_user`, which instructs
> the agent to run tasks as the user who submitted the task instead of the
> user that is running the agent process itself.
> 
> On POSIX, this requires the usual suspects (`su`, `chown`, and `chroot`,
> for example to do things like make sure the correct user owns the
> executor directory, and things like that.
> 
> On Windows, many of these operations have very different semantics. To
> use one example, to `chown` on Windows, you normally have to give
> *permission* for something to `chown` an object, and then that thing
> actually has to use that permission to `chown` it, on its own.
> 
> Clearly a semantic mismatch of this magnitude will require some work to
> formally bridge, and the result is that we will simply disable the
> functionality entirely on the Windows agent until we are prepared to go
> back and support it formally.
> 
> 
> Diffs
> -
> 
>   docs/configuration.md fb6f6784e5d11850ba0bafaeafa3213a1038e6b4 
>   src/slave/flags.hpp 6857fde027fd57b4934cb43ddf435d12900e0b87 
>   src/slave/flags.cpp 19c2996c4572b992030f8824380f3979ced7e526 
>   src/slave/slave.cpp 90d0fecd2d83fd174134870a577ac59d79c0006f 
> 
> Diff: https://reviews.apache.org/r/42035/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Alex Clemmer
> 
>



Re: Review Request 42035: Windows: Removed the `--switch_user` flag in Windows.

2016-01-13 Thread Daniel Pravat

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

Ship it!


Ship It!

- Daniel Pravat


On Jan. 7, 2016, 9:47 p.m., Alex Clemmer wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42035/
> ---
> 
> (Updated Jan. 7, 2016, 9:47 p.m.)
> 
> 
> Review request for mesos, Alex Naparu, Daniel Pravat, Artem Harutyunyan, Jie 
> Yu, and Joris Van Remoortere.
> 
> 
> Bugs: MESOS-4310
> https://issues.apache.org/jira/browse/MESOS-4310
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> The Mesos agent provides a flag, `--[no-]switch_user`, which instructs
> the agent to run tasks as the user who submitted the task instead of the
> user that is running the agent process itself.
> 
> On POSIX, this requires the usual suspects (`su`, `chown`, and `chroot`,
> for example to do things like make sure the correct user owns the
> executor directory, and things like that.
> 
> On Windows, many of these operations have very different semantics. To
> use one example, to `chown` on Windows, you normally have to give
> *permission* for something to `chown` an object, and then that thing
> actually has to use that permission to `chown` it, on its own.
> 
> Clearly a semantic mismatch of this magnitude will require some work to
> formally bridge, and the result is that we will simply disable the
> functionality entirely on the Windows agent until we are prepared to go
> back and support it formally.
> 
> 
> Diffs
> -
> 
>   docs/configuration.md fb6f6784e5d11850ba0bafaeafa3213a1038e6b4 
>   src/slave/flags.hpp 6857fde027fd57b4934cb43ddf435d12900e0b87 
>   src/slave/flags.cpp 19c2996c4572b992030f8824380f3979ced7e526 
>   src/slave/slave.cpp 90d0fecd2d83fd174134870a577ac59d79c0006f 
> 
> Diff: https://reviews.apache.org/r/42035/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Alex Clemmer
> 
>



Re: Review Request 42035: Windows: Removed the `--switch_user` flag in Windows.

2016-01-13 Thread Daniel Pravat

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



src/slave/flags.cpp (line 196)


There is a reason why this change is so extensive. This block should be 
replaced with a reasonable default for switch_user in Windows and it should be 
enough.


- Daniel Pravat


On Jan. 7, 2016, 9:47 p.m., Alex Clemmer wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42035/
> ---
> 
> (Updated Jan. 7, 2016, 9:47 p.m.)
> 
> 
> Review request for mesos, Alex Naparu, Daniel Pravat, Artem Harutyunyan, Jie 
> Yu, and Joris Van Remoortere.
> 
> 
> Bugs: MESOS-4310
> https://issues.apache.org/jira/browse/MESOS-4310
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> The Mesos agent provides a flag, `--[no-]switch_user`, which instructs
> the agent to run tasks as the user who submitted the task instead of the
> user that is running the agent process itself.
> 
> On POSIX, this requires the usual suspects (`su`, `chown`, and `chroot`,
> for example to do things like make sure the correct user owns the
> executor directory, and things like that.
> 
> On Windows, many of these operations have very different semantics. To
> use one example, to `chown` on Windows, you normally have to give
> *permission* for something to `chown` an object, and then that thing
> actually has to use that permission to `chown` it, on its own.
> 
> Clearly a semantic mismatch of this magnitude will require some work to
> formally bridge, and the result is that we will simply disable the
> functionality entirely on the Windows agent until we are prepared to go
> back and support it formally.
> 
> 
> Diffs
> -
> 
>   docs/configuration.md fb6f6784e5d11850ba0bafaeafa3213a1038e6b4 
>   src/slave/flags.hpp 6857fde027fd57b4934cb43ddf435d12900e0b87 
>   src/slave/flags.cpp 19c2996c4572b992030f8824380f3979ced7e526 
>   src/slave/slave.cpp 90d0fecd2d83fd174134870a577ac59d79c0006f 
> 
> Diff: https://reviews.apache.org/r/42035/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Alex Clemmer
> 
>



Re: Review Request 42035: Windows: Removed the `--switch_user` flag in Windows.

2016-01-12 Thread Alex Naparu

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

Ship it!


Ship It!

- Alex Naparu


On Jan. 7, 2016, 9:47 p.m., Alex Clemmer wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42035/
> ---
> 
> (Updated Jan. 7, 2016, 9:47 p.m.)
> 
> 
> Review request for mesos, Alex Naparu, Daniel Pravat, Artem Harutyunyan, Jie 
> Yu, and Joris Van Remoortere.
> 
> 
> Bugs: MESOS-4310
> https://issues.apache.org/jira/browse/MESOS-4310
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> The Mesos agent provides a flag, `--[no-]switch_user`, which instructs
> the agent to run tasks as the user who submitted the task instead of the
> user that is running the agent process itself.
> 
> On POSIX, this requires the usual suspects (`su`, `chown`, and `chroot`,
> for example to do things like make sure the correct user owns the
> executor directory, and things like that.
> 
> On Windows, many of these operations have very different semantics. To
> use one example, to `chown` on Windows, you normally have to give
> *permission* for something to `chown` an object, and then that thing
> actually has to use that permission to `chown` it, on its own.
> 
> Clearly a semantic mismatch of this magnitude will require some work to
> formally bridge, and the result is that we will simply disable the
> functionality entirely on the Windows agent until we are prepared to go
> back and support it formally.
> 
> 
> Diffs
> -
> 
>   docs/configuration.md fb6f6784e5d11850ba0bafaeafa3213a1038e6b4 
>   src/slave/flags.hpp 6857fde027fd57b4934cb43ddf435d12900e0b87 
>   src/slave/flags.cpp 19c2996c4572b992030f8824380f3979ced7e526 
>   src/slave/slave.cpp 90d0fecd2d83fd174134870a577ac59d79c0006f 
> 
> Diff: https://reviews.apache.org/r/42035/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Alex Clemmer
> 
>



Re: Review Request 42035: Windows: Removed the `--switch_user` flag in Windows.

2016-01-12 Thread Joseph Wu

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


We aren't porting the (deprecated) external containerizer to Windows right?
There's a reference to `flags.switch_user` there, but it should be fine if we 
don't include it in the build.

---

Also, in `src/slave/paths.cpp`, we reference the flag in a comment.  Do you 
want add a comment there too?


src/slave/flags.cpp (lines 206 - 207)


This is sort of weird, in that you only see this Windows note on 
non-Windows systems :)

Maybe pull it out into a comment.


- Joseph Wu


On Jan. 7, 2016, 1:47 p.m., Alex Clemmer wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42035/
> ---
> 
> (Updated Jan. 7, 2016, 1:47 p.m.)
> 
> 
> Review request for mesos, Alex Naparu, Daniel Pravat, Artem Harutyunyan, Jie 
> Yu, and Joris Van Remoortere.
> 
> 
> Bugs: MESOS-4310
> https://issues.apache.org/jira/browse/MESOS-4310
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> The Mesos agent provides a flag, `--[no-]switch_user`, which instructs
> the agent to run tasks as the user who submitted the task instead of the
> user that is running the agent process itself.
> 
> On POSIX, this requires the usual suspects (`su`, `chown`, and `chroot`,
> for example to do things like make sure the correct user owns the
> executor directory, and things like that.
> 
> On Windows, many of these operations have very different semantics. To
> use one example, to `chown` on Windows, you normally have to give
> *permission* for something to `chown` an object, and then that thing
> actually has to use that permission to `chown` it, on its own.
> 
> Clearly a semantic mismatch of this magnitude will require some work to
> formally bridge, and the result is that we will simply disable the
> functionality entirely on the Windows agent until we are prepared to go
> back and support it formally.
> 
> 
> Diffs
> -
> 
>   docs/configuration.md fb6f6784e5d11850ba0bafaeafa3213a1038e6b4 
>   src/slave/flags.hpp 6857fde027fd57b4934cb43ddf435d12900e0b87 
>   src/slave/flags.cpp 19c2996c4572b992030f8824380f3979ced7e526 
>   src/slave/slave.cpp 90d0fecd2d83fd174134870a577ac59d79c0006f 
> 
> Diff: https://reviews.apache.org/r/42035/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Alex Clemmer
> 
>



Re: Review Request 42035: Windows: Removed the `--switch_user` flag in Windows.

2016-01-07 Thread Alex Clemmer

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

(Updated Jan. 7, 2016, 9:44 p.m.)


Review request for mesos, Alex Naparu, Daniel Pravat, Artem Harutyunyan, and 
Joris Van Remoortere.


Summary (updated)
-

Windows: Removed the `--switch_user` flag in Windows.


Bugs: MESOS-4310
https://issues.apache.org/jira/browse/MESOS-4310


Repository: mesos


Description
---

The Mesos agent provides a flag, `--[no-]switch_user`, which instructs
the agent to run tasks as the user who submitted the task instead of the
user that is running the agent process itself.

On POSIX, this requires the usual suspects (`su`, `chown`, and `chroot`,
for example to do things like make sure the correct user owns the
executor directory, and things like that.

On Windows, many of these operations have very different semantics. To
use one example, to `chown` on Windows, you normally have to give
*permission* for something to `chown` an object, and then that thing
actually has to use that permission to `chown` it, on its own.

Clearly a semantic mismatch of this magnitude will require some work to
formally bridge, and the result is that we will simply disable the
functionality entirely on the Windows agent until we are prepared to go
back and support it formally.


Diffs (updated)
-

  docs/configuration.md fb6f6784e5d11850ba0bafaeafa3213a1038e6b4 
  src/slave/flags.hpp 6857fde027fd57b4934cb43ddf435d12900e0b87 
  src/slave/flags.cpp 19c2996c4572b992030f8824380f3979ced7e526 
  src/slave/slave.cpp 90d0fecd2d83fd174134870a577ac59d79c0006f 

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


Testing
---


Thanks,

Alex Clemmer