You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Jason Lai <ja...@jasonlai.net> on 2018/05/17 01:23:54 UTC

Review Request 67175: Added support for marking slave mounts and creating non-existing paths.

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

Review request for mesos, Eric Chung, Gilbert Song, Jie Yu, James Peach, and Zhitao Li.


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


Repository: mesos


Description
-------

Added utility functions for marking slave mounts in the mount table and
creating file or directory as a mount point if not already existing.


Diffs
-----

  src/linux/fs.hpp 76dc09c38996eefd8487ba6ef4977ef2f7c9df4c 
  src/linux/fs.cpp fbd03b19abb9b56dbf3fb8a84d09a39171bbc1b0 


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


Testing
-------


Thanks,

Jason Lai


Re: Review Request 67175: Added support for marking slave mounts and creating non-existing paths.

Posted by Jason Lai <ja...@jasonlai.net>.

> On May 23, 2018, 12:18 a.m., James Peach wrote:
> > src/linux/fs.hpp
> > Lines 294 (patched)
> > <https://reviews.apache.org/r/67175/diff/1/?file=2024599#file2024599line294>
> >
> >     This only ever gets used by the `hashset` version, so don't make it a static function, just call `mount` directly.

Sounds good.


> On May 23, 2018, 12:18 a.m., James Peach wrote:
> > src/linux/fs.hpp
> > Lines 303 (patched)
> > <https://reviews.apache.org/r/67175/diff/1/?file=2024599#file2024599line303>
> >
> >     This also doesn't seem that related to the `MountInfoTable` object. Make it a standalone function that just does the same thing.

It is actually an operation supported through `MountInfoTable` entries (but not applicable through `MountTable`). So I think it makes sense to stay within the scope of `MountInfoTable`.


> On May 23, 2018, 12:18 a.m., James Peach wrote:
> > src/linux/fs.cpp
> > Lines 318 (patched)
> > <https://reviews.apache.org/r/67175/diff/1/?file=2024600#file2024600line318>
> >
> >     Can we write tests for this? Maybe something similar to `FsTest.ROOT_SlaveMount`?

Will do.


> On May 23, 2018, 12:18 a.m., James Peach wrote:
> > src/linux/fs.cpp
> > Lines 662 (patched)
> > <https://reviews.apache.org/r/67175/diff/1/?file=2024600#file2024600line662>
> >
> >     This seems like a logical extension to `os::touch`?
> >     
> >     If we can emulate the `os::stat` API and use enum constants to make this more obvious at the call site:
> >     ```
> >     os::touch(path, os::Touch::RECURSIVE, os::Touch::FILE);
> >     ```
> >     
> >     cc @jieyu

Makes sense. I've dropped the function in this patch and will create another patch in favor of your suggestion.


- Jason


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


On May 17, 2018, 1:23 a.m., Jason Lai wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/67175/
> -----------------------------------------------------------
> 
> (Updated May 17, 2018, 1:23 a.m.)
> 
> 
> Review request for mesos, Eric Chung, Gilbert Song, Jie Yu, James Peach, and Zhitao Li.
> 
> 
> Bugs: MESOS-8257
>     https://issues.apache.org/jira/browse/MESOS-8257
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added utility functions for marking slave mounts in the mount table and
> creating file or directory as a mount point if not already existing.
> 
> 
> Diffs
> -----
> 
>   src/linux/fs.hpp 76dc09c38996eefd8487ba6ef4977ef2f7c9df4c 
>   src/linux/fs.cpp fbd03b19abb9b56dbf3fb8a84d09a39171bbc1b0 
> 
> 
> Diff: https://reviews.apache.org/r/67175/diff/1/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Jason Lai
> 
>


Re: Review Request 67175: Added support for marking slave mounts.

Posted by Jason Lai <ja...@jasonlai.net>.

> On May 23, 2018, 12:18 a.m., James Peach wrote:
> > src/linux/fs.cpp
> > Lines 662 (patched)
> > <https://reviews.apache.org/r/67175/diff/1/?file=2024600#file2024600line662>
> >
> >     This seems like a logical extension to `os::touch`?
> >     
> >     If we can emulate the `os::stat` API and use enum constants to make this more obvious at the call site:
> >     ```
> >     os::touch(path, os::Touch::RECURSIVE, os::Touch::FILE);
> >     ```
> >     
> >     cc @jieyu
> 
> Jason Lai wrote:
>     Makes sense. I've dropped the function in this patch and will create another patch in favor of your suggestion.

For `os::Touch::DIRECTORY`, I actually feel it doesn't bring much value to have `os::touch` to support both recursive and non-recursive cases (a direct call to `os::touch` would simply do the work).

The semantics of touching with an extra call to `os::utime` upon existing paths also feels unnecessary and/or could introduce breaking risks whn the path is readonly and the action is supposed to be no-op.


- Jason


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


On Sept. 15, 2018, 12:36 a.m., Jason Lai wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/67175/
> -----------------------------------------------------------
> 
> (Updated Sept. 15, 2018, 12:36 a.m.)
> 
> 
> Review request for mesos, Eric Chung, Gilbert Song, Jie Yu, James Peach, and Zhitao Li.
> 
> 
> Bugs: MESOS-8257
>     https://issues.apache.org/jira/browse/MESOS-8257
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added utility function for marking slave mounts in the mount table.
> 
> 
> Diffs
> -----
> 
>   src/linux/fs.hpp 502f85c4a32d8658bdd701975dd5ac3d802d308e 
>   src/linux/fs.cpp 9055ef42edd1fb90e1026d1d603a9ba902cfc1fd 
> 
> 
> Diff: https://reviews.apache.org/r/67175/diff/2/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Jason Lai
> 
>


Re: Review Request 67175: Added support for marking slave mounts and creating non-existing paths.

Posted by James Peach <jp...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/67175/#review203620
-----------------------------------------------------------




src/linux/fs.hpp
Lines 294 (patched)
<https://reviews.apache.org/r/67175/#comment285906>

    This only ever gets used by the `hashset` version, so don't make it a static function, just call `mount` directly.



src/linux/fs.hpp
Lines 303 (patched)
<https://reviews.apache.org/r/67175/#comment285911>

    This also doesn't seem that related to the `MountInfoTable` object. Make it a standalone function that just does the same thing.



src/linux/fs.cpp
Lines 318 (patched)
<https://reviews.apache.org/r/67175/#comment285912>

    Can we write tests for this? Maybe something similar to `FsTest.ROOT_SlaveMount`?



src/linux/fs.cpp
Lines 321 (patched)
<https://reviews.apache.org/r/67175/#comment285907>

    Since this is linux-only, just use `"/"` like the rest of the code here.



src/linux/fs.cpp
Lines 662 (patched)
<https://reviews.apache.org/r/67175/#comment285910>

    This seems like a logical extension to `os::touch`?
    
    If we can emulate the `os::stat` API and use enum constants to make this more obvious at the call site:
    ```
    os::touch(path, os::Touch::RECURSIVE, os::Touch::FILE);
    ```
    
    cc @jieyu


- James Peach


On May 17, 2018, 1:23 a.m., Jason Lai wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/67175/
> -----------------------------------------------------------
> 
> (Updated May 17, 2018, 1:23 a.m.)
> 
> 
> Review request for mesos, Eric Chung, Gilbert Song, Jie Yu, James Peach, and Zhitao Li.
> 
> 
> Bugs: MESOS-8257
>     https://issues.apache.org/jira/browse/MESOS-8257
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added utility functions for marking slave mounts in the mount table and
> creating file or directory as a mount point if not already existing.
> 
> 
> Diffs
> -----
> 
>   src/linux/fs.hpp 76dc09c38996eefd8487ba6ef4977ef2f7c9df4c 
>   src/linux/fs.cpp fbd03b19abb9b56dbf3fb8a84d09a39171bbc1b0 
> 
> 
> Diff: https://reviews.apache.org/r/67175/diff/1/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Jason Lai
> 
>


Re: Review Request 67175: Added support for marking slave mounts.

Posted by Jason Lai <ja...@jasonlai.net>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/67175/
-----------------------------------------------------------

(Updated Nov. 7, 2018, 9:24 p.m.)


Review request for mesos, Eric Chung, Gilbert Song, Jie Yu, James Peach, and Zhitao Li.


Changes
-------

Rebased to master


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


Repository: mesos


Description
-------

Added utility function for marking slave mounts in the mount table.


Diffs (updated)
-----

  src/linux/fs.hpp 31969f6ba82bf5ee549bfdf9698a21adaa486a90 
  src/linux/fs.cpp 5cdffe1f4c7f00aee5b8f640e7cfa4a0018cfa0a 


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

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


Testing
-------


Thanks,

Jason Lai


Re: Review Request 67175: Added support for marking slave mounts.

Posted by Jason Lai <ja...@jasonlai.net>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/67175/
-----------------------------------------------------------

(Updated Sept. 15, 2018, 12:36 a.m.)


Review request for mesos, Eric Chung, Gilbert Song, Jie Yu, James Peach, and Zhitao Li.


Changes
-------

Address review comments.


Summary (updated)
-----------------

Added support for marking slave mounts.


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


Repository: mesos


Description (updated)
-------

Added utility function for marking slave mounts in the mount table.


Diffs (updated)
-----

  src/linux/fs.hpp 502f85c4a32d8658bdd701975dd5ac3d802d308e 
  src/linux/fs.cpp 9055ef42edd1fb90e1026d1d603a9ba902cfc1fd 


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

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


Testing
-------


Thanks,

Jason Lai