You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Qian Zhang <zh...@cn.ibm.com> on 2016/04/12 16:54:08 UTC

Review Request 46097: [WIP] Added tests for 'network/cni' isolator.

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

Review request for mesos, Avinash sridharan and Jie Yu.


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


Repository: mesos


Description
-------

Added tests for 'network/cni' isolator.


Diffs
-----

  src/Makefile.am a8f68316c5d4d4c82d99363535a97fa5b1caafc5 
  src/tests/containerizer/cni_isolator_tests.cpp PRE-CREATION 

Diff: https://reviews.apache.org/r/46097/diff/


Testing
-------

$ sudo make check GTEST_FILTER="CniIsolatorTest.ROOT_LaunchCommandTask"
...
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from CniIsolatorTest
[ RUN      ] CniIsolatorTest.ROOT_LaunchCommandTask
+ /home/stack/workspace/mesos/build/src/mesos-containerizer mount --help=false --operation=make-rslave --path=/
+ + + cut -d  -f5
grep -v 3fb389d5-77b2-48bd-af69-c6385b3296c5
+ xargs --no-run-if-empty umount -l
grep -E /tmp/CniIsolatorTest_ROOT_LaunchCommandTask_BPuada/.+ /proc/self/mountinfo
+ mount -n --rbind /tmp/CniIsolatorTest_ROOT_LaunchCommandTask_BPuada/provisioner/containers/3fb389d5-77b2-48bd-af69-c6385b3296c5/backends/copy/rootfses/12adf695-4a56-4531-8365-1dea7842a330 /tmp/CniIsolatorTest_ROOT_LaunchCommandTask_BPuada/slaves/d1d9bb40-b122-4adb-8a84-3ead09f81b58-S0/frameworks/d1d9bb40-b122-4adb-8a84-3ead09f81b58-0000/executors/559e79c5-dc46-46eb-a6ea-0bd2c79947b3/runs/3fb389d5-77b2-48bd-af69-c6385b3296c5/.rootfs
I0412 22:39:49.079829 20962 exec.cpp:150] Version: 0.29.0
I0412 22:39:49.100260 21018 exec.cpp:225] Executor registered on agent d1d9bb40-b122-4adb-8a84-3ead09f81b58-S0
Registered executor on mesos
Starting task 559e79c5-dc46-46eb-a6ea-0bd2c79947b3
Forked command at 21020
[echo, echo, hello world]
hello world
Command exited with status 0 (pid: 21020)
I0412 22:39:49.239095 21016 exec.cpp:399] Executor asked to shutdown
[       OK ] CniIsolatorTest.ROOT_LaunchCommandTask (33871 ms)
[----------] 1 test from CniIsolatorTest (33891 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test case ran. (33906 ms total)
[  PASSED  ] 1 test.
...


Thanks,

Qian Zhang


Re: Review Request 46097: Added the test "CniIsolatorTest.ROOT_LaunchCommandTask".

Posted by Qian Zhang <zh...@cn.ibm.com>.

> On April 22, 2016, 5:19 a.m., Avinash sridharan wrote:
> > src/tests/containerizer/cni_isolator_tests.cpp, line 24
> > <https://reviews.apache.org/r/46097/diff/3/?file=1353232#file1353232line24>
> >
> >     I think `mesos` definitions should come after `process`.

No, I think we should do it in alphabet order, 'm' should come before 'p'. You can check command_executor_tests.cpp for an example.


> On April 22, 2016, 5:19 a.m., Avinash sridharan wrote:
> > src/tests/containerizer/cni_isolator_tests.cpp, line 31
> > <https://reviews.apache.org/r/46097/diff/3/?file=1353232#file1353232line31>
> >
> >     Move the `std` definitions above process.

We should do it in alphabet order.


> On April 22, 2016, 5:19 a.m., Avinash sridharan wrote:
> > src/tests/containerizer/cni_isolator_tests.cpp, line 38
> > <https://reviews.apache.org/r/46097/diff/3/?file=1353232#file1353232line38>
> >
> >     We should have an #ifdef for the whole file? This looks a bit odd. I would suggest put this conditional in the Makefile, so that this doesn't get compiled for non-linux platforms.

You can check runtime_isolator_tests.cpp which does the same.


> On April 22, 2016, 5:19 a.m., Avinash sridharan wrote:
> > src/tests/containerizer/cni_isolator_tests.cpp, line 53
> > <https://reviews.apache.org/r/46097/diff/3/?file=1353232#file1353232line53>
> >
> >     Do we need to explicitly specify this registry? I thought this would be the default?

Yeah, I agree!


> On April 22, 2016, 5:19 a.m., Avinash sridharan wrote:
> > src/tests/containerizer/cni_isolator_tests.cpp, line 65
> > <https://reviews.apache.org/r/46097/diff/3/?file=1353232#file1353232line65>
> >
> >     Do you want to make this into a helper function? I am guessing this will be used in other test cases too ?

Agree!


> On April 22, 2016, 5:19 a.m., Avinash sridharan wrote:
> > src/tests/containerizer/cni_isolator_tests.cpp, line 82
> > <https://reviews.apache.org/r/46097/diff/3/?file=1353232#file1353232line82>
> >
> >     Might Want to convert this into a helper function as well.

Agree!


> On April 22, 2016, 5:19 a.m., Avinash sridharan wrote:
> > src/tests/containerizer/cni_isolator_tests.cpp, line 74
> > <https://reviews.apache.org/r/46097/diff/3/?file=1353232#file1353232line74>
> >
> >     Should you be reading the /etc/resolv.conf and returning the DNS info as well. Else, the other test cases would never ever create a DNS file in the <container DIR>?

Agree!


- Qian


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


On April 20, 2016, 10:26 p.m., Qian Zhang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46097/
> -----------------------------------------------------------
> 
> (Updated April 20, 2016, 10:26 p.m.)
> 
> 
> Review request for mesos, Avinash sridharan and Jie Yu.
> 
> 
> Bugs: MESOS-5167
>     https://issues.apache.org/jira/browse/MESOS-5167
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added the test "CniIsolatorTest.ROOT_LaunchCommandTask".
> 
> 
> Diffs
> -----
> 
>   src/Makefile.am 5a2b4efa781752863d6751f98614fb78bece73ac 
>   src/tests/containerizer/cni_isolator_tests.cpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/46097/diff/
> 
> 
> Testing
> -------
> 
> [ RUN      ] CniIsolatorTest.ROOT_LaunchCommandTask
> + /home/stack/workspace/mesos/build/src/mesos-containerizer mount --help=false --operation=make-rslave --path=/
> + grep+  -E /tmp/CniIsolatorTest_ROOT_LaunchCommandTask_HRK4Dz/.+ /proc/self/mountinfo
> + grepcut -v -d  -f5
>  d06b117d-518b-41e2-b8e0-62a12083773c
> + xargs --no-run-if-empty umount -l
> + mount -n --rbind /tmp/CniIsolatorTest_ROOT_LaunchCommandTask_HRK4Dz/provisioner/containers/d06b117d-518b-41e2-b8e0-62a12083773c/backends/copy/rootfses/7ea27011-cd3a-43b0-8301-b0b94d9f9b47 /tmp/CniIsolatorTest_ROOT_LaunchCommandTask_HRK4Dz/slaves/18dea042-5bb5-4336-8bc8-358ed1fbf6dd-S0/frameworks/18dea042-5bb5-4336-8bc8-358ed1fbf6dd-0000/executors/60e6d35d-6d33-47ae-9c23-d2e5c913c892/runs/d06b117d-518b-41e2-b8e0-62a12083773c/.rootfs
> I0420 22:26:00.924844  9305 exec.cpp:150] Version: 0.29.0
> I0420 22:26:00.942319  9375 exec.cpp:225] Executor registered on agent 18dea042-5bb5-4336-8bc8-358ed1fbf6dd-S0
> Registered executor on mesos
> Starting task 60e6d35d-6d33-47ae-9c23-d2e5c913c892
> Forked command at 9382
> sh -c 'ls /'
> bin      dev      etc      home     lib      linuxrc  media    mnt      proc     root     run      sbin     sys      tmp      usr      var
> Command exited with status 0 (pid: 9382)
> I0420 22:26:01.098331  9380 exec.cpp:399] Executor asked to shutdown
> [       OK ] CniIsolatorTest.ROOT_LaunchCommandTask (42603 ms)
> 
> 
> Thanks,
> 
> Qian Zhang
> 
>


Re: Review Request 46097: Added the test "CniIsolatorTest.ROOT_LaunchCommandTask".

Posted by Avinash sridharan <av...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/46097/#review129957
-----------------------------------------------------------




src/tests/containerizer/cni_isolator_tests.cpp (line 20)
<https://reviews.apache.org/r/46097/#comment193517>

    Why do we need this alias? We could just put this in a `using` clause?



src/tests/containerizer/cni_isolator_tests.cpp (line 24)
<https://reviews.apache.org/r/46097/#comment193514>

    I think `mesos` definitions should come after `process`.



src/tests/containerizer/cni_isolator_tests.cpp (line 29)
<https://reviews.apache.org/r/46097/#comment193518>

    Please see my comment above.



src/tests/containerizer/cni_isolator_tests.cpp (line 31)
<https://reviews.apache.org/r/46097/#comment193515>

    Move the `std` definitions above process.



src/tests/containerizer/cni_isolator_tests.cpp (line 38)
<https://reviews.apache.org/r/46097/#comment193519>

    We should have an #ifdef for the whole file? This looks a bit odd. I would suggest put this conditional in the Makefile, so that this doesn't get compiled for non-linux platforms.



src/tests/containerizer/cni_isolator_tests.cpp (line 53)
<https://reviews.apache.org/r/46097/#comment193520>

    Do we need to explicitly specify this registry? I thought this would be the default?



src/tests/containerizer/cni_isolator_tests.cpp (line 65)
<https://reviews.apache.org/r/46097/#comment193529>

    Do you want to make this into a helper function? I am guessing this will be used in other test cases too ?



src/tests/containerizer/cni_isolator_tests.cpp (line 74)
<https://reviews.apache.org/r/46097/#comment193532>

    Should you be reading the /etc/resolv.conf and returning the DNS info as well. Else, the other test cases would never ever create a DNS file in the <container DIR>?



src/tests/containerizer/cni_isolator_tests.cpp (line 82)
<https://reviews.apache.org/r/46097/#comment193530>

    Might Want to convert this into a helper function as well.


- Avinash sridharan


On April 20, 2016, 2:26 p.m., Qian Zhang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46097/
> -----------------------------------------------------------
> 
> (Updated April 20, 2016, 2:26 p.m.)
> 
> 
> Review request for mesos, Avinash sridharan and Jie Yu.
> 
> 
> Bugs: MESOS-5167
>     https://issues.apache.org/jira/browse/MESOS-5167
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added the test "CniIsolatorTest.ROOT_LaunchCommandTask".
> 
> 
> Diffs
> -----
> 
>   src/Makefile.am 5a2b4efa781752863d6751f98614fb78bece73ac 
>   src/tests/containerizer/cni_isolator_tests.cpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/46097/diff/
> 
> 
> Testing
> -------
> 
> [ RUN      ] CniIsolatorTest.ROOT_LaunchCommandTask
> + /home/stack/workspace/mesos/build/src/mesos-containerizer mount --help=false --operation=make-rslave --path=/
> + grep+  -E /tmp/CniIsolatorTest_ROOT_LaunchCommandTask_HRK4Dz/.+ /proc/self/mountinfo
> + grepcut -v -d  -f5
>  d06b117d-518b-41e2-b8e0-62a12083773c
> + xargs --no-run-if-empty umount -l
> + mount -n --rbind /tmp/CniIsolatorTest_ROOT_LaunchCommandTask_HRK4Dz/provisioner/containers/d06b117d-518b-41e2-b8e0-62a12083773c/backends/copy/rootfses/7ea27011-cd3a-43b0-8301-b0b94d9f9b47 /tmp/CniIsolatorTest_ROOT_LaunchCommandTask_HRK4Dz/slaves/18dea042-5bb5-4336-8bc8-358ed1fbf6dd-S0/frameworks/18dea042-5bb5-4336-8bc8-358ed1fbf6dd-0000/executors/60e6d35d-6d33-47ae-9c23-d2e5c913c892/runs/d06b117d-518b-41e2-b8e0-62a12083773c/.rootfs
> I0420 22:26:00.924844  9305 exec.cpp:150] Version: 0.29.0
> I0420 22:26:00.942319  9375 exec.cpp:225] Executor registered on agent 18dea042-5bb5-4336-8bc8-358ed1fbf6dd-S0
> Registered executor on mesos
> Starting task 60e6d35d-6d33-47ae-9c23-d2e5c913c892
> Forked command at 9382
> sh -c 'ls /'
> bin      dev      etc      home     lib      linuxrc  media    mnt      proc     root     run      sbin     sys      tmp      usr      var
> Command exited with status 0 (pid: 9382)
> I0420 22:26:01.098331  9380 exec.cpp:399] Executor asked to shutdown
> [       OK ] CniIsolatorTest.ROOT_LaunchCommandTask (42603 ms)
> 
> 
> Thanks,
> 
> Qian Zhang
> 
>


Re: Review Request 46097: Added the test "CniIsolatorTest.ROOT_LaunchCommandTask".

Posted by Qian Zhang <zh...@cn.ibm.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/46097/
-----------------------------------------------------------

(Updated April 26, 2016, 11:53 p.m.)


Review request for mesos, Avinash sridharan and Jie Yu.


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


Repository: mesos


Description
-------

Added the test "CniIsolatorTest.ROOT_LaunchCommandTask".


Diffs (updated)
-----

  src/Makefile.am e024c6d65608a55765e527a8668c415723dcfcca 
  src/tests/containerizer/cni_isolator_tests.cpp PRE-CREATION 

Diff: https://reviews.apache.org/r/46097/diff/


Testing
-------

[ RUN      ] CniIsolatorTest.ROOT_LaunchCommandTask
+ /home/stack/workspace/mesos/build/src/mesos-containerizer mount --help=false --operation=make-rslave --path=/
+ grep+  -E /tmp/CniIsolatorTest_ROOT_LaunchCommandTask_HRK4Dz/.+ /proc/self/mountinfo
+ grepcut -v -d  -f5
 d06b117d-518b-41e2-b8e0-62a12083773c
+ xargs --no-run-if-empty umount -l
+ mount -n --rbind /tmp/CniIsolatorTest_ROOT_LaunchCommandTask_HRK4Dz/provisioner/containers/d06b117d-518b-41e2-b8e0-62a12083773c/backends/copy/rootfses/7ea27011-cd3a-43b0-8301-b0b94d9f9b47 /tmp/CniIsolatorTest_ROOT_LaunchCommandTask_HRK4Dz/slaves/18dea042-5bb5-4336-8bc8-358ed1fbf6dd-S0/frameworks/18dea042-5bb5-4336-8bc8-358ed1fbf6dd-0000/executors/60e6d35d-6d33-47ae-9c23-d2e5c913c892/runs/d06b117d-518b-41e2-b8e0-62a12083773c/.rootfs
I0420 22:26:00.924844  9305 exec.cpp:150] Version: 0.29.0
I0420 22:26:00.942319  9375 exec.cpp:225] Executor registered on agent 18dea042-5bb5-4336-8bc8-358ed1fbf6dd-S0
Registered executor on mesos
Starting task 60e6d35d-6d33-47ae-9c23-d2e5c913c892
Forked command at 9382
sh -c 'ls /'
bin      dev      etc      home     lib      linuxrc  media    mnt      proc     root     run      sbin     sys      tmp      usr      var
Command exited with status 0 (pid: 9382)
I0420 22:26:01.098331  9380 exec.cpp:399] Executor asked to shutdown
[       OK ] CniIsolatorTest.ROOT_LaunchCommandTask (42603 ms)


Thanks,

Qian Zhang


Re: Review Request 46097: Added the test "CniIsolatorTest.ROOT_LaunchCommandTask".

Posted by Qian Zhang <zh...@cn.ibm.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/46097/
-----------------------------------------------------------

(Updated April 20, 2016, 10:26 p.m.)


Review request for mesos, Avinash sridharan and Jie Yu.


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


Repository: mesos


Description
-------

Added the test "CniIsolatorTest.ROOT_LaunchCommandTask".


Diffs (updated)
-----

  src/Makefile.am 5a2b4efa781752863d6751f98614fb78bece73ac 
  src/tests/containerizer/cni_isolator_tests.cpp PRE-CREATION 

Diff: https://reviews.apache.org/r/46097/diff/


Testing (updated)
-------

[ RUN      ] CniIsolatorTest.ROOT_LaunchCommandTask
+ /home/stack/workspace/mesos/build/src/mesos-containerizer mount --help=false --operation=make-rslave --path=/
+ grep+  -E /tmp/CniIsolatorTest_ROOT_LaunchCommandTask_HRK4Dz/.+ /proc/self/mountinfo
+ grepcut -v -d  -f5
 d06b117d-518b-41e2-b8e0-62a12083773c
+ xargs --no-run-if-empty umount -l
+ mount -n --rbind /tmp/CniIsolatorTest_ROOT_LaunchCommandTask_HRK4Dz/provisioner/containers/d06b117d-518b-41e2-b8e0-62a12083773c/backends/copy/rootfses/7ea27011-cd3a-43b0-8301-b0b94d9f9b47 /tmp/CniIsolatorTest_ROOT_LaunchCommandTask_HRK4Dz/slaves/18dea042-5bb5-4336-8bc8-358ed1fbf6dd-S0/frameworks/18dea042-5bb5-4336-8bc8-358ed1fbf6dd-0000/executors/60e6d35d-6d33-47ae-9c23-d2e5c913c892/runs/d06b117d-518b-41e2-b8e0-62a12083773c/.rootfs
I0420 22:26:00.924844  9305 exec.cpp:150] Version: 0.29.0
I0420 22:26:00.942319  9375 exec.cpp:225] Executor registered on agent 18dea042-5bb5-4336-8bc8-358ed1fbf6dd-S0
Registered executor on mesos
Starting task 60e6d35d-6d33-47ae-9c23-d2e5c913c892
Forked command at 9382
sh -c 'ls /'
bin      dev      etc      home     lib      linuxrc  media    mnt      proc     root     run      sbin     sys      tmp      usr      var
Command exited with status 0 (pid: 9382)
I0420 22:26:01.098331  9380 exec.cpp:399] Executor asked to shutdown
[       OK ] CniIsolatorTest.ROOT_LaunchCommandTask (42603 ms)


Thanks,

Qian Zhang


Re: Review Request 46097: Added the test "CniIsolatorTest.ROOT_LaunchCommandTask".

Posted by Qian Zhang <zh...@cn.ibm.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/46097/
-----------------------------------------------------------

(Updated April 20, 2016, 9:47 p.m.)


Review request for mesos, Avinash sridharan and Jie Yu.


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

Added the test "CniIsolatorTest.ROOT_LaunchCommandTask".


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


Repository: mesos


Description (updated)
-------

Added the test "CniIsolatorTest.ROOT_LaunchCommandTask".


Diffs (updated)
-----

  src/Makefile.am 5a2b4efa781752863d6751f98614fb78bece73ac 
  src/tests/containerizer/cni_isolator_tests.cpp PRE-CREATION 

Diff: https://reviews.apache.org/r/46097/diff/


Testing (updated)
-------

$ sudo make check GTEST_FILTER="CniIsolatorTest.ROOT_LaunchCommandTask"
...
[ RUN      ] CniIsolatorTest.ROOT_LaunchCommandTask
+ /home/stack/workspace/mesos/build/src/mesos-containerizer mount --help=false --operation=make-rslave --path=/
+ + + cut -d grep -f5
 -v 28c5b811-5154-4718-9c4d-e76c1bc50ca8
+ xargs --no-run-if-empty umount -l
grep -E /tmp/CniIsolatorTest_ROOT_LaunchCommandTask_Pjsz7G/.+ /proc/self/mountinfo
+ mount -n --rbind /tmp/CniIsolatorTest_ROOT_LaunchCommandTask_Pjsz7G/provisioner/containers/28c5b811-5154-4718-9c4d-e76c1bc50ca8/backends/copy/rootfses/7dd027f8-3753-4afc-bae3-1334390a62d0 /tmp/CniIsolatorTest_ROOT_LaunchCommandTask_Pjsz7G/slaves/4743c920-1501-4e91-9be0-aa801d7d210f-S0/frameworks/4743c920-1501-4e91-9be0-aa801d7d210f-0000/executors/e1b3e486-d8f4-478a-9880-adfd02131ace/runs/28c5b811-5154-4718-9c4d-e76c1bc50ca8/.rootfs
I0420 21:43:34.856003  6701 exec.cpp:150] Version: 0.29.0
I0420 21:43:34.873869  6776 exec.cpp:225] Executor registered on agent 4743c920-1501-4e91-9be0-aa801d7d210f-S0
Registered executor on mesos
Starting task e1b3e486-d8f4-478a-9880-adfd02131ace
Forked command at 6778
[/bin/ls, ls, -al, /]
total 56
drwxr-xr-x   17 root     root          4096 Apr 20 13:43 .
drwxr-xr-x   17 root     root          4096 Apr 20 13:43 ..
drwxr-xr-x    2 root     root          4096 Apr  1 18:56 bin
drwxr-xr-x    4 root     root           280 Apr 20 13:43 dev
drwxr-xr-x   13 root     root          4096 Apr 20 13:43 etc
drwxr-xr-x    2 root     root          4096 Apr  1 18:56 home
drwxr-xr-x    5 root     root          4096 Apr  1 18:56 lib
lrwxrwxrwx    1 root     root            12 Apr  1 18:56 linuxrc -> /bin/busybox
drwxr-xr-x    5 root     root          4096 Apr  1 18:56 media
drwxr-xr-x    3 root     root          4096 Apr 20 13:43 mnt
dr-xr-xr-x  156 root     root             0 Apr 17 08:03 proc
drwx------    2 root     root          4096 Apr  1 18:56 root
drwxr-xr-x    2 root     root          4096 Apr  1 18:56 run
drwxr-xr-x    2 root     root          4096 Apr  1 18:56 sbin
dr-xr-xr-x   13 root     root             0 Apr 17 08:01 sys
drwxrwxrwt    2 root     root          4096 Apr  1 18:56 tmp
drwxr-xr-x    7 root     root          4096 Apr  1 18:56 usr
drwxr-xr-x   10 root     root          4096 Apr  1 18:56 var
Command exited with status 0 (pid: 6778)
I0420 21:43:35.042424  6772 exec.cpp:399] Executor asked to shutdown
[       OK ] CniIsolatorTest.ROOT_LaunchCommandTask (41169 ms)
...


Thanks,

Qian Zhang


Re: Review Request 46097: [WIP] Added tests for 'network/cni' isolator.

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



Bad patch!

Reviews applied: [46097, 46096, 45983, 45956, 45955, 45954, 45953]

Failed command: ./support/apply-review.sh -n -r 45956

Error:
2016-04-12 18:43:39 URL:https://reviews.apache.org/r/45956/diff/raw/ [9802/9802] -> "45956.patch" [1]
error: patch failed: src/slave/containerizer/mesos/isolators/network/cni/cni.cpp:40
error: src/slave/containerizer/mesos/isolators/network/cni/cni.cpp: patch does not apply

Full log: https://builds.apache.org/job/mesos-reviewbot/12486/console

- Mesos ReviewBot


On April 12, 2016, 2:54 p.m., Qian Zhang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46097/
> -----------------------------------------------------------
> 
> (Updated April 12, 2016, 2:54 p.m.)
> 
> 
> Review request for mesos, Avinash sridharan and Jie Yu.
> 
> 
> Bugs: MESOS-5167
>     https://issues.apache.org/jira/browse/MESOS-5167
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added tests for 'network/cni' isolator.
> 
> 
> Diffs
> -----
> 
>   src/Makefile.am a8f68316c5d4d4c82d99363535a97fa5b1caafc5 
>   src/tests/containerizer/cni_isolator_tests.cpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/46097/diff/
> 
> 
> Testing
> -------
> 
> $ sudo make check GTEST_FILTER="CniIsolatorTest.ROOT_LaunchCommandTask"
> ...
> [==========] Running 1 test from 1 test case.
> [----------] Global test environment set-up.
> [----------] 1 test from CniIsolatorTest
> [ RUN      ] CniIsolatorTest.ROOT_LaunchCommandTask
> + /home/stack/workspace/mesos/build/src/mesos-containerizer mount --help=false --operation=make-rslave --path=/
> + + + cut -d  -f5
> grep -v 3fb389d5-77b2-48bd-af69-c6385b3296c5
> + xargs --no-run-if-empty umount -l
> grep -E /tmp/CniIsolatorTest_ROOT_LaunchCommandTask_BPuada/.+ /proc/self/mountinfo
> + mount -n --rbind /tmp/CniIsolatorTest_ROOT_LaunchCommandTask_BPuada/provisioner/containers/3fb389d5-77b2-48bd-af69-c6385b3296c5/backends/copy/rootfses/12adf695-4a56-4531-8365-1dea7842a330 /tmp/CniIsolatorTest_ROOT_LaunchCommandTask_BPuada/slaves/d1d9bb40-b122-4adb-8a84-3ead09f81b58-S0/frameworks/d1d9bb40-b122-4adb-8a84-3ead09f81b58-0000/executors/559e79c5-dc46-46eb-a6ea-0bd2c79947b3/runs/3fb389d5-77b2-48bd-af69-c6385b3296c5/.rootfs
> I0412 22:39:49.079829 20962 exec.cpp:150] Version: 0.29.0
> I0412 22:39:49.100260 21018 exec.cpp:225] Executor registered on agent d1d9bb40-b122-4adb-8a84-3ead09f81b58-S0
> Registered executor on mesos
> Starting task 559e79c5-dc46-46eb-a6ea-0bd2c79947b3
> Forked command at 21020
> [echo, echo, hello world]
> hello world
> Command exited with status 0 (pid: 21020)
> I0412 22:39:49.239095 21016 exec.cpp:399] Executor asked to shutdown
> [       OK ] CniIsolatorTest.ROOT_LaunchCommandTask (33871 ms)
> [----------] 1 test from CniIsolatorTest (33891 ms total)
> 
> [----------] Global test environment tear-down
> [==========] 1 test from 1 test case ran. (33906 ms total)
> [  PASSED  ] 1 test.
> ...
> 
> 
> Thanks,
> 
> Qian Zhang
> 
>


Re: Review Request 46097: Added the test "CniIsolatorTest.ROOT_LaunchCommandTask".

Posted by Qian Zhang <zh...@cn.ibm.com>.

> On April 13, 2016, 12:07 a.m., Avinash sridharan wrote:
> > src/tests/containerizer/cni_isolator_tests.cpp, line 143
> > <https://reviews.apache.org/r/46097/diff/1/?file=1341409#file1341409line143>
> >
> >     Can we make the task long running, and then check that the CNI network information has been correctly checkpointed in the host file system.
> 
> Qian Zhang wrote:
>     If the output of the CNI plugin is not correctly checkpointed for the container, then we should receive a TASK_FAILED rather than TASK_RUNNING or TASK_FINISHED which are expected by this test, so I think this test already catches this, right?

Posted a separate patch for it: https://reviews.apache.org/r/46435/


> On April 13, 2016, 12:07 a.m., Avinash sridharan wrote:
> > src/tests/containerizer/cni_isolator_tests.cpp, line 146
> > <https://reviews.apache.org/r/46097/diff/1/?file=1341409#file1341409line146>
> >
> >     Can we check if the checkpointed information is correctly cleaned up after the the TASK has finished.
> 
> Qian Zhang wrote:
>     Ditto.

Posted a separate patch for it: https://reviews.apache.org/r/46435/


- Qian


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


On April 20, 2016, 9:47 p.m., Qian Zhang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46097/
> -----------------------------------------------------------
> 
> (Updated April 20, 2016, 9:47 p.m.)
> 
> 
> Review request for mesos, Avinash sridharan and Jie Yu.
> 
> 
> Bugs: MESOS-5167
>     https://issues.apache.org/jira/browse/MESOS-5167
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added the test "CniIsolatorTest.ROOT_LaunchCommandTask".
> 
> 
> Diffs
> -----
> 
>   src/Makefile.am 5a2b4efa781752863d6751f98614fb78bece73ac 
>   src/tests/containerizer/cni_isolator_tests.cpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/46097/diff/
> 
> 
> Testing
> -------
> 
> $ sudo make check GTEST_FILTER="CniIsolatorTest.ROOT_LaunchCommandTask"
> ...
> [ RUN      ] CniIsolatorTest.ROOT_LaunchCommandTask
> + /home/stack/workspace/mesos/build/src/mesos-containerizer mount --help=false --operation=make-rslave --path=/
> + + + cut -d grep -f5
>  -v 28c5b811-5154-4718-9c4d-e76c1bc50ca8
> + xargs --no-run-if-empty umount -l
> grep -E /tmp/CniIsolatorTest_ROOT_LaunchCommandTask_Pjsz7G/.+ /proc/self/mountinfo
> + mount -n --rbind /tmp/CniIsolatorTest_ROOT_LaunchCommandTask_Pjsz7G/provisioner/containers/28c5b811-5154-4718-9c4d-e76c1bc50ca8/backends/copy/rootfses/7dd027f8-3753-4afc-bae3-1334390a62d0 /tmp/CniIsolatorTest_ROOT_LaunchCommandTask_Pjsz7G/slaves/4743c920-1501-4e91-9be0-aa801d7d210f-S0/frameworks/4743c920-1501-4e91-9be0-aa801d7d210f-0000/executors/e1b3e486-d8f4-478a-9880-adfd02131ace/runs/28c5b811-5154-4718-9c4d-e76c1bc50ca8/.rootfs
> I0420 21:43:34.856003  6701 exec.cpp:150] Version: 0.29.0
> I0420 21:43:34.873869  6776 exec.cpp:225] Executor registered on agent 4743c920-1501-4e91-9be0-aa801d7d210f-S0
> Registered executor on mesos
> Starting task e1b3e486-d8f4-478a-9880-adfd02131ace
> Forked command at 6778
> [/bin/ls, ls, -al, /]
> total 56
> drwxr-xr-x   17 root     root          4096 Apr 20 13:43 .
> drwxr-xr-x   17 root     root          4096 Apr 20 13:43 ..
> drwxr-xr-x    2 root     root          4096 Apr  1 18:56 bin
> drwxr-xr-x    4 root     root           280 Apr 20 13:43 dev
> drwxr-xr-x   13 root     root          4096 Apr 20 13:43 etc
> drwxr-xr-x    2 root     root          4096 Apr  1 18:56 home
> drwxr-xr-x    5 root     root          4096 Apr  1 18:56 lib
> lrwxrwxrwx    1 root     root            12 Apr  1 18:56 linuxrc -> /bin/busybox
> drwxr-xr-x    5 root     root          4096 Apr  1 18:56 media
> drwxr-xr-x    3 root     root          4096 Apr 20 13:43 mnt
> dr-xr-xr-x  156 root     root             0 Apr 17 08:03 proc
> drwx------    2 root     root          4096 Apr  1 18:56 root
> drwxr-xr-x    2 root     root          4096 Apr  1 18:56 run
> drwxr-xr-x    2 root     root          4096 Apr  1 18:56 sbin
> dr-xr-xr-x   13 root     root             0 Apr 17 08:01 sys
> drwxrwxrwt    2 root     root          4096 Apr  1 18:56 tmp
> drwxr-xr-x    7 root     root          4096 Apr  1 18:56 usr
> drwxr-xr-x   10 root     root          4096 Apr  1 18:56 var
> Command exited with status 0 (pid: 6778)
> I0420 21:43:35.042424  6772 exec.cpp:399] Executor asked to shutdown
> [       OK ] CniIsolatorTest.ROOT_LaunchCommandTask (41169 ms)
> ...
> 
> 
> Thanks,
> 
> Qian Zhang
> 
>


Re: Review Request 46097: [WIP] Added tests for 'network/cni' isolator.

Posted by Qian Zhang <zh...@cn.ibm.com>.

> On April 13, 2016, 12:07 a.m., Avinash sridharan wrote:
> > src/tests/containerizer/cni_isolator_tests.cpp, line 68
> > <https://reviews.apache.org/r/46097/diff/1/?file=1341409#file1341409line68>
> >
> >     `hostname -i` might return multiple IP. For example on my Ubuntu 14.04, this is the output I see:
> >     hostname -i
> >     10.0.2.15 172.28.128.7 172.18.0.1 192.168.1.1 172.17.0.1 192.168.0.1
> >     
> >     So wouldn't this cause a problem with the creation of the JSON output?

Yeah, that's a problem, maybe we should just grab the first one?


> On April 13, 2016, 12:07 a.m., Avinash sridharan wrote:
> > src/tests/containerizer/cni_isolator_tests.cpp, line 146
> > <https://reviews.apache.org/r/46097/diff/1/?file=1341409#file1341409line146>
> >
> >     Can we check if the checkpointed information is correctly cleaned up after the the TASK has finished.

Ditto.


> On April 13, 2016, 12:07 a.m., Avinash sridharan wrote:
> > src/tests/containerizer/cni_isolator_tests.cpp, line 143
> > <https://reviews.apache.org/r/46097/diff/1/?file=1341409#file1341409line143>
> >
> >     Can we make the task long running, and then check that the CNI network information has been correctly checkpointed in the host file system.

If the output of the CNI plugin is not correctly checkpointed for the container, then we should receive a TASK_FAILED rather than TASK_RUNNING or TASK_FINISHED which are expected by this test, so I think this test already catches this, right?


- Qian


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


On April 12, 2016, 10:54 p.m., Qian Zhang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46097/
> -----------------------------------------------------------
> 
> (Updated April 12, 2016, 10:54 p.m.)
> 
> 
> Review request for mesos, Avinash sridharan and Jie Yu.
> 
> 
> Bugs: MESOS-5167
>     https://issues.apache.org/jira/browse/MESOS-5167
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added tests for 'network/cni' isolator.
> 
> 
> Diffs
> -----
> 
>   src/Makefile.am a8f68316c5d4d4c82d99363535a97fa5b1caafc5 
>   src/tests/containerizer/cni_isolator_tests.cpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/46097/diff/
> 
> 
> Testing
> -------
> 
> $ sudo make check GTEST_FILTER="CniIsolatorTest.ROOT_LaunchCommandTask"
> ...
> [==========] Running 1 test from 1 test case.
> [----------] Global test environment set-up.
> [----------] 1 test from CniIsolatorTest
> [ RUN      ] CniIsolatorTest.ROOT_LaunchCommandTask
> + /home/stack/workspace/mesos/build/src/mesos-containerizer mount --help=false --operation=make-rslave --path=/
> + + + cut -d  -f5
> grep -v 3fb389d5-77b2-48bd-af69-c6385b3296c5
> + xargs --no-run-if-empty umount -l
> grep -E /tmp/CniIsolatorTest_ROOT_LaunchCommandTask_BPuada/.+ /proc/self/mountinfo
> + mount -n --rbind /tmp/CniIsolatorTest_ROOT_LaunchCommandTask_BPuada/provisioner/containers/3fb389d5-77b2-48bd-af69-c6385b3296c5/backends/copy/rootfses/12adf695-4a56-4531-8365-1dea7842a330 /tmp/CniIsolatorTest_ROOT_LaunchCommandTask_BPuada/slaves/d1d9bb40-b122-4adb-8a84-3ead09f81b58-S0/frameworks/d1d9bb40-b122-4adb-8a84-3ead09f81b58-0000/executors/559e79c5-dc46-46eb-a6ea-0bd2c79947b3/runs/3fb389d5-77b2-48bd-af69-c6385b3296c5/.rootfs
> I0412 22:39:49.079829 20962 exec.cpp:150] Version: 0.29.0
> I0412 22:39:49.100260 21018 exec.cpp:225] Executor registered on agent d1d9bb40-b122-4adb-8a84-3ead09f81b58-S0
> Registered executor on mesos
> Starting task 559e79c5-dc46-46eb-a6ea-0bd2c79947b3
> Forked command at 21020
> [echo, echo, hello world]
> hello world
> Command exited with status 0 (pid: 21020)
> I0412 22:39:49.239095 21016 exec.cpp:399] Executor asked to shutdown
> [       OK ] CniIsolatorTest.ROOT_LaunchCommandTask (33871 ms)
> [----------] 1 test from CniIsolatorTest (33891 ms total)
> 
> [----------] Global test environment tear-down
> [==========] 1 test from 1 test case ran. (33906 ms total)
> [  PASSED  ] 1 test.
> ...
> 
> 
> Thanks,
> 
> Qian Zhang
> 
>


Re: Review Request 46097: [WIP] Added tests for 'network/cni' isolator.

Posted by Avinash sridharan <av...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/46097/#review128446
-----------------------------------------------------------




src/tests/containerizer/cni_isolator_tests.cpp (line 68)
<https://reviews.apache.org/r/46097/#comment191868>

    `hostname -i` might return multiple IP. For example on my Ubuntu 14.04, this is the output I see:
    hostname -i
    10.0.2.15 172.28.128.7 172.18.0.1 192.168.1.1 172.17.0.1 192.168.0.1
    
    So wouldn't this cause a problem with the creation of the JSON output?



src/tests/containerizer/cni_isolator_tests.cpp (line 143)
<https://reviews.apache.org/r/46097/#comment191871>

    Can we make the task long running, and then check that the CNI network information has been correctly checkpointed in the host file system.



src/tests/containerizer/cni_isolator_tests.cpp (line 146)
<https://reviews.apache.org/r/46097/#comment191873>

    Can we check if the checkpointed information is correctly cleaned up after the the TASK has finished.


- Avinash sridharan


On April 12, 2016, 2:54 p.m., Qian Zhang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46097/
> -----------------------------------------------------------
> 
> (Updated April 12, 2016, 2:54 p.m.)
> 
> 
> Review request for mesos, Avinash sridharan and Jie Yu.
> 
> 
> Bugs: MESOS-5167
>     https://issues.apache.org/jira/browse/MESOS-5167
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added tests for 'network/cni' isolator.
> 
> 
> Diffs
> -----
> 
>   src/Makefile.am a8f68316c5d4d4c82d99363535a97fa5b1caafc5 
>   src/tests/containerizer/cni_isolator_tests.cpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/46097/diff/
> 
> 
> Testing
> -------
> 
> $ sudo make check GTEST_FILTER="CniIsolatorTest.ROOT_LaunchCommandTask"
> ...
> [==========] Running 1 test from 1 test case.
> [----------] Global test environment set-up.
> [----------] 1 test from CniIsolatorTest
> [ RUN      ] CniIsolatorTest.ROOT_LaunchCommandTask
> + /home/stack/workspace/mesos/build/src/mesos-containerizer mount --help=false --operation=make-rslave --path=/
> + + + cut -d  -f5
> grep -v 3fb389d5-77b2-48bd-af69-c6385b3296c5
> + xargs --no-run-if-empty umount -l
> grep -E /tmp/CniIsolatorTest_ROOT_LaunchCommandTask_BPuada/.+ /proc/self/mountinfo
> + mount -n --rbind /tmp/CniIsolatorTest_ROOT_LaunchCommandTask_BPuada/provisioner/containers/3fb389d5-77b2-48bd-af69-c6385b3296c5/backends/copy/rootfses/12adf695-4a56-4531-8365-1dea7842a330 /tmp/CniIsolatorTest_ROOT_LaunchCommandTask_BPuada/slaves/d1d9bb40-b122-4adb-8a84-3ead09f81b58-S0/frameworks/d1d9bb40-b122-4adb-8a84-3ead09f81b58-0000/executors/559e79c5-dc46-46eb-a6ea-0bd2c79947b3/runs/3fb389d5-77b2-48bd-af69-c6385b3296c5/.rootfs
> I0412 22:39:49.079829 20962 exec.cpp:150] Version: 0.29.0
> I0412 22:39:49.100260 21018 exec.cpp:225] Executor registered on agent d1d9bb40-b122-4adb-8a84-3ead09f81b58-S0
> Registered executor on mesos
> Starting task 559e79c5-dc46-46eb-a6ea-0bd2c79947b3
> Forked command at 21020
> [echo, echo, hello world]
> hello world
> Command exited with status 0 (pid: 21020)
> I0412 22:39:49.239095 21016 exec.cpp:399] Executor asked to shutdown
> [       OK ] CniIsolatorTest.ROOT_LaunchCommandTask (33871 ms)
> [----------] 1 test from CniIsolatorTest (33891 ms total)
> 
> [----------] Global test environment tear-down
> [==========] 1 test from 1 test case ran. (33906 ms total)
> [  PASSED  ] 1 test.
> ...
> 
> 
> Thanks,
> 
> Qian Zhang
> 
>