-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/64226/#review192402
-----------------------------------------------------------
src/linux/ns.hpp
Lines 99 (patched)
<https://reviews.apache.org/r/64226/#comment270514>
Can you add some reason why there is a kernel version check there?
src/linux/ns.cpp
Lines 134 (patched)
<https://reviews.apache.org/r/64226/#comment270513>
indentation
src/linux/ns.cpp
Lines 136 (patched)
<https://reviews.apache.org/r/64226/#comment270515>
can you short circuit here if anything from `nsTypes` is not part of `nstypes()` so that
we don't even go to the following user namespace kernel version check if user namespace is
not even show up in `nstypes()`
Then, you don't even need the final `return supported == nsTypes;`
src/linux/ns.cpp
Lines 143 (patched)
<https://reviews.apache.org/r/64226/#comment270516>
We don't print glog warning in helpers. What if we want to use this in launch helper?
I'd prefer return `Try<bool>`
- Jie Yu
On Nov. 30, 2017, 10:03 p.m., James Peach wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/64226/
> -----------------------------------------------------------
>
> (Updated Nov. 30, 2017, 10:03 p.m.)
>
>
> Review request for mesos and Jie Yu.
>
>
> Bugs: MESOS-8284
> https://issues.apache.org/jira/browse/MESOS-8284
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Added a `ns::supported` convenience API which directly expresses the
> intent to probe whether a specific Linux namespace is supported on
> the running kernel and takes care of kernel versioning special cases.
>
>
> Diffs
> -----
>
> src/linux/ns.hpp e24d79a41eefcade343b2825b5a758d7d30a5f91
> src/linux/ns.cpp 5e2df1ed56432c6c1bfa04a31dba7f9f547d6139
> src/slave/containerizer/mesos/isolators/namespaces/ipc.cpp 2d89d598d24e3bcf01d652ce3f586c9e3ccfc20b
> src/slave/containerizer/mesos/isolators/namespaces/pid.cpp 4f8253b58018581e022eb1832b9b07703cbd318d
> src/slave/containerizer/mesos/isolators/network/port_mapping.cpp d60052e9e1ccdfaaac6c0db6acfdae325cea6a9e
> src/tests/containerizer/ns_tests.cpp 61adf8525b1df1a70d7fd9c747d2106630a7627d
>
>
> Diff: https://reviews.apache.org/r/64226/diff/2/
>
>
> Testing
> -------
>
> make check (Fedora 27)
>
>
> Thanks,
>
> James Peach
>
>
|