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 2018/08/14 17:26:59 UTC

Review Request 68348: Fixed wrong `mnt` namespace detection for non-command executor tasks.

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

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


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


Repository: mesos


Description
-------

Previously, we were calling `getMountNamespaceTarget()` not only in
case of the command executor but in all other cases too, including
the default executor. That might lead to various subtle bugs, caused by
wrong detection of `mnt` namespace target. This patch fixes the issue
by setting a parent PID as `mnt` namespace target in case of
non-command executor task.


Diffs
-----

  src/slave/containerizer/mesos/containerizer.cpp 98129d006cda9b65804b518619b6addc8990410a 


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


Testing
-------

1. sudo make check (Fedora 25)
2. internal CI


Thanks,

Andrei Budnik


Re: Review Request 68348: Fixed wrong `mnt` namespace detection for non-command executor tasks.

Posted by Alexander Rukletsov <ru...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/68348/#review207552
-----------------------------------------------------------


Fix it, then Ship it!




Maybe mention in "testing done" the newly added `ROOT_CGROUPS_LaunchNestedDebugAfterUnshareMntNamespace` test?


src/slave/containerizer/mesos/containerizer.cpp
Line 1943 (original), 1943 (patched)
<https://reviews.apache.org/r/68348/#comment290942>

    s/container/parentContainer



src/slave/containerizer/mesos/containerizer.cpp
Lines 1952 (patched)
<https://reviews.apache.org/r/68348/#comment290943>

    s/enter task's/enter the task's


- Alexander Rukletsov


On Aug. 14, 2018, 5:26 p.m., Andrei Budnik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68348/
> -----------------------------------------------------------
> 
> (Updated Aug. 14, 2018, 5:26 p.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov, Gilbert Song, Jie Yu, and Kevin Klues.
> 
> 
> Bugs: MESOS-9116
>     https://issues.apache.org/jira/browse/MESOS-9116
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Previously, we were calling `getMountNamespaceTarget()` not only in
> case of the command executor but in all other cases too, including
> the default executor. That might lead to various subtle bugs, caused by
> wrong detection of `mnt` namespace target. This patch fixes the issue
> by setting a parent PID as `mnt` namespace target in case of
> non-command executor task.
> 
> 
> Diffs
> -----
> 
>   src/slave/containerizer/mesos/containerizer.cpp 98129d006cda9b65804b518619b6addc8990410a 
> 
> 
> Diff: https://reviews.apache.org/r/68348/diff/2/
> 
> 
> Testing
> -------
> 
> 1. sudo make check (Fedora 25)
> 2. internal CI
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>


Re: Review Request 68348: Fixed wrong `mnt` namespace detection for non-command executor tasks.

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



FAIL: Some of the unit tests failed. Please check the relevant logs.

Reviews applied: `['68256', '68257', '68408', '68348']`

Failed command: `Start-MesosCITesting`

All the build artifacts available at: http://dcos-win.westus.cloudapp.azure.com/artifacts/mesos-reviewbot-testing/2183/mesos-review-68348

Relevant logs:

- [mesos-tests.log](http://dcos-win.westus.cloudapp.azure.com/artifacts/mesos-reviewbot-testing/2183/mesos-review-68348/logs/mesos-tests.log):

```
I0817 13:38:26.737844 204300 hierarchical.cpp:306] Added framework dccdb30e-13ac-4438-a2a6-6383d864e26a-0000
E0817 13:38:27.927847 141904 slave.cpp:7269] EXIT with status 1: Failed to perform recovery: Collect failed: Docker ps batch failed Collect failed: Failed to create subprocess 'docker -H npipe:////./pipe/docker_engine inspect mesos-dfa8e1ba-f235-45b6-9b1c-b5b4275c9eb4': Failed to call `CreateProcess`: cmd.exe /c "docker -H npipe:////./pipe/docker_engine inspect mesos-dfa8e1ba-f235-45b6-9b1c-b5b4275c9eb4": The paging file is too small for this operation to complete.


If recovery failed due to a change in configuration and you want to
keep the current agent id, you might want to change the
`--reconfiguration_policy` flag to a more permissive value.

To restart t
d:\dcos\mesos\mesos\src\tests\mock_docker.hpp(155): ERROR: this mock object (used in test DockerContainerizerTest.ROOT_DOCKER_DockerInspectDiscard) should be deleted but never is. Its address is @00000052B8CFB8F0.
d:\dcos\mesos\mesos\src\tests\containerizer\docker_containerizer_tests.cpp(3802): ERROR: this mock object (used in test DockerContainerizerTest.ROOT_DOCKER_DockerInspectDiscard) should be deleted but never is. Its address is @00000052B8CFBBA0.
d:\dcos\mesos\mesos\src\tests\mock_docker.cpp(48): ERROR: this mock object (used in test DockerContainerizerTest.ROOT_DOCKER_DockerInspectDiscard) should be deleted but never is. Its address is @0000016D15A732C0.
d:\dcos\mesos\mesos\3rdparty\libprocess\include\process\gmock.hpp(247): ERROR: this mock object (used in test DockerContainerizerTest.ROOT_DOCKER_DockerInspectDiscard) should be deleted but never is. Its address is @0000016D40312108.
d:\dcos\mesos\mesos\src\tests\mock_docker.cpp(101): ERROR: this mock object (used in test DockerContainerizerTest.ROOT_DOCKER_DockerInspectDiscard) should be deleted but never is. Its address is @0000016D40D44F30.
d:\dcos\mesos\mesos\src\tests\mock_registrar.cpp(54): ERROR: this mock object (used in test DockerContainerizerTest.ROOT_DOCKER_DockerInspectDiscard) should be deleted but never is. Its address is @0000016D45224B50.
ERROR: 6 leaked mock objects found at program exit.
his agent with a new agent id instead, do as follows:
rm -f C:\Users\jenkins\AppData\Local\Temp\Bs5GXK\meta\slaves\latest
This ensures that the agent does not recover old live executors.

If you use the Docker containerizer and think that the Docker
daemon state is broken, you can try to clear it. But be careful:
these commands will erase all containers and images from this host,
not just those started by Mesos!
docker kill $(docker ps -q)
docker rm $(docker ps -a -q)
docker rmi $(docker images -q)

Finally, restart the agent.
```

- Mesos Reviewbot Windows


On Aug. 14, 2018, 5:26 p.m., Andrei Budnik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68348/
> -----------------------------------------------------------
> 
> (Updated Aug. 14, 2018, 5:26 p.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov, Gilbert Song, Jie Yu, and Kevin Klues.
> 
> 
> Bugs: MESOS-9116
>     https://issues.apache.org/jira/browse/MESOS-9116
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Previously, we were calling `getMountNamespaceTarget()` not only in
> case of the command executor but in all other cases too, including
> the default executor. That might lead to various subtle bugs, caused by
> wrong detection of `mnt` namespace target. This patch fixes the issue
> by setting a parent PID as `mnt` namespace target in case of
> non-command executor task.
> 
> 
> Diffs
> -----
> 
>   src/slave/containerizer/mesos/containerizer.cpp 98129d006cda9b65804b518619b6addc8990410a 
> 
> 
> Diff: https://reviews.apache.org/r/68348/diff/2/
> 
> 
> Testing
> -------
> 
> 1. sudo make check (Fedora 25)
> 2. internal CI
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>


Re: Review Request 68348: Fixed wrong `mnt` namespace detection for non-command executor tasks.

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



PASS: Mesos patch 68348 was successfully built and tested.

Reviews applied: `['68256', '68257', '68348']`

All the build artifacts available at: http://dcos-win.westus.cloudapp.azure.com/artifacts/mesos-reviewbot-testing/2149/mesos-review-68348

- Mesos Reviewbot Windows


On Aug. 14, 2018, 5:26 p.m., Andrei Budnik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68348/
> -----------------------------------------------------------
> 
> (Updated Aug. 14, 2018, 5:26 p.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov, Gilbert Song, Jie Yu, and Kevin Klues.
> 
> 
> Bugs: MESOS-9116
>     https://issues.apache.org/jira/browse/MESOS-9116
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Previously, we were calling `getMountNamespaceTarget()` not only in
> case of the command executor but in all other cases too, including
> the default executor. That might lead to various subtle bugs, caused by
> wrong detection of `mnt` namespace target. This patch fixes the issue
> by setting a parent PID as `mnt` namespace target in case of
> non-command executor task.
> 
> 
> Diffs
> -----
> 
>   src/slave/containerizer/mesos/containerizer.cpp 98129d006cda9b65804b518619b6addc8990410a 
> 
> 
> Diff: https://reviews.apache.org/r/68348/diff/1/
> 
> 
> Testing
> -------
> 
> 1. sudo make check (Fedora 25)
> 2. internal CI
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>


Re: Review Request 68348: Fixed wrong `mnt` namespace detection for non-command executor tasks.

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



Patch looks great!

Reviews applied: [68256, 68257, 68408, 68348]

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 Aug. 14, 2018, 5:26 p.m., Andrei Budnik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68348/
> -----------------------------------------------------------
> 
> (Updated Aug. 14, 2018, 5:26 p.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov, Gilbert Song, Jie Yu, and Kevin Klues.
> 
> 
> Bugs: MESOS-9116
>     https://issues.apache.org/jira/browse/MESOS-9116
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Previously, we were calling `getMountNamespaceTarget()` not only in
> case of the command executor but in all other cases too, including
> the default executor. That might lead to various subtle bugs, caused by
> wrong detection of `mnt` namespace target. This patch fixes the issue
> by setting a parent PID as `mnt` namespace target in case of
> non-command executor task.
> 
> 
> Diffs
> -----
> 
>   src/slave/containerizer/mesos/containerizer.cpp 98129d006cda9b65804b518619b6addc8990410a 
> 
> 
> Diff: https://reviews.apache.org/r/68348/diff/2/
> 
> 
> Testing
> -------
> 
> 1. sudo make check (Fedora 25)
> 2. internal CI
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>


Re: Review Request 68348: Fixed wrong `mnt` namespace detection for non-command executor tasks.

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



Patch looks great!

Reviews applied: [68256, 68257, 68348]

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 Aug. 14, 2018, 5:26 p.m., Andrei Budnik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68348/
> -----------------------------------------------------------
> 
> (Updated Aug. 14, 2018, 5:26 p.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov, Gilbert Song, Jie Yu, and Kevin Klues.
> 
> 
> Bugs: MESOS-9116
>     https://issues.apache.org/jira/browse/MESOS-9116
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Previously, we were calling `getMountNamespaceTarget()` not only in
> case of the command executor but in all other cases too, including
> the default executor. That might lead to various subtle bugs, caused by
> wrong detection of `mnt` namespace target. This patch fixes the issue
> by setting a parent PID as `mnt` namespace target in case of
> non-command executor task.
> 
> 
> Diffs
> -----
> 
>   src/slave/containerizer/mesos/containerizer.cpp 98129d006cda9b65804b518619b6addc8990410a 
> 
> 
> Diff: https://reviews.apache.org/r/68348/diff/1/
> 
> 
> Testing
> -------
> 
> 1. sudo make check (Fedora 25)
> 2. internal CI
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>


Re: Review Request 68348: Fixed wrong `mnt` namespace detection for non-command executor tasks.

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



PASS: Mesos patch 68348 was successfully built and tested.

Reviews applied: `['68256', '68257', '68408', '68348']`

All the build artifacts available at: http://dcos-win.westus.cloudapp.azure.com/artifacts/mesos-reviewbot-testing/2197/mesos-review-68348

- Mesos Reviewbot Windows


On Aug. 14, 2018, 5:26 p.m., Andrei Budnik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68348/
> -----------------------------------------------------------
> 
> (Updated Aug. 14, 2018, 5:26 p.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov, Gilbert Song, Jie Yu, and Kevin Klues.
> 
> 
> Bugs: MESOS-9116
>     https://issues.apache.org/jira/browse/MESOS-9116
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Previously, we were calling `getMountNamespaceTarget()` not only in
> case of the command executor but in all other cases too, including
> the default executor. That might lead to various subtle bugs, caused by
> wrong detection of `mnt` namespace target. This patch fixes the issue
> by setting a parent PID as `mnt` namespace target in case of
> non-command executor task.
> 
> 
> Diffs
> -----
> 
>   src/slave/containerizer/mesos/containerizer.cpp 98129d006cda9b65804b518619b6addc8990410a 
> 
> 
> Diff: https://reviews.apache.org/r/68348/diff/3/
> 
> 
> Testing
> -------
> 
> 1. sudo make check (Fedora 25)
> 2. internal CI
> 
> This test fixes `ROOT_CGROUPS_LaunchNestedDebugAfterUnshareMntNamespace` test, which can be found in the previous patch.
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>