Re: Review Request 63212: Added a findByTarget method for fs::MountInfoTable.

2017-11-28 Thread Gilbert Song

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


Ship it!




Ship It!

- Gilbert Song


On Nov. 27, 2017, 4:28 p.m., Jie Yu wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63212/
> ---
> 
> (Updated Nov. 27, 2017, 4:28 p.m.)
> 
> 
> Review request for mesos, Gilbert Song, James Peach, and Joseph Wu.
> 
> 
> Bugs: MESOS-7306
> https://issues.apache.org/jira/browse/MESOS-7306
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> This method allows us to get the mount table entry that contains the
> specified target.
> 
> 
> Diffs
> -
> 
>   src/linux/fs.hpp cbc8bf79083ce2bc34fa698808eaf92764a577a9 
>   src/linux/fs.cpp 40c31a3ad2ccbeb59868c5e2d7b1809c613da8de 
>   src/tests/containerizer/fs_tests.cpp 
> 1022b824045dc8fb6f8bfeb5f7b0dee95c82ff6c 
> 
> 
> Diff: https://reviews.apache.org/r/63212/diff/4/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Jie Yu
> 
>



Re: Review Request 63212: Added a findByTarget method for fs::MountInfoTable.

2017-11-27 Thread Jie Yu

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

(Updated Nov. 28, 2017, 12:28 a.m.)


Review request for mesos, Gilbert Song, James Peach, and Joseph Wu.


Changes
---

Fix a comment.


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


Repository: mesos


Description
---

This method allows us to get the mount table entry that contains the
specified target.


Diffs (updated)
-

  src/linux/fs.hpp cbc8bf79083ce2bc34fa698808eaf92764a577a9 
  src/linux/fs.cpp 40c31a3ad2ccbeb59868c5e2d7b1809c613da8de 
  src/tests/containerizer/fs_tests.cpp 1022b824045dc8fb6f8bfeb5f7b0dee95c82ff6c 


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

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


Testing
---


Thanks,

Jie Yu



Re: Review Request 63212: Added a findByTarget method for fs::MountInfoTable.

2017-11-27 Thread Jie Yu


> On Oct. 25, 2017, 9:26 p.m., James Peach wrote:
> > src/linux/fs.cpp
> > Lines 249 (patched)
> > 
> >
> > So if the target was "/mnt/foobar" and we had a mount called 
> > "/mnt/foo", this would match? Is that what we want here?

Good catch! Fixed.


- Jie


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


On Nov. 27, 2017, 11:18 p.m., Jie Yu wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63212/
> ---
> 
> (Updated Nov. 27, 2017, 11:18 p.m.)
> 
> 
> Review request for mesos, Gilbert Song, James Peach, and Joseph Wu.
> 
> 
> Bugs: MESOS-7306
> https://issues.apache.org/jira/browse/MESOS-7306
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> This method allows us to get the mount table entry that contains the
> specified target.
> 
> 
> Diffs
> -
> 
>   src/linux/fs.hpp cbc8bf79083ce2bc34fa698808eaf92764a577a9 
>   src/linux/fs.cpp 40c31a3ad2ccbeb59868c5e2d7b1809c613da8de 
>   src/tests/containerizer/fs_tests.cpp 
> 1022b824045dc8fb6f8bfeb5f7b0dee95c82ff6c 
> 
> 
> Diff: https://reviews.apache.org/r/63212/diff/3/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Jie Yu
> 
>



Re: Review Request 63212: Added a findByTarget method for fs::MountInfoTable.

2017-11-27 Thread Jie Yu

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

(Updated Nov. 27, 2017, 11:18 p.m.)


Review request for mesos, Gilbert Song, James Peach, and Joseph Wu.


Changes
---

Addressed comments from James and add tests.


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


Repository: mesos


Description
---

This method allows us to get the mount table entry that contains the
specified target.


Diffs (updated)
-

  src/linux/fs.hpp cbc8bf79083ce2bc34fa698808eaf92764a577a9 
  src/linux/fs.cpp 40c31a3ad2ccbeb59868c5e2d7b1809c613da8de 
  src/tests/containerizer/fs_tests.cpp 1022b824045dc8fb6f8bfeb5f7b0dee95c82ff6c 


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

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


Testing
---


Thanks,

Jie Yu



Re: Review Request 63212: Added a findByTarget method for fs::MountInfoTable.

2017-11-27 Thread Jie Yu


> On Oct. 25, 2017, 9:26 p.m., James Peach wrote:
> > src/linux/fs.cpp
> > Lines 257 (patched)
> > 
> >
> > Did you consider using a `Result` and returning `None()` in this case?

I think not found is really not possible because `/` is always at the root.


- Jie


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


On Nov. 27, 2017, 4:49 a.m., Jie Yu wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63212/
> ---
> 
> (Updated Nov. 27, 2017, 4:49 a.m.)
> 
> 
> Review request for mesos, Gilbert Song, James Peach, and Joseph Wu.
> 
> 
> Bugs: MESOS-7306
> https://issues.apache.org/jira/browse/MESOS-7306
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> This method allows us to get the mount table entry that contains the
> specified target.
> 
> 
> Diffs
> -
> 
>   src/linux/fs.hpp cbc8bf79083ce2bc34fa698808eaf92764a577a9 
>   src/linux/fs.cpp 40c31a3ad2ccbeb59868c5e2d7b1809c613da8de 
> 
> 
> Diff: https://reviews.apache.org/r/63212/diff/2/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Jie Yu
> 
>



Re: Review Request 63212: Added a findByTarget method for fs::MountInfoTable.

2017-11-27 Thread Jie Yu


> On Oct. 25, 2017, 9:26 p.m., James Peach wrote:
> > src/linux/fs.hpp
> > Lines 276 (patched)
> > 
> >
> > Not "immediate parent", but longest match right?

It's more complicated than that. I think the goal is to find the mount table 
entry that contains the given target (similar to `findmnt --target [TARGET]`).


- Jie


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


On Nov. 27, 2017, 4:49 a.m., Jie Yu wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63212/
> ---
> 
> (Updated Nov. 27, 2017, 4:49 a.m.)
> 
> 
> Review request for mesos, Gilbert Song, James Peach, and Joseph Wu.
> 
> 
> Bugs: MESOS-7306
> https://issues.apache.org/jira/browse/MESOS-7306
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> This method allows us to get the mount table entry that contains the
> specified target.
> 
> 
> Diffs
> -
> 
>   src/linux/fs.hpp cbc8bf79083ce2bc34fa698808eaf92764a577a9 
>   src/linux/fs.cpp 40c31a3ad2ccbeb59868c5e2d7b1809c613da8de 
> 
> 
> Diff: https://reviews.apache.org/r/63212/diff/2/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Jie Yu
> 
>



Re: Review Request 63212: Added a findByTarget method for fs::MountInfoTable.

2017-11-26 Thread Jie Yu

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

(Updated Nov. 27, 2017, 4:49 a.m.)


Review request for mesos, Gilbert Song, James Peach, and Joseph Wu.


Changes
---

rebased.


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


Repository: mesos


Description
---

This method allows us to get the mount table entry that contains the
specified target.


Diffs (updated)
-

  src/linux/fs.hpp cbc8bf79083ce2bc34fa698808eaf92764a577a9 
  src/linux/fs.cpp 40c31a3ad2ccbeb59868c5e2d7b1809c613da8de 


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

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


Testing
---


Thanks,

Jie Yu



Re: Review Request 63212: Added a findByTarget method for fs::MountInfoTable.

2017-10-25 Thread James Peach

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




src/linux/fs.hpp
Lines 276 (patched)


Not "immediate parent", but longest match right?



src/linux/fs.cpp
Lines 236 (patched)


Can you add some tests to `tests/containerizer/fs_tests.cpp`?



src/linux/fs.cpp
Lines 249 (patched)


So if the target was "/mnt/foobar" and we had a mount called "/mnt/foo", 
this would match? Is that what we want here?



src/linux/fs.cpp
Lines 257 (patched)


Did you consider using a `Result` and returning `None()` in this case?


- James Peach


On Oct. 23, 2017, 4:43 a.m., Jie Yu wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63212/
> ---
> 
> (Updated Oct. 23, 2017, 4:43 a.m.)
> 
> 
> Review request for mesos, Gilbert Song, James Peach, and Joseph Wu.
> 
> 
> Bugs: MESOS-7306
> https://issues.apache.org/jira/browse/MESOS-7306
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> This method allows us to get the mount table entry that contains the
> specified target.
> 
> 
> Diffs
> -
> 
>   src/linux/fs.hpp cbc8bf79083ce2bc34fa698808eaf92764a577a9 
>   src/linux/fs.cpp 40c31a3ad2ccbeb59868c5e2d7b1809c613da8de 
> 
> 
> Diff: https://reviews.apache.org/r/63212/diff/1/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Jie Yu
> 
>



Review Request 63212: Added a findByTarget method for fs::MountInfoTable.

2017-10-22 Thread Jie Yu

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

Review request for mesos, Gilbert Song, James Peach, and Joseph Wu.


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


Repository: mesos


Description
---

This method allows us to get the mount table entry that contains the
specified target.


Diffs
-

  src/linux/fs.hpp cbc8bf79083ce2bc34fa698808eaf92764a577a9 
  src/linux/fs.cpp 40c31a3ad2ccbeb59868c5e2d7b1809c613da8de 


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


Testing
---


Thanks,

Jie Yu