Re: Review Request 35585: Updated Isolator to return required namespaces.
On June 23, 2015, 11:01 a.m., Ian Downes wrote: Ship It! For the test error, are we not cleaning out /var/run/mesos/netns (correctly) between tests so we're trying to symlink container1 repeatedly? We should probably be storing these symlinks in a directory the test controls? - Ian --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/35585/#review89011 --- On June 22, 2015, 10:03 p.m., Kapil Arya wrote: --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/35585/ --- (Updated June 22, 2015, 10:03 p.m.) Review request for mesos, Ian Downes, Jie Yu, and Niklas Nielsen. Bugs: MESOS-2884 https://issues.apache.org/jira/browse/MESOS-2884 Repository: mesos Description --- This would enable the MesosContainerizer to pass on a list of namespaces to LinuxLauncher instead of having LinuxLauncher guess it from the isolation flags. Diffs - include/mesos/slave/isolator.hpp 18edc030367e42240090f2f3dbc92aec7a4c6234 src/slave/containerizer/isolator.cpp d51ecc9347cafef90c92a6965e37f417b4929e79 src/slave/containerizer/isolators/filesystem/shared.hpp 08c6ffea0e2fada8e0b04f4ab15d8569c5416a8e src/slave/containerizer/isolators/filesystem/shared.cpp 5049306dea7b94dfaa4f7c2d8187bbae8c360633 src/slave/containerizer/isolators/namespaces/pid.hpp 6b24e2990311d0b09b3f6f2bb4ab29ee83fc src/slave/containerizer/isolators/namespaces/pid.cpp c6b28aa70415f4d88b14f0eeff7f20c35018fbdc src/slave/containerizer/isolators/network/port_mapping.hpp ee869ce71a68f51d58159c701d3c5d1e502b src/slave/containerizer/isolators/network/port_mapping.cpp 137cdc9b064b02e829af857cff7b9023ee7b7b16 Diff: https://reviews.apache.org/r/35585/diff/ Testing --- make check When I tried to run port-mapping tests as root, I got a bunch of errors. Any ideas on what might be going on here? ``` thinkpad:/home/kapil/mesos/netns/build-port-mapping # GLOG_logtostderr=1 GTEST_v=2 make check GTEST_FILTER=*Port* Making check in . make[1]: Entering directory '/local/mesos/netns/build-port-mapping' make[1]: Nothing to be done for 'check-am'. make[1]: Leaving directory '/local/mesos/netns/build-port-mapping' Making check in 3rdparty make[1]: Entering directory '/local/mesos/netns/build-port-mapping/3rdparty' make check-recursive make[2]: Entering directory '/local/mesos/netns/build-port-mapping/3rdparty' Making check in libprocess make[3]: Entering directory '/local/mesos/netns/build-port-mapping/3rdparty/libprocess' Making check in 3rdparty make[4]: Entering directory '/local/mesos/netns/build-port-mapping/3rdparty/libprocess/3rdparty' make check-recursive make[5]: Entering directory '/local/mesos/netns/build-port-mapping/3rdparty/libprocess/3rdparty' Making check in stout make[6]: Entering directory '/local/mesos/netns/build-port-mapping/3rdparty/libprocess/3rdparty/stout' Making check in . make[7]: Entering directory '/local/mesos/netns/build-port-mapping/3rdparty/libprocess/3rdparty/stout' make[7]: Nothing to be done for 'check-am'. make[7]: Leaving directory '/local/mesos/netns/build-port-mapping/3rdparty/libprocess/3rdparty/stout' Making check in include make[7]: Entering directory '/local/mesos/netns/build-port-mapping/3rdparty/libprocess/3rdparty/stout/include' make[7]: Nothing to be done for 'check'. make[7]: Leaving directory '/local/mesos/netns/build-port-mapping/3rdparty/libprocess/3rdparty/stout/include' make[6]: Leaving directory '/local/mesos/netns/build-port-mapping/3rdparty/libprocess/3rdparty/stout' make[6]: Entering directory '/local/mesos/netns/build-port-mapping/3rdparty/libprocess/3rdparty' make libgmock.la stout-tests make[7]: Entering directory '/local/mesos/netns/build-port-mapping/3rdparty/libprocess/3rdparty' make[7]: 'libgmock.la' is up to date. make[7]: 'stout-tests' is up to date. make[7]: Leaving directory '/local/mesos/netns/build-port-mapping/3rdparty/libprocess/3rdparty' make check-local make[7]: Entering directory '/local/mesos/netns/build-port-mapping/3rdparty/libprocess/3rdparty' ./stout-tests Note: Google Test filter = *Port* [==] Running 0 tests from 0 test cases. [==] 0 tests from 0 test cases ran. (0 ms total) [ PASSED ] 0 tests. make[7]: Leaving directory '/local/mesos/netns/build-port-mapping/3rdparty/libprocess/3rdparty' make[6]: Leaving directory '/local/mesos/netns/build-port-mapping/3rdparty/libprocess/3rdparty' make[5]: Leaving directory '/local/mesos/netns/build-port-mapping/3rdparty/libprocess/3rdparty' make[4]: Leaving directory
Re: Review Request 35585: Updated Isolator to return required namespaces.
On June 18, 2015, 6:08 p.m., Niklas Nielsen wrote: A few high level comments: 1) Let's use an enum instead of an unstructured int to encode the namespaces 2) Let's get a test wired up 3) Think about Mac compatibility while introducing the enum :) - Added an enum that is protected by __linux__. - Kapil --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/35585/#review88442 --- On June 22, 2015, 1:56 p.m., Kapil Arya wrote: --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/35585/ --- (Updated June 22, 2015, 1:56 p.m.) Review request for mesos, Ian Downes, Jie Yu, and Niklas Nielsen. Bugs: MESOS-2884 https://issues.apache.org/jira/browse/MESOS-2884 Repository: mesos Description --- This would enable the MesosContainerizer to pass on a list of namespaces to LinuxLauncher instead of having LinuxLauncher guess it from the isolation flags. Diffs - include/mesos/slave/isolator.hpp 18edc030367e42240090f2f3dbc92aec7a4c6234 src/slave/containerizer/isolator.cpp d51ecc9347cafef90c92a6965e37f417b4929e79 src/slave/containerizer/isolators/filesystem/shared.hpp 08c6ffea0e2fada8e0b04f4ab15d8569c5416a8e src/slave/containerizer/isolators/namespaces/pid.hpp 6b24e2990311d0b09b3f6f2bb4ab29ee83fc src/slave/containerizer/isolators/network/port_mapping.hpp ee869ce71a68f51d58159c701d3c5d1e502b Diff: https://reviews.apache.org/r/35585/diff/ Testing --- make check Thanks, Kapil Arya
Re: Review Request 35585: Updated Isolator to return required namespaces.
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/35585/ --- (Updated June 22, 2015, 1:56 p.m.) Review request for mesos, Ian Downes, Jie Yu, and Niklas Nielsen. Changes --- Addressed two of Nik's comments. Bugs: MESOS-2884 https://issues.apache.org/jira/browse/MESOS-2884 Repository: mesos Description --- This would enable the MesosContainerizer to pass on a list of namespaces to LinuxLauncher instead of having LinuxLauncher guess it from the isolation flags. Diffs (updated) - include/mesos/slave/isolator.hpp 18edc030367e42240090f2f3dbc92aec7a4c6234 src/slave/containerizer/isolator.cpp d51ecc9347cafef90c92a6965e37f417b4929e79 src/slave/containerizer/isolators/filesystem/shared.hpp 08c6ffea0e2fada8e0b04f4ab15d8569c5416a8e src/slave/containerizer/isolators/namespaces/pid.hpp 6b24e2990311d0b09b3f6f2bb4ab29ee83fc src/slave/containerizer/isolators/network/port_mapping.hpp ee869ce71a68f51d58159c701d3c5d1e502b Diff: https://reviews.apache.org/r/35585/diff/ Testing --- make check Thanks, Kapil Arya
Re: Review Request 35585: Updated Isolator to return required namespaces.
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/35585/#review88919 --- Ship it! include/mesos/slave/isolator.hpp (lines 78 - 104) https://reviews.apache.org/r/35585/#comment141532 Any reason you want to keep these defined here in the public header? IIUC, these are workaround for those who are using an old glibc. Can you instead include src/linux/ns.hpp in the corresponding isolator source file? include/mesos/slave/isolator.hpp (lines 113 - 114) https://reviews.apache.org/r/35585/#comment141533 Can you comment on what does that mean if None() is returned? src/slave/containerizer/isolators/filesystem/shared.hpp (lines 42 - 45) https://reviews.apache.org/r/35585/#comment141534 Can you move this to the cpp file and include src/linux/ns.hpp? src/slave/containerizer/isolators/namespaces/pid.hpp (lines 59 - 62) https://reviews.apache.org/r/35585/#comment141535 Ditto. src/slave/containerizer/isolators/network/port_mapping.hpp (lines 155 - 158) https://reviews.apache.org/r/35585/#comment141536 Ditto on moving to cpp file. - Jie Yu On June 23, 2015, 2:48 a.m., Kapil Arya wrote: --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/35585/ --- (Updated June 23, 2015, 2:48 a.m.) Review request for mesos, Ian Downes, Jie Yu, and Niklas Nielsen. Bugs: MESOS-2884 https://issues.apache.org/jira/browse/MESOS-2884 Repository: mesos Description --- This would enable the MesosContainerizer to pass on a list of namespaces to LinuxLauncher instead of having LinuxLauncher guess it from the isolation flags. Diffs - include/mesos/slave/isolator.hpp 18edc030367e42240090f2f3dbc92aec7a4c6234 src/slave/containerizer/isolator.cpp d51ecc9347cafef90c92a6965e37f417b4929e79 src/slave/containerizer/isolators/filesystem/shared.hpp 08c6ffea0e2fada8e0b04f4ab15d8569c5416a8e src/slave/containerizer/isolators/namespaces/pid.hpp 6b24e2990311d0b09b3f6f2bb4ab29ee83fc src/slave/containerizer/isolators/network/port_mapping.hpp ee869ce71a68f51d58159c701d3c5d1e502b Diff: https://reviews.apache.org/r/35585/diff/ Testing --- make check Thanks, Kapil Arya
Re: Review Request 35585: Updated Isolator to return required namespaces.
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/35585/#review88902 --- Hum, I don't see any change from r2 to r3? Did you upload the correct diff? - Jie Yu On June 23, 2015, 2:20 a.m., Kapil Arya wrote: --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/35585/ --- (Updated June 23, 2015, 2:20 a.m.) Review request for mesos, Ian Downes, Jie Yu, and Niklas Nielsen. Bugs: MESOS-2884 https://issues.apache.org/jira/browse/MESOS-2884 Repository: mesos Description --- This would enable the MesosContainerizer to pass on a list of namespaces to LinuxLauncher instead of having LinuxLauncher guess it from the isolation flags. Diffs - include/mesos/slave/isolator.hpp 18edc030367e42240090f2f3dbc92aec7a4c6234 src/slave/containerizer/isolator.cpp d51ecc9347cafef90c92a6965e37f417b4929e79 src/slave/containerizer/isolators/filesystem/shared.hpp 08c6ffea0e2fada8e0b04f4ab15d8569c5416a8e src/slave/containerizer/isolators/namespaces/pid.hpp 6b24e2990311d0b09b3f6f2bb4ab29ee83fc src/slave/containerizer/isolators/network/port_mapping.hpp ee869ce71a68f51d58159c701d3c5d1e502b Diff: https://reviews.apache.org/r/35585/diff/ Testing --- make check Thanks, Kapil Arya
Re: Review Request 35585: Updated Isolator to return required namespaces.
On June 22, 2015, 10:23 p.m., Jie Yu wrote: Hum, I don't see any change from r2 to r3? Did you upload the correct diff? I accidentally committed the diffs into the dependent RR. Fixed now. Thanks! :) - Kapil --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/35585/#review88902 --- On June 22, 2015, 10:48 p.m., Kapil Arya wrote: --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/35585/ --- (Updated June 22, 2015, 10:48 p.m.) Review request for mesos, Ian Downes, Jie Yu, and Niklas Nielsen. Bugs: MESOS-2884 https://issues.apache.org/jira/browse/MESOS-2884 Repository: mesos Description --- This would enable the MesosContainerizer to pass on a list of namespaces to LinuxLauncher instead of having LinuxLauncher guess it from the isolation flags. Diffs - include/mesos/slave/isolator.hpp 18edc030367e42240090f2f3dbc92aec7a4c6234 src/slave/containerizer/isolator.cpp d51ecc9347cafef90c92a6965e37f417b4929e79 src/slave/containerizer/isolators/filesystem/shared.hpp 08c6ffea0e2fada8e0b04f4ab15d8569c5416a8e src/slave/containerizer/isolators/namespaces/pid.hpp 6b24e2990311d0b09b3f6f2bb4ab29ee83fc src/slave/containerizer/isolators/network/port_mapping.hpp ee869ce71a68f51d58159c701d3c5d1e502b Diff: https://reviews.apache.org/r/35585/diff/ Testing --- make check Thanks, Kapil Arya
Re: Review Request 35585: Updated Isolator to return required namespaces.
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/35585/ --- (Updated June 22, 2015, 10:48 p.m.) Review request for mesos, Ian Downes, Jie Yu, and Niklas Nielsen. Changes --- Reuploading the diff. Bugs: MESOS-2884 https://issues.apache.org/jira/browse/MESOS-2884 Repository: mesos Description --- This would enable the MesosContainerizer to pass on a list of namespaces to LinuxLauncher instead of having LinuxLauncher guess it from the isolation flags. Diffs (updated) - include/mesos/slave/isolator.hpp 18edc030367e42240090f2f3dbc92aec7a4c6234 src/slave/containerizer/isolator.cpp d51ecc9347cafef90c92a6965e37f417b4929e79 src/slave/containerizer/isolators/filesystem/shared.hpp 08c6ffea0e2fada8e0b04f4ab15d8569c5416a8e src/slave/containerizer/isolators/namespaces/pid.hpp 6b24e2990311d0b09b3f6f2bb4ab29ee83fc src/slave/containerizer/isolators/network/port_mapping.hpp ee869ce71a68f51d58159c701d3c5d1e502b Diff: https://reviews.apache.org/r/35585/diff/ Testing --- make check Thanks, Kapil Arya
Re: Review Request 35585: Updated Isolator to return required namespaces.
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/35585/ --- (Updated June 22, 2015, 10:20 p.m.) Review request for mesos, Ian Downes, Jie Yu, and Niklas Nielsen. Changes --- Addressed Jie's comments. Bugs: MESOS-2884 https://issues.apache.org/jira/browse/MESOS-2884 Repository: mesos Description --- This would enable the MesosContainerizer to pass on a list of namespaces to LinuxLauncher instead of having LinuxLauncher guess it from the isolation flags. Diffs (updated) - include/mesos/slave/isolator.hpp 18edc030367e42240090f2f3dbc92aec7a4c6234 src/slave/containerizer/isolator.cpp d51ecc9347cafef90c92a6965e37f417b4929e79 src/slave/containerizer/isolators/filesystem/shared.hpp 08c6ffea0e2fada8e0b04f4ab15d8569c5416a8e src/slave/containerizer/isolators/namespaces/pid.hpp 6b24e2990311d0b09b3f6f2bb4ab29ee83fc src/slave/containerizer/isolators/network/port_mapping.hpp ee869ce71a68f51d58159c701d3c5d1e502b Diff: https://reviews.apache.org/r/35585/diff/ Testing --- make check Thanks, Kapil Arya
Re: Review Request 35585: Updated Isolator to return required namespaces.
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/35585/ --- (Updated June 23, 2015, 1:03 a.m.) Review request for mesos, Ian Downes, Jie Yu, and Niklas Nielsen. Bugs: MESOS-2884 https://issues.apache.org/jira/browse/MESOS-2884 Repository: mesos Description --- This would enable the MesosContainerizer to pass on a list of namespaces to LinuxLauncher instead of having LinuxLauncher guess it from the isolation flags. Diffs - include/mesos/slave/isolator.hpp 18edc030367e42240090f2f3dbc92aec7a4c6234 src/slave/containerizer/isolator.cpp d51ecc9347cafef90c92a6965e37f417b4929e79 src/slave/containerizer/isolators/filesystem/shared.hpp 08c6ffea0e2fada8e0b04f4ab15d8569c5416a8e src/slave/containerizer/isolators/filesystem/shared.cpp 5049306dea7b94dfaa4f7c2d8187bbae8c360633 src/slave/containerizer/isolators/namespaces/pid.hpp 6b24e2990311d0b09b3f6f2bb4ab29ee83fc src/slave/containerizer/isolators/namespaces/pid.cpp c6b28aa70415f4d88b14f0eeff7f20c35018fbdc src/slave/containerizer/isolators/network/port_mapping.hpp ee869ce71a68f51d58159c701d3c5d1e502b src/slave/containerizer/isolators/network/port_mapping.cpp 137cdc9b064b02e829af857cff7b9023ee7b7b16 Diff: https://reviews.apache.org/r/35585/diff/ Testing (updated) --- make check When I tried to run port-mapping tests as root, I got a bunch of errors. Any ideas on what might be going on here? ``` thinkpad:/home/kapil/mesos/netns/build-port-mapping # GLOG_logtostderr=1 GTEST_v=2 make check GTEST_FILTER=*Port* Making check in . make[1]: Entering directory '/local/mesos/netns/build-port-mapping' make[1]: Nothing to be done for 'check-am'. make[1]: Leaving directory '/local/mesos/netns/build-port-mapping' Making check in 3rdparty make[1]: Entering directory '/local/mesos/netns/build-port-mapping/3rdparty' make check-recursive make[2]: Entering directory '/local/mesos/netns/build-port-mapping/3rdparty' Making check in libprocess make[3]: Entering directory '/local/mesos/netns/build-port-mapping/3rdparty/libprocess' Making check in 3rdparty make[4]: Entering directory '/local/mesos/netns/build-port-mapping/3rdparty/libprocess/3rdparty' make check-recursive make[5]: Entering directory '/local/mesos/netns/build-port-mapping/3rdparty/libprocess/3rdparty' Making check in stout make[6]: Entering directory '/local/mesos/netns/build-port-mapping/3rdparty/libprocess/3rdparty/stout' Making check in . make[7]: Entering directory '/local/mesos/netns/build-port-mapping/3rdparty/libprocess/3rdparty/stout' make[7]: Nothing to be done for 'check-am'. make[7]: Leaving directory '/local/mesos/netns/build-port-mapping/3rdparty/libprocess/3rdparty/stout' Making check in include make[7]: Entering directory '/local/mesos/netns/build-port-mapping/3rdparty/libprocess/3rdparty/stout/include' make[7]: Nothing to be done for 'check'. make[7]: Leaving directory '/local/mesos/netns/build-port-mapping/3rdparty/libprocess/3rdparty/stout/include' make[6]: Leaving directory '/local/mesos/netns/build-port-mapping/3rdparty/libprocess/3rdparty/stout' make[6]: Entering directory '/local/mesos/netns/build-port-mapping/3rdparty/libprocess/3rdparty' make libgmock.la stout-tests make[7]: Entering directory '/local/mesos/netns/build-port-mapping/3rdparty/libprocess/3rdparty' make[7]: 'libgmock.la' is up to date. make[7]: 'stout-tests' is up to date. make[7]: Leaving directory '/local/mesos/netns/build-port-mapping/3rdparty/libprocess/3rdparty' make check-local make[7]: Entering directory '/local/mesos/netns/build-port-mapping/3rdparty/libprocess/3rdparty' ./stout-tests Note: Google Test filter = *Port* [==] Running 0 tests from 0 test cases. [==] 0 tests from 0 test cases ran. (0 ms total) [ PASSED ] 0 tests. make[7]: Leaving directory '/local/mesos/netns/build-port-mapping/3rdparty/libprocess/3rdparty' make[6]: Leaving directory '/local/mesos/netns/build-port-mapping/3rdparty/libprocess/3rdparty' make[5]: Leaving directory '/local/mesos/netns/build-port-mapping/3rdparty/libprocess/3rdparty' make[4]: Leaving directory '/local/mesos/netns/build-port-mapping/3rdparty/libprocess/3rdparty' Making check in . make[4]: Entering directory '/local/mesos/netns/build-port-mapping/3rdparty/libprocess' make tests benchmarks make[5]: Entering directory '/local/mesos/netns/build-port-mapping/3rdparty/libprocess' make[5]: 'tests' is up to date. make[5]: 'benchmarks' is up to date. make[5]: Leaving directory '/local/mesos/netns/build-port-mapping/3rdparty/libprocess' make check-local make[5]: Entering directory '/local/mesos/netns/build-port-mapping/3rdparty/libprocess' ./tests Note: Google Test filter = *Port* [==] Running 0 tests from 0 test cases. [==] 0 tests from 0 test cases ran. (0 ms total) [ PASSED ] 0 tests. YOU HAVE 3 DISABLED
Re: Review Request 35585: Updated Isolator to return required namespaces.
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/35585/#review88442 --- A few high level comments: 1) Let's use an enum instead of an unstructured int to encode the namespaces 2) Let's get a test wired up 3) Think about Mac compatibility while introducing the enum :) - Niklas Nielsen On June 17, 2015, 9:34 p.m., Kapil Arya wrote: --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/35585/ --- (Updated June 17, 2015, 9:34 p.m.) Review request for mesos, Ian Downes and Niklas Nielsen. Bugs: MESOS-2884 https://issues.apache.org/jira/browse/MESOS-2884 Repository: mesos Description --- This would enable the MesosContainerizer to pass on a list of namespaces to LinuxLauncher instead of having LinuxLauncher guess it from the isolation flags. Diffs - include/mesos/slave/isolator.hpp 18edc030367e42240090f2f3dbc92aec7a4c6234 src/slave/containerizer/isolator.cpp d51ecc9347cafef90c92a6965e37f417b4929e79 src/slave/containerizer/isolators/filesystem/shared.hpp 08c6ffea0e2fada8e0b04f4ab15d8569c5416a8e src/slave/containerizer/isolators/namespaces/pid.hpp 6b24e2990311d0b09b3f6f2bb4ab29ee83fc src/slave/containerizer/isolators/network/port_mapping.hpp ee869ce71a68f51d58159c701d3c5d1e502b Diff: https://reviews.apache.org/r/35585/diff/ Testing --- make check Thanks, Kapil Arya