You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Andrei Budnik <ab...@mesosphere.com> on 2017/10/16 17:03:16 UTC

Review Request 63035: Made `getMountNamespaceTarget` more reliable by ignoring exited childs.

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

Review request for mesos, Alexander Rukletsov, Jie Yu, and Kevin Klues.


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


Repository: mesos


Description
-------

To launch a nested container it might be necessarry to enter parent's
mnt namespace. `getMountNamespaceTarget()` is used for doing that.

Previously, `getMountNamespaceTarget` returned a failure when a
parent's child or grandchild process exited after enumerating child
processes and before getting mnt namespace for the process. Mesos
containerizer launches pre-exec hooks that might exit when calling
`getMountNamespaceTarget` during a subsequent launch of a
nested container. This commit makes `getMountNamespaceTarget` tolerant
to blinking child processes.


Diffs
-----

  src/slave/containerizer/mesos/utils.cpp ec6d6c79b0f93cabe880cd697094c20e999af4d1 


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


Testing
-------

make check
./src/mesos-tests --gtest_filter=NestedMesosContainerizerTest.ROOT_CGROUPS_DestroyDebugContainerOnRecover --gtest_break_on_failure --gtest_repeat=100


Thanks,

Andrei Budnik


Re: Review Request 63035: Made `getMountNamespaceTarget` more reliable by ignoring exited childs.

Posted by Andrei Budnik <ab...@mesosphere.com>.

> On Oct. 16, 2017, 5:05 p.m., Jie Yu wrote:
> > src/slave/containerizer/mesos/utils.cpp
> > Line 75 (original), 75 (patched)
> > <https://reviews.apache.org/r/63035/diff/1/?file=1857535#file1857535line75>
> >
> >     I think we can make `ns::getns` return a `Result<ino_t>`. Returnning `None()` means the pid does not exist.

I did it in a [separate RR](https://reviews.apache.org/r/63074/).


- Andrei


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


On Oct. 17, 2017, 1:45 p.m., Andrei Budnik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63035/
> -----------------------------------------------------------
> 
> (Updated Oct. 17, 2017, 1:45 p.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov, Jie Yu, and Kevin Klues.
> 
> 
> Bugs: MESOS-7504
>     https://issues.apache.org/jira/browse/MESOS-7504
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> To launch a nested container it might be necessarry to enter parent's
> mnt namespace. `getMountNamespaceTarget()` is used for doing that.
> 
> Previously, `getMountNamespaceTarget` returned a failure when a
> parent's child or grandchild process exited after enumerating child
> processes and before getting mnt namespace for the process. Mesos
> containerizer launches pre-exec hooks that might exit when calling
> `getMountNamespaceTarget` during a subsequent launch of a
> nested container. This commit makes `getMountNamespaceTarget` tolerant
> to blinking child processes.
> 
> 
> Diffs
> -----
> 
>   src/slave/containerizer/mesos/utils.cpp ec6d6c79b0f93cabe880cd697094c20e999af4d1 
> 
> 
> Diff: https://reviews.apache.org/r/63035/diff/2/
> 
> 
> Testing
> -------
> 
> make check
> ./src/mesos-tests --gtest_filter=NestedMesosContainerizerTest.ROOT_CGROUPS_DestroyDebugContainerOnRecover --gtest_break_on_failure --gtest_repeat=100
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>


Re: Review Request 63035: Made `getMountNamespaceTarget` more reliable by ignoring exited childs.

Posted by Jie Yu <yu...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63035/#review188154
-----------------------------------------------------------




src/slave/containerizer/mesos/utils.cpp
Line 75 (original), 75 (patched)
<https://reviews.apache.org/r/63035/#comment265195>

    I think we can make `ns::getns` return a `Result<ino_t>`. Returnning `None()` means the pid does not exist.


- Jie Yu


On Oct. 16, 2017, 5:03 p.m., Andrei Budnik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63035/
> -----------------------------------------------------------
> 
> (Updated Oct. 16, 2017, 5:03 p.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov, Jie Yu, and Kevin Klues.
> 
> 
> Bugs: MESOS-7504
>     https://issues.apache.org/jira/browse/MESOS-7504
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> To launch a nested container it might be necessarry to enter parent's
> mnt namespace. `getMountNamespaceTarget()` is used for doing that.
> 
> Previously, `getMountNamespaceTarget` returned a failure when a
> parent's child or grandchild process exited after enumerating child
> processes and before getting mnt namespace for the process. Mesos
> containerizer launches pre-exec hooks that might exit when calling
> `getMountNamespaceTarget` during a subsequent launch of a
> nested container. This commit makes `getMountNamespaceTarget` tolerant
> to blinking child processes.
> 
> 
> Diffs
> -----
> 
>   src/slave/containerizer/mesos/utils.cpp ec6d6c79b0f93cabe880cd697094c20e999af4d1 
> 
> 
> Diff: https://reviews.apache.org/r/63035/diff/1/
> 
> 
> Testing
> -------
> 
> make check
> ./src/mesos-tests --gtest_filter=NestedMesosContainerizerTest.ROOT_CGROUPS_DestroyDebugContainerOnRecover --gtest_break_on_failure --gtest_repeat=100
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>


Re: Review Request 63035: Made `getMountNamespaceTarget` more reliable by ignoring exited childs.

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



PASS: Mesos patch 63035 was successfully built and tested.

Reviews applied: `['63035']`

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

- Mesos Reviewbot Windows


On Oct. 16, 2017, 5:03 p.m., Andrei Budnik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63035/
> -----------------------------------------------------------
> 
> (Updated Oct. 16, 2017, 5:03 p.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov, Jie Yu, and Kevin Klues.
> 
> 
> Bugs: MESOS-7504
>     https://issues.apache.org/jira/browse/MESOS-7504
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> To launch a nested container it might be necessarry to enter parent's
> mnt namespace. `getMountNamespaceTarget()` is used for doing that.
> 
> Previously, `getMountNamespaceTarget` returned a failure when a
> parent's child or grandchild process exited after enumerating child
> processes and before getting mnt namespace for the process. Mesos
> containerizer launches pre-exec hooks that might exit when calling
> `getMountNamespaceTarget` during a subsequent launch of a
> nested container. This commit makes `getMountNamespaceTarget` tolerant
> to blinking child processes.
> 
> 
> Diffs
> -----
> 
>   src/slave/containerizer/mesos/utils.cpp ec6d6c79b0f93cabe880cd697094c20e999af4d1 
> 
> 
> Diff: https://reviews.apache.org/r/63035/diff/1/
> 
> 
> Testing
> -------
> 
> make check
> ./src/mesos-tests --gtest_filter=NestedMesosContainerizerTest.ROOT_CGROUPS_DestroyDebugContainerOnRecover --gtest_break_on_failure --gtest_repeat=100
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>


Re: Review Request 63035: Made `getMountNamespaceTarget` more reliable by ignoring exited childs.

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



Patch looks great!

Reviews applied: [63035]

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. 16, 2017, 5:03 p.m., Andrei Budnik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63035/
> -----------------------------------------------------------
> 
> (Updated Oct. 16, 2017, 5:03 p.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov, Jie Yu, and Kevin Klues.
> 
> 
> Bugs: MESOS-7504
>     https://issues.apache.org/jira/browse/MESOS-7504
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> To launch a nested container it might be necessarry to enter parent's
> mnt namespace. `getMountNamespaceTarget()` is used for doing that.
> 
> Previously, `getMountNamespaceTarget` returned a failure when a
> parent's child or grandchild process exited after enumerating child
> processes and before getting mnt namespace for the process. Mesos
> containerizer launches pre-exec hooks that might exit when calling
> `getMountNamespaceTarget` during a subsequent launch of a
> nested container. This commit makes `getMountNamespaceTarget` tolerant
> to blinking child processes.
> 
> 
> Diffs
> -----
> 
>   src/slave/containerizer/mesos/utils.cpp ec6d6c79b0f93cabe880cd697094c20e999af4d1 
> 
> 
> Diff: https://reviews.apache.org/r/63035/diff/1/
> 
> 
> Testing
> -------
> 
> make check
> ./src/mesos-tests --gtest_filter=NestedMesosContainerizerTest.ROOT_CGROUPS_DestroyDebugContainerOnRecover --gtest_break_on_failure --gtest_repeat=100
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>


Re: Review Request 63035: Made `getMountNamespaceTarget` more reliable by ignoring exited childs.

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



PASS: Mesos patch 63035 was successfully built and tested.

Reviews applied: `['63074', '63035']`

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

- Mesos Reviewbot Windows


On Oct. 17, 2017, 1:45 p.m., Andrei Budnik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63035/
> -----------------------------------------------------------
> 
> (Updated Oct. 17, 2017, 1:45 p.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov, Jie Yu, and Kevin Klues.
> 
> 
> Bugs: MESOS-7504
>     https://issues.apache.org/jira/browse/MESOS-7504
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> To launch a nested container it might be necessarry to enter parent's
> mnt namespace. `getMountNamespaceTarget()` is used for doing that.
> 
> Previously, `getMountNamespaceTarget` returned a failure when a
> parent's child or grandchild process exited after enumerating child
> processes and before getting mnt namespace for the process. Mesos
> containerizer launches pre-exec hooks that might exit when calling
> `getMountNamespaceTarget` during a subsequent launch of a
> nested container. This commit makes `getMountNamespaceTarget` tolerant
> to blinking child processes.
> 
> 
> Diffs
> -----
> 
>   src/slave/containerizer/mesos/utils.cpp ec6d6c79b0f93cabe880cd697094c20e999af4d1 
> 
> 
> Diff: https://reviews.apache.org/r/63035/diff/3/
> 
> 
> Testing
> -------
> 
> make check
> ./src/mesos-tests --gtest_filter=NestedMesosContainerizerTest.ROOT_CGROUPS_DestroyDebugContainerOnRecover --gtest_break_on_failure --gtest_repeat=100
> internal CI
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>


Re: Review Request 63035: Made `getMountNamespaceTarget` more reliable by ignoring exited childs.

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



Patch looks great!

Reviews applied: [63074, 63035]

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. 17, 2017, 1:45 p.m., Andrei Budnik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63035/
> -----------------------------------------------------------
> 
> (Updated Oct. 17, 2017, 1:45 p.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov, Jie Yu, and Kevin Klues.
> 
> 
> Bugs: MESOS-7504
>     https://issues.apache.org/jira/browse/MESOS-7504
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> To launch a nested container it might be necessarry to enter parent's
> mnt namespace. `getMountNamespaceTarget()` is used for doing that.
> 
> Previously, `getMountNamespaceTarget` returned a failure when a
> parent's child or grandchild process exited after enumerating child
> processes and before getting mnt namespace for the process. Mesos
> containerizer launches pre-exec hooks that might exit when calling
> `getMountNamespaceTarget` during a subsequent launch of a
> nested container. This commit makes `getMountNamespaceTarget` tolerant
> to blinking child processes.
> 
> 
> Diffs
> -----
> 
>   src/slave/containerizer/mesos/utils.cpp ec6d6c79b0f93cabe880cd697094c20e999af4d1 
> 
> 
> Diff: https://reviews.apache.org/r/63035/diff/2/
> 
> 
> Testing
> -------
> 
> make check
> ./src/mesos-tests --gtest_filter=NestedMesosContainerizerTest.ROOT_CGROUPS_DestroyDebugContainerOnRecover --gtest_break_on_failure --gtest_repeat=100
> internal CI
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>


Re: Review Request 63035: Made `getMountNamespaceTarget` more reliable by ignoring exited childs.

Posted by Jie Yu <yu...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63035/#review188690
-----------------------------------------------------------


Ship it!




Ship It!

- Jie Yu


On Oct. 17, 2017, 1:45 p.m., Andrei Budnik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63035/
> -----------------------------------------------------------
> 
> (Updated Oct. 17, 2017, 1:45 p.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov, Jie Yu, and Kevin Klues.
> 
> 
> Bugs: MESOS-7504
>     https://issues.apache.org/jira/browse/MESOS-7504
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> To launch a nested container it might be necessarry to enter parent's
> mnt namespace. `getMountNamespaceTarget()` is used for doing that.
> 
> Previously, `getMountNamespaceTarget` returned a failure when a
> parent's child or grandchild process exited after enumerating child
> processes and before getting mnt namespace for the process. Mesos
> containerizer launches pre-exec hooks that might exit when calling
> `getMountNamespaceTarget` during a subsequent launch of a
> nested container. This commit makes `getMountNamespaceTarget` tolerant
> to blinking child processes.
> 
> 
> Diffs
> -----
> 
>   src/slave/containerizer/mesos/utils.cpp ec6d6c79b0f93cabe880cd697094c20e999af4d1 
> 
> 
> Diff: https://reviews.apache.org/r/63035/diff/3/
> 
> 
> Testing
> -------
> 
> make check
> ./src/mesos-tests --gtest_filter=NestedMesosContainerizerTest.ROOT_CGROUPS_DestroyDebugContainerOnRecover --gtest_break_on_failure --gtest_repeat=100
> internal CI
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>


Re: Review Request 63035: Made `getMountNamespaceTarget` more reliable by ignoring exited childs.

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



Patch looks great!

Reviews applied: [63074, 63035]

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. 17, 2017, 1:45 p.m., Andrei Budnik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63035/
> -----------------------------------------------------------
> 
> (Updated Oct. 17, 2017, 1:45 p.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov, Jie Yu, and Kevin Klues.
> 
> 
> Bugs: MESOS-7504
>     https://issues.apache.org/jira/browse/MESOS-7504
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> To launch a nested container it might be necessarry to enter parent's
> mnt namespace. `getMountNamespaceTarget()` is used for doing that.
> 
> Previously, `getMountNamespaceTarget` returned a failure when a
> parent's child or grandchild process exited after enumerating child
> processes and before getting mnt namespace for the process. Mesos
> containerizer launches pre-exec hooks that might exit when calling
> `getMountNamespaceTarget` during a subsequent launch of a
> nested container. This commit makes `getMountNamespaceTarget` tolerant
> to blinking child processes.
> 
> 
> Diffs
> -----
> 
>   src/slave/containerizer/mesos/utils.cpp ec6d6c79b0f93cabe880cd697094c20e999af4d1 
> 
> 
> Diff: https://reviews.apache.org/r/63035/diff/3/
> 
> 
> Testing
> -------
> 
> make check
> ./src/mesos-tests --gtest_filter=NestedMesosContainerizerTest.ROOT_CGROUPS_DestroyDebugContainerOnRecover --gtest_break_on_failure --gtest_repeat=100
> internal CI
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>


Re: Review Request 63035: Made `getMountNamespaceTarget` more reliable by ignoring exited childs.

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



PASS: Mesos patch 63035 was successfully built and tested.

Reviews applied: `['63074', '63035']`

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

- Mesos Reviewbot Windows


On Oct. 17, 2017, 1:45 p.m., Andrei Budnik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63035/
> -----------------------------------------------------------
> 
> (Updated Oct. 17, 2017, 1:45 p.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov, Jie Yu, and Kevin Klues.
> 
> 
> Bugs: MESOS-7504
>     https://issues.apache.org/jira/browse/MESOS-7504
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> To launch a nested container it might be necessarry to enter parent's
> mnt namespace. `getMountNamespaceTarget()` is used for doing that.
> 
> Previously, `getMountNamespaceTarget` returned a failure when a
> parent's child or grandchild process exited after enumerating child
> processes and before getting mnt namespace for the process. Mesos
> containerizer launches pre-exec hooks that might exit when calling
> `getMountNamespaceTarget` during a subsequent launch of a
> nested container. This commit makes `getMountNamespaceTarget` tolerant
> to blinking child processes.
> 
> 
> Diffs
> -----
> 
>   src/slave/containerizer/mesos/utils.cpp ec6d6c79b0f93cabe880cd697094c20e999af4d1 
> 
> 
> Diff: https://reviews.apache.org/r/63035/diff/2/
> 
> 
> Testing
> -------
> 
> make check
> ./src/mesos-tests --gtest_filter=NestedMesosContainerizerTest.ROOT_CGROUPS_DestroyDebugContainerOnRecover --gtest_break_on_failure --gtest_repeat=100
> internal CI
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>


Re: Review Request 63035: Made `getMountNamespaceTarget` more reliable by ignoring exited childs.

Posted by Andrei Budnik <ab...@mesosphere.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63035/
-----------------------------------------------------------

(Updated Oct. 17, 2017, 1:45 p.m.)


Review request for mesos, Alexander Rukletsov, Jie Yu, and Kevin Klues.


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


Repository: mesos


Description
-------

To launch a nested container it might be necessarry to enter parent's
mnt namespace. `getMountNamespaceTarget()` is used for doing that.

Previously, `getMountNamespaceTarget` returned a failure when a
parent's child or grandchild process exited after enumerating child
processes and before getting mnt namespace for the process. Mesos
containerizer launches pre-exec hooks that might exit when calling
`getMountNamespaceTarget` during a subsequent launch of a
nested container. This commit makes `getMountNamespaceTarget` tolerant
to blinking child processes.


Diffs (updated)
-----

  src/slave/containerizer/mesos/utils.cpp ec6d6c79b0f93cabe880cd697094c20e999af4d1 


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

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


Testing
-------

make check
./src/mesos-tests --gtest_filter=NestedMesosContainerizerTest.ROOT_CGROUPS_DestroyDebugContainerOnRecover --gtest_break_on_failure --gtest_repeat=100


Thanks,

Andrei Budnik