Re: Review Request 59641: Follow symlinks when resolving paths specified in the various master/agent endpoints.

2017-06-05 Thread Vinod Kone

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


Ship it!




Ship It!

- Vinod Kone


On June 2, 2017, 8:59 p.m., Aaron Wood wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/59641/
> ---
> 
> (Updated June 2, 2017, 8:59 p.m.)
> 
> 
> Review request for mesos, Andrew Schwartzmeyer, James Peach, Vinod Kone, and 
> Zhitao Li.
> 
> 
> Bugs: MESOS-7572
> https://issues.apache.org/jira/browse/MESOS-7572
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> The main benefit of following symlinks in endpoints such as `/files` is that 
> frameworks will be able to construct a path to the sandbox much easier. This 
> will assist framework developers in making features that need to provide a 
> path when hitting various operator API endpoints. Currently, making use of a 
> path ending in `runs/latest` throws a 404.
> 
> One such application could be a scheduler providing the ability for users to 
> work with their task's sandbox directly without going to the Mesos UI, API 
> endpoints, or the actual system themselves.
> 
> 
> Diffs
> -
> 
>   src/slave/slave.cpp 0c7e5f4ef 
>   src/tests/gc_tests.cpp b8fa6a4b9 
> 
> 
> Diff: https://reviews.apache.org/r/59641/diff/6/
> 
> 
> Testing
> ---
> 
> `mkdir build && cd build && cmake .. && make -j2 && make check -j2`
> 
> Checked the original behavior: 
> ```
> curl -i 
> localhost:5051/files/browse?path=/tmp/slave/slaves/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0/frameworks/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001/executors/testapp-924b5c1524d84676a6a71665e2054d31/runs/cbec99c9-da2d-4aaa-bab7-4cee9a4df031
> HTTP/1.1 200 OK
> Date: Tue, 30 May 2017 17:43:08 GMT
> Content-Length: 644
> Content-Type: application/json
> 
> [{"gid":"root","mode":"-rw-r--r--","mtime":1496161813.0,"nlink":1,"path":"\/tmp\/slave\/slaves\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0\/frameworks\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001\/executors\/testapp-924b5c1524d84676a6a71665e2054d31\/runs\/cbec99c9-da2d-4aaa-bab7-4cee9a4df031\/stderr","size":255,"uid":"root"},{"gid":"root","mode":"-rw-r--r--","mtime":1496161812.0,"nlink":1,"path":"\/tmp\/slave\/slaves\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0\/frameworks\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001\/executors\/testapp-924b5c1524d84676a6a71665e2054d31\/runs\/cbec99c9-da2d-4aaa-bab7-4cee9a4df031\/stdout","size":1142,"uid":"root"}]
> ```
> 
> Checked the new behavior (this would return a 404 before this patch):
> ```
> curl -i 
> localhost:5051/files/browse?path=/tmp/slave/slaves/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0/frameworks/d3566e51-4d13-4eors/testapp-924b5c1524d84676a6a71665e2054d31/runs/latest
> HTTP/1.1 200 OK
> Date: Tue, 30 May 2017 17:43:13 GMT
> Content-Length: 584
> Content-Type: application/json
> 
> [{"gid":"root","mode":"-rw-r--r--","mtime":1496161813.0,"nlink":1,"path":"\/tmp\/slave\/slaves\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0\/frameworks\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001\/executors\/testapp-924b5c1524d84676a6a71665e2054d31\/runs\/latest\/stderr","size":255,"uid":"root"},{"gid":"root","mode":"-rw-r--r--","mtime":1496161812.0,"nlink":1,"path":"\/tmp\/slave\/slaves\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0\/frameworks\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001\/executors\/testapp-924b5c1524d84676a6a71665e2054d31\/runs\/latest\/stdout","size":1142,"uid":"root"}]
> ```
> 
> 
> Thanks,
> 
> Aaron Wood
> 
>



Re: Review Request 59641: Follow symlinks when resolving paths specified in the various master/agent endpoints.

2017-06-02 Thread Mesos Reviewbot Windows

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



Patch looks great!

Reviews applied: [59641]

Passed command: support\windows-build.bat

- Mesos Reviewbot Windows


On June 2, 2017, 8:59 p.m., Aaron Wood wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/59641/
> ---
> 
> (Updated June 2, 2017, 8:59 p.m.)
> 
> 
> Review request for mesos, Andrew Schwartzmeyer, James Peach, Vinod Kone, and 
> Zhitao Li.
> 
> 
> Bugs: MESOS-7572
> https://issues.apache.org/jira/browse/MESOS-7572
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> The main benefit of following symlinks in endpoints such as `/files` is that 
> frameworks will be able to construct a path to the sandbox much easier. This 
> will assist framework developers in making features that need to provide a 
> path when hitting various operator API endpoints. Currently, making use of a 
> path ending in `runs/latest` throws a 404.
> 
> One such application could be a scheduler providing the ability for users to 
> work with their task's sandbox directly without going to the Mesos UI, API 
> endpoints, or the actual system themselves.
> 
> 
> Diffs
> -
> 
>   src/slave/slave.cpp 0c7e5f4ef 
>   src/tests/gc_tests.cpp b8fa6a4b9 
> 
> 
> Diff: https://reviews.apache.org/r/59641/diff/6/
> 
> 
> Testing
> ---
> 
> `mkdir build && cd build && cmake .. && make -j2 && make check -j2`
> 
> Checked the original behavior: 
> ```
> curl -i 
> localhost:5051/files/browse?path=/tmp/slave/slaves/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0/frameworks/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001/executors/testapp-924b5c1524d84676a6a71665e2054d31/runs/cbec99c9-da2d-4aaa-bab7-4cee9a4df031
> HTTP/1.1 200 OK
> Date: Tue, 30 May 2017 17:43:08 GMT
> Content-Length: 644
> Content-Type: application/json
> 
> [{"gid":"root","mode":"-rw-r--r--","mtime":1496161813.0,"nlink":1,"path":"\/tmp\/slave\/slaves\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0\/frameworks\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001\/executors\/testapp-924b5c1524d84676a6a71665e2054d31\/runs\/cbec99c9-da2d-4aaa-bab7-4cee9a4df031\/stderr","size":255,"uid":"root"},{"gid":"root","mode":"-rw-r--r--","mtime":1496161812.0,"nlink":1,"path":"\/tmp\/slave\/slaves\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0\/frameworks\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001\/executors\/testapp-924b5c1524d84676a6a71665e2054d31\/runs\/cbec99c9-da2d-4aaa-bab7-4cee9a4df031\/stdout","size":1142,"uid":"root"}]
> ```
> 
> Checked the new behavior (this would return a 404 before this patch):
> ```
> curl -i 
> localhost:5051/files/browse?path=/tmp/slave/slaves/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0/frameworks/d3566e51-4d13-4eors/testapp-924b5c1524d84676a6a71665e2054d31/runs/latest
> HTTP/1.1 200 OK
> Date: Tue, 30 May 2017 17:43:13 GMT
> Content-Length: 584
> Content-Type: application/json
> 
> [{"gid":"root","mode":"-rw-r--r--","mtime":1496161813.0,"nlink":1,"path":"\/tmp\/slave\/slaves\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0\/frameworks\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001\/executors\/testapp-924b5c1524d84676a6a71665e2054d31\/runs\/latest\/stderr","size":255,"uid":"root"},{"gid":"root","mode":"-rw-r--r--","mtime":1496161812.0,"nlink":1,"path":"\/tmp\/slave\/slaves\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0\/frameworks\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001\/executors\/testapp-924b5c1524d84676a6a71665e2054d31\/runs\/latest\/stdout","size":1142,"uid":"root"}]
> ```
> 
> 
> Thanks,
> 
> Aaron Wood
> 
>



Re: Review Request 59641: Follow symlinks when resolving paths specified in the various master/agent endpoints.

2017-06-02 Thread Aaron Wood via Review Board

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

(Updated June 2, 2017, 8:59 p.m.)


Review request for mesos, Andrew Schwartzmeyer, James Peach, Vinod Kone, and 
Zhitao Li.


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


Repository: mesos


Description
---

The main benefit of following symlinks in endpoints such as `/files` is that 
frameworks will be able to construct a path to the sandbox much easier. This 
will assist framework developers in making features that need to provide a path 
when hitting various operator API endpoints. Currently, making use of a path 
ending in `runs/latest` throws a 404.

One such application could be a scheduler providing the ability for users to 
work with their task's sandbox directly without going to the Mesos UI, API 
endpoints, or the actual system themselves.


Diffs (updated)
-

  src/slave/slave.cpp 0c7e5f4ef 
  src/tests/gc_tests.cpp b8fa6a4b9 


Diff: https://reviews.apache.org/r/59641/diff/6/

Changes: https://reviews.apache.org/r/59641/diff/5-6/


Testing
---

`mkdir build && cd build && cmake .. && make -j2 && make check -j2`

Checked the original behavior: 
```
curl -i 
localhost:5051/files/browse?path=/tmp/slave/slaves/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0/frameworks/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001/executors/testapp-924b5c1524d84676a6a71665e2054d31/runs/cbec99c9-da2d-4aaa-bab7-4cee9a4df031
HTTP/1.1 200 OK
Date: Tue, 30 May 2017 17:43:08 GMT
Content-Length: 644
Content-Type: application/json

[{"gid":"root","mode":"-rw-r--r--","mtime":1496161813.0,"nlink":1,"path":"\/tmp\/slave\/slaves\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0\/frameworks\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001\/executors\/testapp-924b5c1524d84676a6a71665e2054d31\/runs\/cbec99c9-da2d-4aaa-bab7-4cee9a4df031\/stderr","size":255,"uid":"root"},{"gid":"root","mode":"-rw-r--r--","mtime":1496161812.0,"nlink":1,"path":"\/tmp\/slave\/slaves\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0\/frameworks\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001\/executors\/testapp-924b5c1524d84676a6a71665e2054d31\/runs\/cbec99c9-da2d-4aaa-bab7-4cee9a4df031\/stdout","size":1142,"uid":"root"}]
```

Checked the new behavior (this would return a 404 before this patch):
```
curl -i 
localhost:5051/files/browse?path=/tmp/slave/slaves/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0/frameworks/d3566e51-4d13-4eors/testapp-924b5c1524d84676a6a71665e2054d31/runs/latest
HTTP/1.1 200 OK
Date: Tue, 30 May 2017 17:43:13 GMT
Content-Length: 584
Content-Type: application/json

[{"gid":"root","mode":"-rw-r--r--","mtime":1496161813.0,"nlink":1,"path":"\/tmp\/slave\/slaves\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0\/frameworks\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001\/executors\/testapp-924b5c1524d84676a6a71665e2054d31\/runs\/latest\/stderr","size":255,"uid":"root"},{"gid":"root","mode":"-rw-r--r--","mtime":1496161812.0,"nlink":1,"path":"\/tmp\/slave\/slaves\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0\/frameworks\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001\/executors\/testapp-924b5c1524d84676a6a71665e2054d31\/runs\/latest\/stdout","size":1142,"uid":"root"}]
```


Thanks,

Aaron Wood



Re: Review Request 59641: Follow symlinks when resolving paths specified in the various master/agent endpoints.

2017-06-02 Thread Aaron Wood via Review Board

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

(Updated June 2, 2017, 2:28 p.m.)


Review request for mesos, Andrew Schwartzmeyer, James Peach, Vinod Kone, and 
Zhitao Li.


Changes
---

Added check to make sure the attached latest symlink is cleaned up.


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


Repository: mesos


Description
---

The main benefit of following symlinks in endpoints such as `/files` is that 
frameworks will be able to construct a path to the sandbox much easier. This 
will assist framework developers in making features that need to provide a path 
when hitting various operator API endpoints. Currently, making use of a path 
ending in `runs/latest` throws a 404.

One such application could be a scheduler providing the ability for users to 
work with their task's sandbox directly without going to the Mesos UI, API 
endpoints, or the actual system themselves.


Diffs (updated)
-

  src/slave/slave.cpp 14de72fa4 
  src/tests/gc_tests.cpp b8fa6a4b9 


Diff: https://reviews.apache.org/r/59641/diff/5/

Changes: https://reviews.apache.org/r/59641/diff/4-5/


Testing
---

`mkdir build && cd build && cmake .. && make -j2 && make check -j2`

Checked the original behavior: 
```
curl -i 
localhost:5051/files/browse?path=/tmp/slave/slaves/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0/frameworks/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001/executors/testapp-924b5c1524d84676a6a71665e2054d31/runs/cbec99c9-da2d-4aaa-bab7-4cee9a4df031
HTTP/1.1 200 OK
Date: Tue, 30 May 2017 17:43:08 GMT
Content-Length: 644
Content-Type: application/json

[{"gid":"root","mode":"-rw-r--r--","mtime":1496161813.0,"nlink":1,"path":"\/tmp\/slave\/slaves\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0\/frameworks\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001\/executors\/testapp-924b5c1524d84676a6a71665e2054d31\/runs\/cbec99c9-da2d-4aaa-bab7-4cee9a4df031\/stderr","size":255,"uid":"root"},{"gid":"root","mode":"-rw-r--r--","mtime":1496161812.0,"nlink":1,"path":"\/tmp\/slave\/slaves\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0\/frameworks\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001\/executors\/testapp-924b5c1524d84676a6a71665e2054d31\/runs\/cbec99c9-da2d-4aaa-bab7-4cee9a4df031\/stdout","size":1142,"uid":"root"}]
```

Checked the new behavior (this would return a 404 before this patch):
```
curl -i 
localhost:5051/files/browse?path=/tmp/slave/slaves/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0/frameworks/d3566e51-4d13-4eors/testapp-924b5c1524d84676a6a71665e2054d31/runs/latest
HTTP/1.1 200 OK
Date: Tue, 30 May 2017 17:43:13 GMT
Content-Length: 584
Content-Type: application/json

[{"gid":"root","mode":"-rw-r--r--","mtime":1496161813.0,"nlink":1,"path":"\/tmp\/slave\/slaves\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0\/frameworks\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001\/executors\/testapp-924b5c1524d84676a6a71665e2054d31\/runs\/latest\/stderr","size":255,"uid":"root"},{"gid":"root","mode":"-rw-r--r--","mtime":1496161812.0,"nlink":1,"path":"\/tmp\/slave\/slaves\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0\/frameworks\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001\/executors\/testapp-924b5c1524d84676a6a71665e2054d31\/runs\/latest\/stdout","size":1142,"uid":"root"}]
```


Thanks,

Aaron Wood



Re: Review Request 59641: Follow symlinks when resolving paths specified in the various master/agent endpoints.

2017-06-01 Thread Aaron Wood via Review Board

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

(Updated June 1, 2017, 9:22 p.m.)


Review request for mesos, Andrew Schwartzmeyer, James Peach, Vinod Kone, and 
Zhitao Li.


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


Repository: mesos


Description
---

The main benefit of following symlinks in endpoints such as `/files` is that 
frameworks will be able to construct a path to the sandbox much easier. This 
will assist framework developers in making features that need to provide a path 
when hitting various operator API endpoints. Currently, making use of a path 
ending in `runs/latest` throws a 404.

One such application could be a scheduler providing the ability for users to 
work with their task's sandbox directly without going to the Mesos UI, API 
endpoints, or the actual system themselves.


Diffs (updated)
-

  src/slave/slave.cpp 14de72fa4 
  src/tests/gc_tests.cpp b8fa6a4b9 


Diff: https://reviews.apache.org/r/59641/diff/4/

Changes: https://reviews.apache.org/r/59641/diff/3-4/


Testing
---

`mkdir build && cd build && cmake .. && make -j2 && make check -j2`

Checked the original behavior: 
```
curl -i 
localhost:5051/files/browse?path=/tmp/slave/slaves/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0/frameworks/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001/executors/testapp-924b5c1524d84676a6a71665e2054d31/runs/cbec99c9-da2d-4aaa-bab7-4cee9a4df031
HTTP/1.1 200 OK
Date: Tue, 30 May 2017 17:43:08 GMT
Content-Length: 644
Content-Type: application/json

[{"gid":"root","mode":"-rw-r--r--","mtime":1496161813.0,"nlink":1,"path":"\/tmp\/slave\/slaves\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0\/frameworks\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001\/executors\/testapp-924b5c1524d84676a6a71665e2054d31\/runs\/cbec99c9-da2d-4aaa-bab7-4cee9a4df031\/stderr","size":255,"uid":"root"},{"gid":"root","mode":"-rw-r--r--","mtime":1496161812.0,"nlink":1,"path":"\/tmp\/slave\/slaves\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0\/frameworks\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001\/executors\/testapp-924b5c1524d84676a6a71665e2054d31\/runs\/cbec99c9-da2d-4aaa-bab7-4cee9a4df031\/stdout","size":1142,"uid":"root"}]
```

Checked the new behavior (this would return a 404 before this patch):
```
curl -i 
localhost:5051/files/browse?path=/tmp/slave/slaves/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0/frameworks/d3566e51-4d13-4eors/testapp-924b5c1524d84676a6a71665e2054d31/runs/latest
HTTP/1.1 200 OK
Date: Tue, 30 May 2017 17:43:13 GMT
Content-Length: 584
Content-Type: application/json

[{"gid":"root","mode":"-rw-r--r--","mtime":1496161813.0,"nlink":1,"path":"\/tmp\/slave\/slaves\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0\/frameworks\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001\/executors\/testapp-924b5c1524d84676a6a71665e2054d31\/runs\/latest\/stderr","size":255,"uid":"root"},{"gid":"root","mode":"-rw-r--r--","mtime":1496161812.0,"nlink":1,"path":"\/tmp\/slave\/slaves\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0\/frameworks\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001\/executors\/testapp-924b5c1524d84676a6a71665e2054d31\/runs\/latest\/stdout","size":1142,"uid":"root"}]
```


Thanks,

Aaron Wood



Re: Review Request 59641: Follow symlinks when resolving paths specified in the various master/agent endpoints.

2017-06-01 Thread Vinod Kone

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




src/slave/slave.cpp
Lines 5311 (patched)


no need for this. see below.



src/slave/slave.cpp
Lines 5322 (patched)


tl:dr; Don't do `garbageCollect` and move the `.then` from #5323 to #5332

I don't think we should gc the symlink here. If another instance of the 
executor lands on this node the symlink will be pointing to that instance's 
sandbox; so scheduling it for gc is dangerous!

The symlink gets automatically gc'ed when the top level executor directory 
gets gc'ed; see #5332 below. So we don't need to call `garbageCollect` on the 
symlink specifically. But, we still need to make sure we remove the entry from 
`files` when the top level executor directory gets removed.



src/slave/slave.cpp
Lines 6963 (patched)


see below.



src/slave/slave.cpp
Lines 7176-7177 (patched)


s/"runs/latest"/"latest"/



src/slave/slave.cpp
Lines 7177 (patched)


s/task/task without having to know the container id/



src/slave/slave.cpp
Lines 7215-7216 (patched)


no need for this? see above.



src/slave/slave.cpp
Lines 7215-7216 (patched)


See above.

Move `.then` to #7223.



src/tests/files_tests.cpp
Lines 252-287 (original), 253-294 (patched)


Not sure if this test adds much value?

The fact that you created a symlink called "latest" has no bearing with 
doing an attach with a virtual name called "latest".

I think it's worth writing a test that specifically checks that 
"/runs/latest" can be used to browse the executor's sandbox. You can modify 
one of the existing tests (perhaps ExitedExecutor test in gc_tests.cpp) that 
brings up an executor.


- Vinod Kone


On May 31, 2017, 6:57 p.m., Aaron Wood wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/59641/
> ---
> 
> (Updated May 31, 2017, 6:57 p.m.)
> 
> 
> Review request for mesos, Andrew Schwartzmeyer, James Peach, Vinod Kone, and 
> Zhitao Li.
> 
> 
> Bugs: MESOS-7572
> https://issues.apache.org/jira/browse/MESOS-7572
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> The main benefit of following symlinks in endpoints such as `/files` is that 
> frameworks will be able to construct a path to the sandbox much easier. This 
> will assist framework developers in making features that need to provide a 
> path when hitting various operator API endpoints. Currently, making use of a 
> path ending in `runs/latest` throws a 404.
> 
> One such application could be a scheduler providing the ability for users to 
> work with their task's sandbox directly without going to the Mesos UI, API 
> endpoints, or the actual system themselves.
> 
> 
> Diffs
> -
> 
>   src/slave/slave.cpp 14de72fa4 
>   src/tests/files_tests.cpp c703cae03 
> 
> 
> Diff: https://reviews.apache.org/r/59641/diff/3/
> 
> 
> Testing
> ---
> 
> `mkdir build && cd build && cmake .. && make -j2 && make check -j2`
> 
> Checked the original behavior: 
> ```
> curl -i 
> localhost:5051/files/browse?path=/tmp/slave/slaves/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0/frameworks/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001/executors/testapp-924b5c1524d84676a6a71665e2054d31/runs/cbec99c9-da2d-4aaa-bab7-4cee9a4df031
> HTTP/1.1 200 OK
> Date: Tue, 30 May 2017 17:43:08 GMT
> Content-Length: 644
> Content-Type: application/json
> 
> [{"gid":"root","mode":"-rw-r--r--","mtime":1496161813.0,"nlink":1,"path":"\/tmp\/slave\/slaves\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0\/frameworks\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001\/executors\/testapp-924b5c1524d84676a6a71665e2054d31\/runs\/cbec99c9-da2d-4aaa-bab7-4cee9a4df031\/stderr","size":255,"uid":"root"},{"gid":"root","mode":"-rw-r--r--","mtime":1496161812.0,"nlink":1,"path":"\/tmp\/slave\/slaves\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0\/frameworks\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001\/executors\/testapp-924b5c1524d84676a6a71665e2054d31\/runs\/cbec99c9-da2d-4aaa-bab7-4cee9a4df031\/stdout","size":1142,"uid":"root"}]
> ```
> 
> Checked the new behavior (this would return a 404 before this patch):
> ```
> curl -i 
> localhost:5051/files/browse?path=/tmp/slave/slaves/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0/frameworks/d3566e51-4d13-4eors/testapp-924b5c1524d84676a6a71665e2054d31/

Re: Review Request 59641: Follow symlinks when resolving paths specified in the various master/agent endpoints.

2017-05-31 Thread Mesos Reviewbot

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



Patch looks great!

Reviews applied: [59641]

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 May 31, 2017, 6:57 p.m., Aaron Wood wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/59641/
> ---
> 
> (Updated May 31, 2017, 6:57 p.m.)
> 
> 
> Review request for mesos, Andrew Schwartzmeyer, James Peach, Vinod Kone, and 
> Zhitao Li.
> 
> 
> Bugs: MESOS-7572
> https://issues.apache.org/jira/browse/MESOS-7572
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> The main benefit of following symlinks in endpoints such as `/files` is that 
> frameworks will be able to construct a path to the sandbox much easier. This 
> will assist framework developers in making features that need to provide a 
> path when hitting various operator API endpoints. Currently, making use of a 
> path ending in `runs/latest` throws a 404.
> 
> One such application could be a scheduler providing the ability for users to 
> work with their task's sandbox directly without going to the Mesos UI, API 
> endpoints, or the actual system themselves.
> 
> 
> Diffs
> -
> 
>   src/slave/slave.cpp 14de72fa4 
>   src/tests/files_tests.cpp c703cae03 
> 
> 
> Diff: https://reviews.apache.org/r/59641/diff/3/
> 
> 
> Testing
> ---
> 
> `mkdir build && cd build && cmake .. && make -j2 && make check -j2`
> 
> Checked the original behavior: 
> ```
> curl -i 
> localhost:5051/files/browse?path=/tmp/slave/slaves/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0/frameworks/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001/executors/testapp-924b5c1524d84676a6a71665e2054d31/runs/cbec99c9-da2d-4aaa-bab7-4cee9a4df031
> HTTP/1.1 200 OK
> Date: Tue, 30 May 2017 17:43:08 GMT
> Content-Length: 644
> Content-Type: application/json
> 
> [{"gid":"root","mode":"-rw-r--r--","mtime":1496161813.0,"nlink":1,"path":"\/tmp\/slave\/slaves\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0\/frameworks\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001\/executors\/testapp-924b5c1524d84676a6a71665e2054d31\/runs\/cbec99c9-da2d-4aaa-bab7-4cee9a4df031\/stderr","size":255,"uid":"root"},{"gid":"root","mode":"-rw-r--r--","mtime":1496161812.0,"nlink":1,"path":"\/tmp\/slave\/slaves\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0\/frameworks\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001\/executors\/testapp-924b5c1524d84676a6a71665e2054d31\/runs\/cbec99c9-da2d-4aaa-bab7-4cee9a4df031\/stdout","size":1142,"uid":"root"}]
> ```
> 
> Checked the new behavior (this would return a 404 before this patch):
> ```
> curl -i 
> localhost:5051/files/browse?path=/tmp/slave/slaves/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0/frameworks/d3566e51-4d13-4eors/testapp-924b5c1524d84676a6a71665e2054d31/runs/latest
> HTTP/1.1 200 OK
> Date: Tue, 30 May 2017 17:43:13 GMT
> Content-Length: 584
> Content-Type: application/json
> 
> [{"gid":"root","mode":"-rw-r--r--","mtime":1496161813.0,"nlink":1,"path":"\/tmp\/slave\/slaves\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0\/frameworks\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001\/executors\/testapp-924b5c1524d84676a6a71665e2054d31\/runs\/latest\/stderr","size":255,"uid":"root"},{"gid":"root","mode":"-rw-r--r--","mtime":1496161812.0,"nlink":1,"path":"\/tmp\/slave\/slaves\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0\/frameworks\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001\/executors\/testapp-924b5c1524d84676a6a71665e2054d31\/runs\/latest\/stdout","size":1142,"uid":"root"}]
> ```
> 
> 
> Thanks,
> 
> Aaron Wood
> 
>



Re: Review Request 59641: Follow symlinks when resolving paths specified in the various master/agent endpoints.

2017-05-31 Thread Aaron Wood via Review Board

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

(Updated May 31, 2017, 6:57 p.m.)


Review request for mesos, Andrew Schwartzmeyer, James Peach, Vinod Kone, and 
Zhitao Li.


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


Repository: mesos


Description
---

The main benefit of following symlinks in endpoints such as `/files` is that 
frameworks will be able to construct a path to the sandbox much easier. This 
will assist framework developers in making features that need to provide a path 
when hitting various operator API endpoints. Currently, making use of a path 
ending in `runs/latest` throws a 404.

One such application could be a scheduler providing the ability for users to 
work with their task's sandbox directly without going to the Mesos UI, API 
endpoints, or the actual system themselves.


Diffs (updated)
-

  src/slave/slave.cpp 14de72fa4 
  src/tests/files_tests.cpp c703cae03 


Diff: https://reviews.apache.org/r/59641/diff/3/

Changes: https://reviews.apache.org/r/59641/diff/2-3/


Testing
---

`mkdir build && cd build && cmake .. && make -j2 && make check -j2`

Checked the original behavior: 
```
curl -i 
localhost:5051/files/browse?path=/tmp/slave/slaves/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0/frameworks/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001/executors/testapp-924b5c1524d84676a6a71665e2054d31/runs/cbec99c9-da2d-4aaa-bab7-4cee9a4df031
HTTP/1.1 200 OK
Date: Tue, 30 May 2017 17:43:08 GMT
Content-Length: 644
Content-Type: application/json

[{"gid":"root","mode":"-rw-r--r--","mtime":1496161813.0,"nlink":1,"path":"\/tmp\/slave\/slaves\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0\/frameworks\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001\/executors\/testapp-924b5c1524d84676a6a71665e2054d31\/runs\/cbec99c9-da2d-4aaa-bab7-4cee9a4df031\/stderr","size":255,"uid":"root"},{"gid":"root","mode":"-rw-r--r--","mtime":1496161812.0,"nlink":1,"path":"\/tmp\/slave\/slaves\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0\/frameworks\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001\/executors\/testapp-924b5c1524d84676a6a71665e2054d31\/runs\/cbec99c9-da2d-4aaa-bab7-4cee9a4df031\/stdout","size":1142,"uid":"root"}]
```

Checked the new behavior (this would return a 404 before this patch):
```
curl -i 
localhost:5051/files/browse?path=/tmp/slave/slaves/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0/frameworks/d3566e51-4d13-4eors/testapp-924b5c1524d84676a6a71665e2054d31/runs/latest
HTTP/1.1 200 OK
Date: Tue, 30 May 2017 17:43:13 GMT
Content-Length: 584
Content-Type: application/json

[{"gid":"root","mode":"-rw-r--r--","mtime":1496161813.0,"nlink":1,"path":"\/tmp\/slave\/slaves\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0\/frameworks\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001\/executors\/testapp-924b5c1524d84676a6a71665e2054d31\/runs\/latest\/stderr","size":255,"uid":"root"},{"gid":"root","mode":"-rw-r--r--","mtime":1496161812.0,"nlink":1,"path":"\/tmp\/slave\/slaves\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0\/frameworks\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001\/executors\/testapp-924b5c1524d84676a6a71665e2054d31\/runs\/latest\/stdout","size":1142,"uid":"root"}]
```


Thanks,

Aaron Wood



Re: Review Request 59641: Follow symlinks when resolving paths specified in the various master/agent endpoints.

2017-05-31 Thread Aaron Wood via Review Board


> On May 31, 2017, 1:05 a.m., Vinod Kone wrote:
> > src/files/files.cpp
> > Line 874 (original), 874 (patched)
> > 
> >
> > I don't follow this. Why are we checking random prefixes for whether 
> > they are symlinks on the file system?

I had done this because the path parts that are stored in the map represent the 
resolved symlink. The path that's passed into this method here is the symlink 
pre-resolved. Without that check the `continue` statement gets hit until we're 
out of the loop and then return `None()`.


> On May 31, 2017, 1:05 a.m., Vinod Kone wrote:
> > src/files/files.cpp
> > Lines 892-909 (patched)
> > 
> >
> > Instead of doing all this, can we just "attach" "./run/latest" to 
> > the files actor when we attach the ".../run/"? See 
> > `Framework::addExecutor` and `Framework::recoverExecutor` in slave.cpp. 
> > Look for `files->attach(...)`. That to me seems more straightforward?

Sounds good, I'll have a look.


> On May 31, 2017, 1:05 a.m., Vinod Kone wrote:
> > src/files/files.cpp
> > Line 893 (original), 912 (patched)
> > 
> >
> > I would do the shadow variable fix in a separate dependent review 
> > instead of mixing it here.

I'll revert my naming changes here. Why is it that this kind of change needs a 
separate patch?


- Aaron


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


On May 30, 2017, 8:14 p.m., Aaron Wood wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/59641/
> ---
> 
> (Updated May 30, 2017, 8:14 p.m.)
> 
> 
> Review request for mesos, Andrew Schwartzmeyer, James Peach, Vinod Kone, and 
> Zhitao Li.
> 
> 
> Bugs: MESOS-7572
> https://issues.apache.org/jira/browse/MESOS-7572
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> The main benefit of following symlinks in endpoints such as `/files` is that 
> frameworks will be able to construct a path to the sandbox much easier. This 
> will assist framework developers in making features that need to provide a 
> path when hitting various operator API endpoints. Currently, making use of a 
> path ending in `runs/latest` throws a 404.
> 
> One such application could be a scheduler providing the ability for users to 
> work with their task's sandbox directly without going to the Mesos UI, API 
> endpoints, or the actual system themselves.
> 
> 
> Diffs
> -
> 
>   src/files/files.cpp b03279ee0 
>   src/tests/files_tests.cpp c703cae03 
> 
> 
> Diff: https://reviews.apache.org/r/59641/diff/2/
> 
> 
> Testing
> ---
> 
> `mkdir build && cd build && cmake .. && make -j2 && make check -j2`
> 
> Checked the original behavior: 
> ```
> curl -i 
> localhost:5051/files/browse?path=/tmp/slave/slaves/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0/frameworks/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001/executors/testapp-924b5c1524d84676a6a71665e2054d31/runs/cbec99c9-da2d-4aaa-bab7-4cee9a4df031
> HTTP/1.1 200 OK
> Date: Tue, 30 May 2017 17:43:08 GMT
> Content-Length: 644
> Content-Type: application/json
> 
> [{"gid":"root","mode":"-rw-r--r--","mtime":1496161813.0,"nlink":1,"path":"\/tmp\/slave\/slaves\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0\/frameworks\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001\/executors\/testapp-924b5c1524d84676a6a71665e2054d31\/runs\/cbec99c9-da2d-4aaa-bab7-4cee9a4df031\/stderr","size":255,"uid":"root"},{"gid":"root","mode":"-rw-r--r--","mtime":1496161812.0,"nlink":1,"path":"\/tmp\/slave\/slaves\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0\/frameworks\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001\/executors\/testapp-924b5c1524d84676a6a71665e2054d31\/runs\/cbec99c9-da2d-4aaa-bab7-4cee9a4df031\/stdout","size":1142,"uid":"root"}]
> ```
> 
> Checked the new behavior (this would return a 404 before this patch):
> ```
> curl -i 
> localhost:5051/files/browse?path=/tmp/slave/slaves/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0/frameworks/d3566e51-4d13-4eors/testapp-924b5c1524d84676a6a71665e2054d31/runs/latest
> HTTP/1.1 200 OK
> Date: Tue, 30 May 2017 17:43:13 GMT
> Content-Length: 584
> Content-Type: application/json
> 
> [{"gid":"root","mode":"-rw-r--r--","mtime":1496161813.0,"nlink":1,"path":"\/tmp\/slave\/slaves\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0\/frameworks\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001\/executors\/testapp-924b5c1524d84676a6a71665e2054d31\/runs\/latest\/stderr","size":255,"uid":"root"},{"gid":"root","mode":"-rw-r--r--","mtime":1496161812.0,"nlink":1,"path":"\/tmp\/slave\/slaves\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0\

Re: Review Request 59641: Follow symlinks when resolving paths specified in the various master/agent endpoints.

2017-05-30 Thread Vinod Kone

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




src/files/files.cpp
Line 874 (original), 874 (patched)


I don't follow this. Why are we checking random prefixes for whether they 
are symlinks on the file system?



src/files/files.cpp
Lines 892-909 (patched)


Instead of doing all this, can we just "attach" "./run/latest" to the 
files actor when we attach the ".../run/"? See `Framework::addExecutor` 
and `Framework::recoverExecutor` in slave.cpp. Look for `files->attach(...)`. 
That to me seems more straightforward?



src/files/files.cpp
Line 893 (original), 912 (patched)


I would do the shadow variable fix in a separate dependent review instead 
of mixing it here.


- Vinod Kone


On May 30, 2017, 8:14 p.m., Aaron Wood wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/59641/
> ---
> 
> (Updated May 30, 2017, 8:14 p.m.)
> 
> 
> Review request for mesos, Andrew Schwartzmeyer, James Peach, Vinod Kone, and 
> Zhitao Li.
> 
> 
> Bugs: MESOS-7572
> https://issues.apache.org/jira/browse/MESOS-7572
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> The main benefit of following symlinks in endpoints such as `/files` is that 
> frameworks will be able to construct a path to the sandbox much easier. This 
> will assist framework developers in making features that need to provide a 
> path when hitting various operator API endpoints. Currently, making use of a 
> path ending in `runs/latest` throws a 404.
> 
> One such application could be a scheduler providing the ability for users to 
> work with their task's sandbox directly without going to the Mesos UI, API 
> endpoints, or the actual system themselves.
> 
> 
> Diffs
> -
> 
>   src/files/files.cpp b03279ee0 
>   src/tests/files_tests.cpp c703cae03 
> 
> 
> Diff: https://reviews.apache.org/r/59641/diff/2/
> 
> 
> Testing
> ---
> 
> `mkdir build && cd build && cmake .. && make -j2 && make check -j2`
> 
> Checked the original behavior: 
> ```
> curl -i 
> localhost:5051/files/browse?path=/tmp/slave/slaves/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0/frameworks/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001/executors/testapp-924b5c1524d84676a6a71665e2054d31/runs/cbec99c9-da2d-4aaa-bab7-4cee9a4df031
> HTTP/1.1 200 OK
> Date: Tue, 30 May 2017 17:43:08 GMT
> Content-Length: 644
> Content-Type: application/json
> 
> [{"gid":"root","mode":"-rw-r--r--","mtime":1496161813.0,"nlink":1,"path":"\/tmp\/slave\/slaves\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0\/frameworks\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001\/executors\/testapp-924b5c1524d84676a6a71665e2054d31\/runs\/cbec99c9-da2d-4aaa-bab7-4cee9a4df031\/stderr","size":255,"uid":"root"},{"gid":"root","mode":"-rw-r--r--","mtime":1496161812.0,"nlink":1,"path":"\/tmp\/slave\/slaves\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0\/frameworks\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001\/executors\/testapp-924b5c1524d84676a6a71665e2054d31\/runs\/cbec99c9-da2d-4aaa-bab7-4cee9a4df031\/stdout","size":1142,"uid":"root"}]
> ```
> 
> Checked the new behavior (this would return a 404 before this patch):
> ```
> curl -i 
> localhost:5051/files/browse?path=/tmp/slave/slaves/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0/frameworks/d3566e51-4d13-4eors/testapp-924b5c1524d84676a6a71665e2054d31/runs/latest
> HTTP/1.1 200 OK
> Date: Tue, 30 May 2017 17:43:13 GMT
> Content-Length: 584
> Content-Type: application/json
> 
> [{"gid":"root","mode":"-rw-r--r--","mtime":1496161813.0,"nlink":1,"path":"\/tmp\/slave\/slaves\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0\/frameworks\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001\/executors\/testapp-924b5c1524d84676a6a71665e2054d31\/runs\/latest\/stderr","size":255,"uid":"root"},{"gid":"root","mode":"-rw-r--r--","mtime":1496161812.0,"nlink":1,"path":"\/tmp\/slave\/slaves\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0\/frameworks\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001\/executors\/testapp-924b5c1524d84676a6a71665e2054d31\/runs\/latest\/stdout","size":1142,"uid":"root"}]
> ```
> 
> 
> Thanks,
> 
> Aaron Wood
> 
>



Re: Review Request 59641: Follow symlinks when resolving paths specified in the various master/agent endpoints.

2017-05-30 Thread Mesos Reviewbot

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



Patch looks great!

Reviews applied: [59641]

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 May 30, 2017, 8:14 p.m., Aaron Wood wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/59641/
> ---
> 
> (Updated May 30, 2017, 8:14 p.m.)
> 
> 
> Review request for mesos, Andrew Schwartzmeyer, James Peach, Vinod Kone, and 
> Zhitao Li.
> 
> 
> Bugs: MESOS-7572
> https://issues.apache.org/jira/browse/MESOS-7572
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> The main benefit of following symlinks in endpoints such as `/files` is that 
> frameworks will be able to construct a path to the sandbox much easier. This 
> will assist framework developers in making features that need to provide a 
> path when hitting various operator API endpoints. Currently, making use of a 
> path ending in `runs/latest` throws a 404.
> 
> One such application could be a scheduler providing the ability for users to 
> work with their task's sandbox directly without going to the Mesos UI, API 
> endpoints, or the actual system themselves.
> 
> 
> Diffs
> -
> 
>   src/files/files.cpp b03279ee0 
>   src/tests/files_tests.cpp c703cae03 
> 
> 
> Diff: https://reviews.apache.org/r/59641/diff/2/
> 
> 
> Testing
> ---
> 
> `mkdir build && cd build && cmake .. && make -j2 && make check -j2`
> 
> Checked the original behavior: 
> ```
> curl -i 
> localhost:5051/files/browse?path=/tmp/slave/slaves/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0/frameworks/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001/executors/testapp-924b5c1524d84676a6a71665e2054d31/runs/cbec99c9-da2d-4aaa-bab7-4cee9a4df031
> HTTP/1.1 200 OK
> Date: Tue, 30 May 2017 17:43:08 GMT
> Content-Length: 644
> Content-Type: application/json
> 
> [{"gid":"root","mode":"-rw-r--r--","mtime":1496161813.0,"nlink":1,"path":"\/tmp\/slave\/slaves\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0\/frameworks\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001\/executors\/testapp-924b5c1524d84676a6a71665e2054d31\/runs\/cbec99c9-da2d-4aaa-bab7-4cee9a4df031\/stderr","size":255,"uid":"root"},{"gid":"root","mode":"-rw-r--r--","mtime":1496161812.0,"nlink":1,"path":"\/tmp\/slave\/slaves\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0\/frameworks\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001\/executors\/testapp-924b5c1524d84676a6a71665e2054d31\/runs\/cbec99c9-da2d-4aaa-bab7-4cee9a4df031\/stdout","size":1142,"uid":"root"}]
> ```
> 
> Checked the new behavior (this would return a 404 before this patch):
> ```
> curl -i 
> localhost:5051/files/browse?path=/tmp/slave/slaves/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0/frameworks/d3566e51-4d13-4eors/testapp-924b5c1524d84676a6a71665e2054d31/runs/latest
> HTTP/1.1 200 OK
> Date: Tue, 30 May 2017 17:43:13 GMT
> Content-Length: 584
> Content-Type: application/json
> 
> [{"gid":"root","mode":"-rw-r--r--","mtime":1496161813.0,"nlink":1,"path":"\/tmp\/slave\/slaves\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0\/frameworks\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001\/executors\/testapp-924b5c1524d84676a6a71665e2054d31\/runs\/latest\/stderr","size":255,"uid":"root"},{"gid":"root","mode":"-rw-r--r--","mtime":1496161812.0,"nlink":1,"path":"\/tmp\/slave\/slaves\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0\/frameworks\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001\/executors\/testapp-924b5c1524d84676a6a71665e2054d31\/runs\/latest\/stdout","size":1142,"uid":"root"}]
> ```
> 
> 
> Thanks,
> 
> Aaron Wood
> 
>



Re: Review Request 59641: Follow symlinks when resolving paths specified in the various master/agent endpoints.

2017-05-30 Thread Mesos Reviewbot Windows

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



Patch looks great!

Reviews applied: [59641]

Passed command: support\windows-build.bat

- Mesos Reviewbot Windows


On May 30, 2017, 8:14 p.m., Aaron Wood wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/59641/
> ---
> 
> (Updated May 30, 2017, 8:14 p.m.)
> 
> 
> Review request for mesos, Andrew Schwartzmeyer, James Peach, Vinod Kone, and 
> Zhitao Li.
> 
> 
> Bugs: MESOS-7572
> https://issues.apache.org/jira/browse/MESOS-7572
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> The main benefit of following symlinks in endpoints such as `/files` is that 
> frameworks will be able to construct a path to the sandbox much easier. This 
> will assist framework developers in making features that need to provide a 
> path when hitting various operator API endpoints. Currently, making use of a 
> path ending in `runs/latest` throws a 404.
> 
> One such application could be a scheduler providing the ability for users to 
> work with their task's sandbox directly without going to the Mesos UI, API 
> endpoints, or the actual system themselves.
> 
> 
> Diffs
> -
> 
>   src/files/files.cpp b03279ee0 
>   src/tests/files_tests.cpp c703cae03 
> 
> 
> Diff: https://reviews.apache.org/r/59641/diff/2/
> 
> 
> Testing
> ---
> 
> `mkdir build && cd build && cmake .. && make -j2 && make check -j2`
> 
> Checked the original behavior: 
> ```
> curl -i 
> localhost:5051/files/browse?path=/tmp/slave/slaves/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0/frameworks/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001/executors/testapp-924b5c1524d84676a6a71665e2054d31/runs/cbec99c9-da2d-4aaa-bab7-4cee9a4df031
> HTTP/1.1 200 OK
> Date: Tue, 30 May 2017 17:43:08 GMT
> Content-Length: 644
> Content-Type: application/json
> 
> [{"gid":"root","mode":"-rw-r--r--","mtime":1496161813.0,"nlink":1,"path":"\/tmp\/slave\/slaves\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0\/frameworks\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001\/executors\/testapp-924b5c1524d84676a6a71665e2054d31\/runs\/cbec99c9-da2d-4aaa-bab7-4cee9a4df031\/stderr","size":255,"uid":"root"},{"gid":"root","mode":"-rw-r--r--","mtime":1496161812.0,"nlink":1,"path":"\/tmp\/slave\/slaves\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0\/frameworks\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001\/executors\/testapp-924b5c1524d84676a6a71665e2054d31\/runs\/cbec99c9-da2d-4aaa-bab7-4cee9a4df031\/stdout","size":1142,"uid":"root"}]
> ```
> 
> Checked the new behavior (this would return a 404 before this patch):
> ```
> curl -i 
> localhost:5051/files/browse?path=/tmp/slave/slaves/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0/frameworks/d3566e51-4d13-4eors/testapp-924b5c1524d84676a6a71665e2054d31/runs/latest
> HTTP/1.1 200 OK
> Date: Tue, 30 May 2017 17:43:13 GMT
> Content-Length: 584
> Content-Type: application/json
> 
> [{"gid":"root","mode":"-rw-r--r--","mtime":1496161813.0,"nlink":1,"path":"\/tmp\/slave\/slaves\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0\/frameworks\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001\/executors\/testapp-924b5c1524d84676a6a71665e2054d31\/runs\/latest\/stderr","size":255,"uid":"root"},{"gid":"root","mode":"-rw-r--r--","mtime":1496161812.0,"nlink":1,"path":"\/tmp\/slave\/slaves\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0\/frameworks\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001\/executors\/testapp-924b5c1524d84676a6a71665e2054d31\/runs\/latest\/stdout","size":1142,"uid":"root"}]
> ```
> 
> 
> Thanks,
> 
> Aaron Wood
> 
>



Re: Review Request 59641: Follow symlinks when resolving paths specified in the various master/agent endpoints.

2017-05-30 Thread Aaron Wood via Review Board

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

(Updated May 30, 2017, 8:14 p.m.)


Review request for mesos, Andrew Schwartzmeyer, James Peach, Vinod Kone, and 
Zhitao Li.


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


Repository: mesos


Description
---

The main benefit of following symlinks in endpoints such as `/files` is that 
frameworks will be able to construct a path to the sandbox much easier. This 
will assist framework developers in making features that need to provide a path 
when hitting various operator API endpoints. Currently, making use of a path 
ending in `runs/latest` throws a 404.

One such application could be a scheduler providing the ability for users to 
work with their task's sandbox directly without going to the Mesos UI, API 
endpoints, or the actual system themselves.


Diffs (updated)
-

  src/files/files.cpp b03279ee0 
  src/tests/files_tests.cpp c703cae03 


Diff: https://reviews.apache.org/r/59641/diff/2/

Changes: https://reviews.apache.org/r/59641/diff/1-2/


Testing
---

`mkdir build && cd build && cmake .. && make -j2 && make check -j2`

Checked the original behavior: 
```
curl -i 
localhost:5051/files/browse?path=/tmp/slave/slaves/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0/frameworks/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001/executors/testapp-924b5c1524d84676a6a71665e2054d31/runs/cbec99c9-da2d-4aaa-bab7-4cee9a4df031
HTTP/1.1 200 OK
Date: Tue, 30 May 2017 17:43:08 GMT
Content-Length: 644
Content-Type: application/json

[{"gid":"root","mode":"-rw-r--r--","mtime":1496161813.0,"nlink":1,"path":"\/tmp\/slave\/slaves\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0\/frameworks\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001\/executors\/testapp-924b5c1524d84676a6a71665e2054d31\/runs\/cbec99c9-da2d-4aaa-bab7-4cee9a4df031\/stderr","size":255,"uid":"root"},{"gid":"root","mode":"-rw-r--r--","mtime":1496161812.0,"nlink":1,"path":"\/tmp\/slave\/slaves\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0\/frameworks\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001\/executors\/testapp-924b5c1524d84676a6a71665e2054d31\/runs\/cbec99c9-da2d-4aaa-bab7-4cee9a4df031\/stdout","size":1142,"uid":"root"}]
```

Checked the new behavior (this would return a 404 before this patch):
```
curl -i 
localhost:5051/files/browse?path=/tmp/slave/slaves/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0/frameworks/d3566e51-4d13-4eors/testapp-924b5c1524d84676a6a71665e2054d31/runs/latest
HTTP/1.1 200 OK
Date: Tue, 30 May 2017 17:43:13 GMT
Content-Length: 584
Content-Type: application/json

[{"gid":"root","mode":"-rw-r--r--","mtime":1496161813.0,"nlink":1,"path":"\/tmp\/slave\/slaves\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0\/frameworks\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001\/executors\/testapp-924b5c1524d84676a6a71665e2054d31\/runs\/latest\/stderr","size":255,"uid":"root"},{"gid":"root","mode":"-rw-r--r--","mtime":1496161812.0,"nlink":1,"path":"\/tmp\/slave\/slaves\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0\/frameworks\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001\/executors\/testapp-924b5c1524d84676a6a71665e2054d31\/runs\/latest\/stdout","size":1142,"uid":"root"}]
```


Thanks,

Aaron Wood



Re: Review Request 59641: Follow symlinks when resolving paths specified in the various master/agent endpoints.

2017-05-30 Thread Aaron Wood via Review Board


> On May 30, 2017, 6:31 p.m., Zhitao Li wrote:
> > Is it possible to add an integration test in `src/tests/files_tests.cpp`?

Sure, I can create a directory and a symlink pointing to it and make sure it 
passes. FWIW that test is currently disabled on Windows.


> On May 30, 2017, 6:31 p.m., Zhitao Li wrote:
> > src/files/files.cpp
> > Line 888 (original), 888 (patched)
> > 
> >
> > It seems like this `path` variable shadows input argument? I'm not sure 
> > whether that's a good idea but I generally found that hard to understand.
> > 
> > Consider rename this local variable to something like `resolvedPath`?

I agree, let me change that.


- Aaron


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


On May 30, 2017, 6:10 p.m., Aaron Wood wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/59641/
> ---
> 
> (Updated May 30, 2017, 6:10 p.m.)
> 
> 
> Review request for mesos, Andrew Schwartzmeyer, James Peach, Vinod Kone, and 
> Zhitao Li.
> 
> 
> Bugs: MESOS-7572
> https://issues.apache.org/jira/browse/MESOS-7572
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> The main benefit of following symlinks in endpoints such as `/files` is that 
> frameworks will be able to construct a path to the sandbox much easier. This 
> will assist framework developers in making features that need to provide a 
> path when hitting various operator API endpoints. Currently, making use of a 
> path ending in `runs/latest` throws a 404.
> 
> One such application could be a scheduler providing the ability for users to 
> work with their task's sandbox directly without going to the Mesos UI, API 
> endpoints, or the actual system themselves.
> 
> 
> Diffs
> -
> 
>   src/files/files.cpp b03279ee0 
> 
> 
> Diff: https://reviews.apache.org/r/59641/diff/1/
> 
> 
> Testing
> ---
> 
> `mkdir build && cd build && cmake .. && make -j2 && make check -j2`
> 
> Checked the original behavior: 
> ```
> curl -i 
> localhost:5051/files/browse?path=/tmp/slave/slaves/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0/frameworks/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001/executors/testapp-924b5c1524d84676a6a71665e2054d31/runs/cbec99c9-da2d-4aaa-bab7-4cee9a4df031
> HTTP/1.1 200 OK
> Date: Tue, 30 May 2017 17:43:08 GMT
> Content-Length: 644
> Content-Type: application/json
> 
> [{"gid":"root","mode":"-rw-r--r--","mtime":1496161813.0,"nlink":1,"path":"\/tmp\/slave\/slaves\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0\/frameworks\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001\/executors\/testapp-924b5c1524d84676a6a71665e2054d31\/runs\/cbec99c9-da2d-4aaa-bab7-4cee9a4df031\/stderr","size":255,"uid":"root"},{"gid":"root","mode":"-rw-r--r--","mtime":1496161812.0,"nlink":1,"path":"\/tmp\/slave\/slaves\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0\/frameworks\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001\/executors\/testapp-924b5c1524d84676a6a71665e2054d31\/runs\/cbec99c9-da2d-4aaa-bab7-4cee9a4df031\/stdout","size":1142,"uid":"root"}]
> ```
> 
> Checked the new behavior (this would return a 404 before this patch):
> ```
> curl -i 
> localhost:5051/files/browse?path=/tmp/slave/slaves/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0/frameworks/d3566e51-4d13-4eors/testapp-924b5c1524d84676a6a71665e2054d31/runs/latest
> HTTP/1.1 200 OK
> Date: Tue, 30 May 2017 17:43:13 GMT
> Content-Length: 584
> Content-Type: application/json
> 
> [{"gid":"root","mode":"-rw-r--r--","mtime":1496161813.0,"nlink":1,"path":"\/tmp\/slave\/slaves\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0\/frameworks\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001\/executors\/testapp-924b5c1524d84676a6a71665e2054d31\/runs\/latest\/stderr","size":255,"uid":"root"},{"gid":"root","mode":"-rw-r--r--","mtime":1496161812.0,"nlink":1,"path":"\/tmp\/slave\/slaves\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0\/frameworks\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001\/executors\/testapp-924b5c1524d84676a6a71665e2054d31\/runs\/latest\/stdout","size":1142,"uid":"root"}]
> ```
> 
> 
> Thanks,
> 
> Aaron Wood
> 
>



Re: Review Request 59641: Follow symlinks when resolving paths specified in the various master/agent endpoints.

2017-05-30 Thread Zhitao Li

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



Is it possible to add an integration test in `src/tests/files_tests.cpp`?


src/files/files.cpp
Lines 885-887 (original), 885-887 (patched)


Augment the comment here to explain the symlink case?



src/files/files.cpp
Line 888 (original), 888 (patched)


It seems like this `path` variable shadows input argument? I'm not sure 
whether that's a good idea but I generally found that hard to understand.

Consider rename this local variable to something like `resolvedPath`?


- Zhitao Li


On May 30, 2017, 6:10 p.m., Aaron Wood wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/59641/
> ---
> 
> (Updated May 30, 2017, 6:10 p.m.)
> 
> 
> Review request for mesos, Andrew Schwartzmeyer, James Peach, Vinod Kone, and 
> Zhitao Li.
> 
> 
> Bugs: MESOS-7572
> https://issues.apache.org/jira/browse/MESOS-7572
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> The main benefit of following symlinks in endpoints such as `/files` is that 
> frameworks will be able to construct a path to the sandbox much easier. This 
> will assist framework developers in making features that need to provide a 
> path when hitting various operator API endpoints. Currently, making use of a 
> path ending in `runs/latest` throws a 404.
> 
> One such application could be a scheduler providing the ability for users to 
> work with their task's sandbox directly without going to the Mesos UI, API 
> endpoints, or the actual system themselves.
> 
> 
> Diffs
> -
> 
>   src/files/files.cpp b03279ee0 
> 
> 
> Diff: https://reviews.apache.org/r/59641/diff/1/
> 
> 
> Testing
> ---
> 
> `mkdir build && cd build && cmake .. && make -j2 && make check -j2`
> 
> Checked the original behavior: 
> ```
> curl -i 
> localhost:5051/files/browse?path=/tmp/slave/slaves/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0/frameworks/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001/executors/testapp-924b5c1524d84676a6a71665e2054d31/runs/cbec99c9-da2d-4aaa-bab7-4cee9a4df031
> HTTP/1.1 200 OK
> Date: Tue, 30 May 2017 17:43:08 GMT
> Content-Length: 644
> Content-Type: application/json
> 
> [{"gid":"root","mode":"-rw-r--r--","mtime":1496161813.0,"nlink":1,"path":"\/tmp\/slave\/slaves\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0\/frameworks\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001\/executors\/testapp-924b5c1524d84676a6a71665e2054d31\/runs\/cbec99c9-da2d-4aaa-bab7-4cee9a4df031\/stderr","size":255,"uid":"root"},{"gid":"root","mode":"-rw-r--r--","mtime":1496161812.0,"nlink":1,"path":"\/tmp\/slave\/slaves\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0\/frameworks\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001\/executors\/testapp-924b5c1524d84676a6a71665e2054d31\/runs\/cbec99c9-da2d-4aaa-bab7-4cee9a4df031\/stdout","size":1142,"uid":"root"}]
> ```
> 
> Checked the new behavior (this would return a 404 before this patch):
> ```
> curl -i 
> localhost:5051/files/browse?path=/tmp/slave/slaves/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0/frameworks/d3566e51-4d13-4eors/testapp-924b5c1524d84676a6a71665e2054d31/runs/latest
> HTTP/1.1 200 OK
> Date: Tue, 30 May 2017 17:43:13 GMT
> Content-Length: 584
> Content-Type: application/json
> 
> [{"gid":"root","mode":"-rw-r--r--","mtime":1496161813.0,"nlink":1,"path":"\/tmp\/slave\/slaves\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0\/frameworks\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001\/executors\/testapp-924b5c1524d84676a6a71665e2054d31\/runs\/latest\/stderr","size":255,"uid":"root"},{"gid":"root","mode":"-rw-r--r--","mtime":1496161812.0,"nlink":1,"path":"\/tmp\/slave\/slaves\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0\/frameworks\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001\/executors\/testapp-924b5c1524d84676a6a71665e2054d31\/runs\/latest\/stdout","size":1142,"uid":"root"}]
> ```
> 
> 
> Thanks,
> 
> Aaron Wood
> 
>



Review Request 59641: Follow symlinks when resolving paths specified in the various master/agent endpoints.

2017-05-30 Thread Aaron Wood via Review Board

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

Review request for mesos, Andrew Schwartzmeyer, James Peach, Vinod Kone, and 
Zhitao Li.


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


Repository: mesos


Description
---

The main benefit of following symlinks in endpoints such as `/files` is that 
frameworks will be able to construct a path to the sandbox much easier. This 
will assist framework developers in making features that need to provide a path 
when hitting various operator API endpoints. Currently, making use of a path 
ending in `runs/latest` throws a 404.

One such application could be a scheduler providing the ability for users to 
work with their task's sandbox directly without going to the Mesos UI, API 
endpoints, or the actual system themselves.


Diffs
-

  src/files/files.cpp b03279ee0 


Diff: https://reviews.apache.org/r/59641/diff/1/


Testing
---

`mkdir build && cd build && cmake .. && make -j2 && make check -j2`

Checked the original behavior: 
```
curl -i 
localhost:5051/files/browse?path=/tmp/slave/slaves/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0/frameworks/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001/executors/testapp-924b5c1524d84676a6a71665e2054d31/runs/cbec99c9-da2d-4aaa-bab7-4cee9a4df031
HTTP/1.1 200 OK
Date: Tue, 30 May 2017 17:43:08 GMT
Content-Length: 644
Content-Type: application/json

[{"gid":"root","mode":"-rw-r--r--","mtime":1496161813.0,"nlink":1,"path":"\/tmp\/slave\/slaves\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0\/frameworks\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001\/executors\/testapp-924b5c1524d84676a6a71665e2054d31\/runs\/cbec99c9-da2d-4aaa-bab7-4cee9a4df031\/stderr","size":255,"uid":"root"},{"gid":"root","mode":"-rw-r--r--","mtime":1496161812.0,"nlink":1,"path":"\/tmp\/slave\/slaves\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0\/frameworks\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001\/executors\/testapp-924b5c1524d84676a6a71665e2054d31\/runs\/cbec99c9-da2d-4aaa-bab7-4cee9a4df031\/stdout","size":1142,"uid":"root"}]
```

Checked the new behavior (this would return a 404 before this patch):
```
curl -i 
localhost:5051/files/browse?path=/tmp/slave/slaves/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0/frameworks/d3566e51-4d13-4eors/testapp-924b5c1524d84676a6a71665e2054d31/runs/latest
HTTP/1.1 200 OK
Date: Tue, 30 May 2017 17:43:13 GMT
Content-Length: 584
Content-Type: application/json

[{"gid":"root","mode":"-rw-r--r--","mtime":1496161813.0,"nlink":1,"path":"\/tmp\/slave\/slaves\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0\/frameworks\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001\/executors\/testapp-924b5c1524d84676a6a71665e2054d31\/runs\/latest\/stderr","size":255,"uid":"root"},{"gid":"root","mode":"-rw-r--r--","mtime":1496161812.0,"nlink":1,"path":"\/tmp\/slave\/slaves\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-S0\/frameworks\/d3566e51-4d13-4ed1-b66b-d538d3d7ef28-0001\/executors\/testapp-924b5c1524d84676a6a71665e2054d31\/runs\/latest\/stdout","size":1142,"uid":"root"}]
```


Thanks,

Aaron Wood