You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by James Peach <jp...@apache.org> on 2017/10/30 17:27:47 UTC

Review Request 63420: Moved Linux namespace helpers into a source file.

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

Review request for mesos and Jiang Yan Xu.


Repository: mesos


Description
-------

Moved the Linux namespace helper implementations from the header file
to the source file. This has a (theoretical) improvement to compilation
times, and also improves encapsulation and reduces header pollution for
consumers of these APIs.


Diffs
-----

  src/Makefile.am b60a54a031260de6f1fb43584ae5083df2dc7e31 
  src/linux/ns.hpp 3d3a1fb6d0e3fffc4ff56625a76fb749a7afe51b 
  src/linux/ns.cpp PRE-CREATION 
  src/slave/containerizer/mesos/isolators/filesystem/shared.cpp 927d95be2c25ceb324acac99edaee24a28a5d59c 
  src/slave/containerizer/mesos/isolators/namespaces/ipc.cpp 8675640e0a4addc706bc2eabfe2fe4f08e19231e 
  src/slave/containerizer/mesos/isolators/network/cni/cni.cpp fc68f04b42f12a59518a2eea43e5bd49787d4646 
  src/slave/containerizer/mesos/isolators/volume/secret.cpp ee9366fc360575570185ed8f69eb579006739380 


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


Testing
-------

make check (Fedora 26)


Thanks,

James Peach


Re: Review Request 63420: Moved Linux namespace helpers into a source file.

Posted by Jiang Yan Xu <ya...@jxu.me>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63420/#review189659
-----------------------------------------------------------


Fix it, then Ship it!





src/Makefile.am
Lines 1271 (patched)
<https://reviews.apache.org/r/63420/#comment266861>

    Also CMakeLists.txt now that it's a cpp?



src/linux/ns.cpp
Lines 19-23 (patched)
<https://reviews.apache.org/r/63420/#comment266867>

    Nit: we have been generally putting includes with directory components below the ones without. (Like how you order stout/* vs stout/os/* below.) The original include order in ns.hpp doesn't adhere to this it should.
    
    ```
    #include <unistd.h>
    #include <vector>
    
    #include <sys/wait.h>
    ```



src/linux/ns.cpp
Lines 40-42 (patched)
<https://reviews.apache.org/r/63420/#comment266868>

    process/ above stout/ based on alphabetical order. (Hopefully we start relying on clangformat on this soon...)



src/linux/ns.cpp
Lines 48 (patched)
<https://reviews.apache.org/r/63420/#comment266870>

    Replace uses of `std::` types with using declarations + unqualified names in cpp files.
    
    Here and elsewhere in the file.


- Jiang Yan Xu


On Oct. 30, 2017, 10:27 a.m., James Peach wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63420/
> -----------------------------------------------------------
> 
> (Updated Oct. 30, 2017, 10:27 a.m.)
> 
> 
> Review request for mesos and Jiang Yan Xu.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Moved the Linux namespace helper implementations from the header file
> to the source file. This has a (theoretical) improvement to compilation
> times, and also improves encapsulation and reduces header pollution for
> consumers of these APIs.
> 
> 
> Diffs
> -----
> 
>   src/Makefile.am b60a54a031260de6f1fb43584ae5083df2dc7e31 
>   src/linux/ns.hpp 3d3a1fb6d0e3fffc4ff56625a76fb749a7afe51b 
>   src/linux/ns.cpp PRE-CREATION 
>   src/slave/containerizer/mesos/isolators/filesystem/shared.cpp 927d95be2c25ceb324acac99edaee24a28a5d59c 
>   src/slave/containerizer/mesos/isolators/namespaces/ipc.cpp 8675640e0a4addc706bc2eabfe2fe4f08e19231e 
>   src/slave/containerizer/mesos/isolators/network/cni/cni.cpp fc68f04b42f12a59518a2eea43e5bd49787d4646 
>   src/slave/containerizer/mesos/isolators/volume/secret.cpp ee9366fc360575570185ed8f69eb579006739380 
> 
> 
> Diff: https://reviews.apache.org/r/63420/diff/1/
> 
> 
> Testing
> -------
> 
> make check (Fedora 26)
> 
> 
> Thanks,
> 
> James Peach
> 
>


Re: Review Request 63420: Moved Linux namespace helpers into a source file.

Posted by Mesos Reviewbot Windows <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63420/#review189758
-----------------------------------------------------------



PASS: Mesos patch 63420 was successfully built and tested.

Reviews applied: `['63420']`

All the build artifacts available at: http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/63420

- Mesos Reviewbot Windows


On Oct. 30, 2017, 5:19 p.m., James Peach wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63420/
> -----------------------------------------------------------
> 
> (Updated Oct. 30, 2017, 5:19 p.m.)
> 
> 
> Review request for mesos and Jiang Yan Xu.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Moved the Linux namespace helper implementations from the header file
> to the source file. This has a (theoretical) improvement to compilation
> times, and also improves encapsulation and reduces header pollution for
> consumers of these APIs.
> 
> 
> Diffs
> -----
> 
>   src/CMakeLists.txt 219252f6f82b2d62d024b2ab876fa0ba2f5c8e6c 
>   src/Makefile.am b60a54a031260de6f1fb43584ae5083df2dc7e31 
>   src/linux/ns.hpp 3d3a1fb6d0e3fffc4ff56625a76fb749a7afe51b 
>   src/linux/ns.cpp PRE-CREATION 
>   src/slave/containerizer/mesos/isolators/filesystem/shared.cpp 927d95be2c25ceb324acac99edaee24a28a5d59c 
>   src/slave/containerizer/mesos/isolators/namespaces/ipc.cpp 8675640e0a4addc706bc2eabfe2fe4f08e19231e 
>   src/slave/containerizer/mesos/isolators/network/cni/cni.cpp fc68f04b42f12a59518a2eea43e5bd49787d4646 
>   src/slave/containerizer/mesos/isolators/volume/secret.cpp ee9366fc360575570185ed8f69eb579006739380 
> 
> 
> Diff: https://reviews.apache.org/r/63420/diff/2/
> 
> 
> Testing
> -------
> 
> make check (Fedora 26)
> 
> 
> Thanks,
> 
> James Peach
> 
>


Re: Review Request 63420: Moved Linux namespace helpers into a source file.

Posted by Mesos Reviewbot <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63420/#review189713
-----------------------------------------------------------



Patch looks great!

Reviews applied: [63420]

Passed command: export OS='ubuntu:14.04' BUILDTOOL='autotools' COMPILER='gcc' CONFIGURATION='--verbose --disable-libtool-wrappers' ENVIRONMENT='GLOG_v=1 MESOS_VERBOSE=1'; ./support/docker-build.sh

- Mesos Reviewbot


On Oct. 30, 2017, 5:19 p.m., James Peach wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63420/
> -----------------------------------------------------------
> 
> (Updated Oct. 30, 2017, 5:19 p.m.)
> 
> 
> Review request for mesos and Jiang Yan Xu.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Moved the Linux namespace helper implementations from the header file
> to the source file. This has a (theoretical) improvement to compilation
> times, and also improves encapsulation and reduces header pollution for
> consumers of these APIs.
> 
> 
> Diffs
> -----
> 
>   src/CMakeLists.txt 219252f6f82b2d62d024b2ab876fa0ba2f5c8e6c 
>   src/Makefile.am b60a54a031260de6f1fb43584ae5083df2dc7e31 
>   src/linux/ns.hpp 3d3a1fb6d0e3fffc4ff56625a76fb749a7afe51b 
>   src/linux/ns.cpp PRE-CREATION 
>   src/slave/containerizer/mesos/isolators/filesystem/shared.cpp 927d95be2c25ceb324acac99edaee24a28a5d59c 
>   src/slave/containerizer/mesos/isolators/namespaces/ipc.cpp 8675640e0a4addc706bc2eabfe2fe4f08e19231e 
>   src/slave/containerizer/mesos/isolators/network/cni/cni.cpp fc68f04b42f12a59518a2eea43e5bd49787d4646 
>   src/slave/containerizer/mesos/isolators/volume/secret.cpp ee9366fc360575570185ed8f69eb579006739380 
> 
> 
> Diff: https://reviews.apache.org/r/63420/diff/2/
> 
> 
> Testing
> -------
> 
> make check (Fedora 26)
> 
> 
> Thanks,
> 
> James Peach
> 
>


Re: Review Request 63420: Moved Linux namespace helpers into a source file.

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

(Updated Oct. 31, 2017, 12:19 a.m.)


Review request for mesos and Jiang Yan Xu.


Changes
-------

Address review feedback.


Repository: mesos


Description
-------

Moved the Linux namespace helper implementations from the header file
to the source file. This has a (theoretical) improvement to compilation
times, and also improves encapsulation and reduces header pollution for
consumers of these APIs.


Diffs (updated)
-----

  src/CMakeLists.txt 219252f6f82b2d62d024b2ab876fa0ba2f5c8e6c 
  src/Makefile.am b60a54a031260de6f1fb43584ae5083df2dc7e31 
  src/linux/ns.hpp 3d3a1fb6d0e3fffc4ff56625a76fb749a7afe51b 
  src/linux/ns.cpp PRE-CREATION 
  src/slave/containerizer/mesos/isolators/filesystem/shared.cpp 927d95be2c25ceb324acac99edaee24a28a5d59c 
  src/slave/containerizer/mesos/isolators/namespaces/ipc.cpp 8675640e0a4addc706bc2eabfe2fe4f08e19231e 
  src/slave/containerizer/mesos/isolators/network/cni/cni.cpp fc68f04b42f12a59518a2eea43e5bd49787d4646 
  src/slave/containerizer/mesos/isolators/volume/secret.cpp ee9366fc360575570185ed8f69eb579006739380 


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

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


Testing
-------

make check (Fedora 26)


Thanks,

James Peach


Re: Review Request 63420: Moved Linux namespace helpers into a source file.

Posted by Mesos Reviewbot <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63420/#review189646
-----------------------------------------------------------



Patch looks great!

Reviews applied: [63420]

Passed command: export OS='ubuntu:14.04' BUILDTOOL='autotools' COMPILER='gcc' CONFIGURATION='--verbose --disable-libtool-wrappers' ENVIRONMENT='GLOG_v=1 MESOS_VERBOSE=1'; ./support/docker-build.sh

- Mesos Reviewbot


On Oct. 30, 2017, 5:27 p.m., James Peach wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63420/
> -----------------------------------------------------------
> 
> (Updated Oct. 30, 2017, 5:27 p.m.)
> 
> 
> Review request for mesos and Jiang Yan Xu.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Moved the Linux namespace helper implementations from the header file
> to the source file. This has a (theoretical) improvement to compilation
> times, and also improves encapsulation and reduces header pollution for
> consumers of these APIs.
> 
> 
> Diffs
> -----
> 
>   src/Makefile.am b60a54a031260de6f1fb43584ae5083df2dc7e31 
>   src/linux/ns.hpp 3d3a1fb6d0e3fffc4ff56625a76fb749a7afe51b 
>   src/linux/ns.cpp PRE-CREATION 
>   src/slave/containerizer/mesos/isolators/filesystem/shared.cpp 927d95be2c25ceb324acac99edaee24a28a5d59c 
>   src/slave/containerizer/mesos/isolators/namespaces/ipc.cpp 8675640e0a4addc706bc2eabfe2fe4f08e19231e 
>   src/slave/containerizer/mesos/isolators/network/cni/cni.cpp fc68f04b42f12a59518a2eea43e5bd49787d4646 
>   src/slave/containerizer/mesos/isolators/volume/secret.cpp ee9366fc360575570185ed8f69eb579006739380 
> 
> 
> Diff: https://reviews.apache.org/r/63420/diff/1/
> 
> 
> Testing
> -------
> 
> make check (Fedora 26)
> 
> 
> Thanks,
> 
> James Peach
> 
>