You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Benjamin Bannier <be...@mesosphere.io> on 2018/05/08 15:16:43 UTC
Review Request 67009: Added tests of resource provider registrar
recovery.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/67009/
-----------------------------------------------------------
Review request for mesos and Chun-Hung Hsiao.
Bugs: MESOS-8837
https://issues.apache.org/jira/browse/MESOS-8837
Repository: mesos
Description
-------
Added tests of resource provider registrar recovery.
Diffs
-----
src/tests/resource_provider_manager_tests.cpp c2045f2ba24f3e4b959115f23b706e733a75fea8
Diff: https://reviews.apache.org/r/67009/diff/1/
Testing
-------
`make check`
Thanks,
Benjamin Bannier
Re: Review Request 67009: Added tests of resource provider registrar
recovery.
Posted by Benjamin Bannier <be...@mesosphere.io>.
> On May 26, 2018, 12:37 a.m., Chun-Hung Hsiao wrote:
> > src/tests/resource_provider_manager_tests.cpp
> > Lines 846 (patched)
> > <https://reviews.apache.org/r/67009/diff/1/?file=2017945#file2017945line846>
> >
> > Since the purpose of this test and the one below is the registrar, not the underlying storage, it seems to me that the in-memory store is sufficient for this test (there is no need to create a new `mesos::state::Storage` instance), and also makes this test rely on fewer prerequisits. WDYT?
On construction the `Registrar` takes ownership of the given `storage`; this means we cannot meaningfully refer to the `storage` after that anymore. With that, it seems to only feasible way to recover the state from that storage afterwards would require reading from the file system which is why I choose a `LevelDBStorage` instead of e.g., a `InMemoryStorage`.
Dropping.
> On May 26, 2018, 12:37 a.m., Chun-Hung Hsiao wrote:
> > src/tests/resource_provider_manager_tests.cpp
> > Lines 847 (patched)
> > <https://reviews.apache.org/r/67009/diff/1/?file=2017945#file2017945line847>
> >
> > Is there a reason why `os::getcwd()` is used here instead of `sandbox.get()`? Ditto below.
Not really, other than ignorance on that value. Thanks for pointing this out, adjusted now.
> On May 26, 2018, 12:37 a.m., Chun-Hung Hsiao wrote:
> > src/tests/resource_provider_manager_tests.cpp
> > Line 844 (original), 853 (patched)
> > <https://reviews.apache.org/r/67009/diff/1/?file=2017945#file2017945line853>
> >
> > Could you briefly explain why you're advocating this pattern? I personally prefer the original pattern. Ditto below.
We want to perform some checks on the recovered registry below, so we need to bind it to a name. I added a check here as well now.
Dropping.
> On May 26, 2018, 12:37 a.m., Chun-Hung Hsiao wrote:
> > src/tests/resource_provider_manager_tests.cpp
> > Lines 883-884 (patched)
> > <https://reviews.apache.org/r/67009/diff/1/?file=2017945#file2017945line883>
> >
> > We could do `ASSERT_SOME_NE(nullptr, registrar);` here and below.
Great idea. I ultimately went with `ASSERT_SOME_NE(Owned<Registrar>(nullptr), registrar)`.
- Benjamin
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/67009/#review203911
-----------------------------------------------------------
On May 29, 2018, 10:54 a.m., Benjamin Bannier wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/67009/
> -----------------------------------------------------------
>
> (Updated May 29, 2018, 10:54 a.m.)
>
>
> Review request for mesos and Chun-Hung Hsiao.
>
>
> Bugs: MESOS-8837
> https://issues.apache.org/jira/browse/MESOS-8837
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Added tests of resource provider registrar recovery.
>
>
> Diffs
> -----
>
> src/tests/resource_provider_manager_tests.cpp 77a59e4d285b455154990f9b5cf80525f26583c9
>
>
> Diff: https://reviews.apache.org/r/67009/diff/2/
>
>
> Testing
> -------
>
> `make check`
>
>
> Thanks,
>
> Benjamin Bannier
>
>
Re: Review Request 67009: Added tests of resource provider registrar
recovery.
Posted by Chun-Hung Hsiao <ch...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/67009/#review203911
-----------------------------------------------------------
src/tests/resource_provider_manager_tests.cpp
Lines 846 (patched)
<https://reviews.apache.org/r/67009/#comment286291>
Since the purpose of this test and the one below is the registrar, not the underlying storage, it seems to me that the in-memory store is sufficient for this test (there is no need to create a new `mesos::state::Storage` instance), and also makes this test rely on fewer prerequisits. WDYT?
src/tests/resource_provider_manager_tests.cpp
Lines 847 (patched)
<https://reviews.apache.org/r/67009/#comment286289>
Is there a reason why `os::getcwd()` is used here instead of `sandbox.get()`? Ditto below.
src/tests/resource_provider_manager_tests.cpp
Line 844 (original), 853 (patched)
<https://reviews.apache.org/r/67009/#comment286293>
Could you briefly explain why you're advocating this pattern? I personally prefer the original pattern. Ditto below.
src/tests/resource_provider_manager_tests.cpp
Lines 883-884 (patched)
<https://reviews.apache.org/r/67009/#comment286294>
We could do `ASSERT_SOME_NE(nullptr, registrar);` here and below.
- Chun-Hung Hsiao
On May 8, 2018, 3:16 p.m., Benjamin Bannier wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/67009/
> -----------------------------------------------------------
>
> (Updated May 8, 2018, 3:16 p.m.)
>
>
> Review request for mesos and Chun-Hung Hsiao.
>
>
> Bugs: MESOS-8837
> https://issues.apache.org/jira/browse/MESOS-8837
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Added tests of resource provider registrar recovery.
>
>
> Diffs
> -----
>
> src/tests/resource_provider_manager_tests.cpp c2045f2ba24f3e4b959115f23b706e733a75fea8
>
>
> Diff: https://reviews.apache.org/r/67009/diff/1/
>
>
> Testing
> -------
>
> `make check`
>
>
> Thanks,
>
> Benjamin Bannier
>
>
Re: Review Request 67009: Added tests of resource provider registrar
recovery.
Posted by Mesos Reviewbot Windows <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/67009/#review204108
-----------------------------------------------------------
PASS: Mesos patch 67009 was successfully built and tested.
Reviews applied: `['67009']`
All the build artifacts available at: http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/67009
- Mesos Reviewbot Windows
On May 29, 2018, 8:54 a.m., Benjamin Bannier wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/67009/
> -----------------------------------------------------------
>
> (Updated May 29, 2018, 8:54 a.m.)
>
>
> Review request for mesos and Chun-Hung Hsiao.
>
>
> Bugs: MESOS-8837
> https://issues.apache.org/jira/browse/MESOS-8837
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Added tests of resource provider registrar recovery.
>
>
> Diffs
> -----
>
> src/tests/resource_provider_manager_tests.cpp 77a59e4d285b455154990f9b5cf80525f26583c9
>
>
> Diff: https://reviews.apache.org/r/67009/diff/3/
>
>
> Testing
> -------
>
> `make check`
>
>
> Thanks,
>
> Benjamin Bannier
>
>
Re: Review Request 67009: Added tests of resource provider registrar
recovery.
Posted by Chun-Hung Hsiao <ch...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/67009/#review204062
-----------------------------------------------------------
Ship it!
Ship It!
- Chun-Hung Hsiao
On May 29, 2018, 8:54 a.m., Benjamin Bannier wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/67009/
> -----------------------------------------------------------
>
> (Updated May 29, 2018, 8:54 a.m.)
>
>
> Review request for mesos and Chun-Hung Hsiao.
>
>
> Bugs: MESOS-8837
> https://issues.apache.org/jira/browse/MESOS-8837
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Added tests of resource provider registrar recovery.
>
>
> Diffs
> -----
>
> src/tests/resource_provider_manager_tests.cpp 77a59e4d285b455154990f9b5cf80525f26583c9
>
>
> Diff: https://reviews.apache.org/r/67009/diff/2/
>
>
> Testing
> -------
>
> `make check`
>
>
> Thanks,
>
> Benjamin Bannier
>
>
Re: Review Request 67009: Added tests of resource provider registrar
recovery.
Posted by Mesos Reviewbot Windows <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/67009/#review203988
-----------------------------------------------------------
FAIL: Some of the unit tests failed. Please check the relevant logs.
Reviews applied: `['67009']`
Failed command: `Start-MesosCITesting`
All the build artifacts available at: http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/67009
Relevant logs:
- [mesos-tests-cmake-stdout.log](http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/67009/logs/mesos-tests-cmake-stdout.log):
```
d:\dcos\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8\src\c\src\zookeeper.c(3501): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8-build\zookeeper.vcxproj] [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8.vcxproj]
d:\dcos\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8\src\c\src\zookeeper.c(3479): warning C4101: 'addrstr': unreferenced local variable [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8-build\zookeeper.vcxproj] [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8.vcxproj]
d:\dcos\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8\src\c\src\recordio.c(170): warning C4267: '=': conversion from 'size_t' to 'int32_t', possible loss of data [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8-build\zookeeper.vcxproj] [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8.vcxproj]
d:\dcos\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8\src\c\src\mt_adaptor.c(496): warning C4244: '=': conversion from 'time_t' to 'int32_t', possible loss of data [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8-build\zookeeper.vcxproj] [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8.vcxproj]
d:\dcos\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8\src\c\src\winport.c(256): warning C4090: 'function': different 'const' qualifiers [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8-build\zookeeper.vcxproj] [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8.vcxproj]
d:\dcos\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8\src\c\src\winport.c(166): warning C4716: 'pthread_cond_broadcast': must return a value [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8-build\zookeeper.vcxproj] [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8.vcxproj]
d:\dcos\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8\src\c\src\winport.c(205): warning C4716: 'pthread_cond_wait': must return a value [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8-build\zookeeper.vcxproj] [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8.vcxproj]
d:\dcos\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8\src\c\src\cli.c(124): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8-build\cli.vcxproj] [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8.vcxproj]
d:\dcos\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8\src\c\src\cli.c(128): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8-build\cli.vcxproj] [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8.vcxproj]
d:\dcos\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8\src\c\src\cli.c(279): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8-build\cli.vcxproj] [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8.vcxproj]
d:\dcos\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8\src\c\src\cli.c(301): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8-build\cli.vcxproj] [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8.vcxproj]
d:\dcos\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8\src\c\src\cli.c(368): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8-build\cli.vcxproj] [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8.vcxproj]
d:\dcos\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8\src\c\src\cli.c(372): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8-build\cli.vcxproj] [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8.vcxproj]
d:\dcos\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8\src\c\src\cli.c(512): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8-build\cli.vcxproj] [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8.vcxproj]
d:\dcos\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8\src\c\src\cli.c(543): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8-build\cli.vcxproj] [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8.vcxproj]
d:\dcos\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8\src\c\src\cli.c(548): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8-build\cli.vcxproj] [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8.vcxproj]
d:\dcos\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8\src\c\src\cli.c(569): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8\src\zookeeper-3.4.8-build\cli.vcxproj] [D:\DCOS\mesos\3rdparty\zookeeper-3.4.8.vcxproj]
"D:\DCOS\mesos\src\tests\mesos-tests.vcxproj" (default target) (1) ->
(Link target) ->
resource_provider_manager_tests.obj : error LNK2019: unresolved external symbol "public: __cdecl mesos::state::LevelDBStorage::LevelDBStorage(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0LevelDBStorage@state@mesos@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) referenced in function "private: virtual void __cdecl mesos::internal::tests::ResourceProviderRegistrarTest_DISABLED_GenericRegistrar_Test::TestBody(void)" (?TestBody@ResourceProviderRegistrarTest_DISABLED_GenericRegistrar_Test@tests@internal@mesos@@EEAAXXZ) [D:\DCOS\mesos\src\tests\mesos-tests.vcxproj]
resource_provider_manager_tests.obj : error LNK2019: unresolved external symbol "public: virtual __cdecl mesos::state::LevelDBStorage::~LevelDBStorage(void)" (??1LevelDBStorage@state@mesos@@UEAA@XZ) referenced in function "private: virtual void __cdecl mesos::internal::tests::ResourceProviderRegistrarTest_DISABLED_MasterRegistrar_Test::TestBody(void)" (?TestBody@ResourceProviderRegistrarTest_DISABLED_MasterRegistrar_Test@tests@internal@mesos@@EEAAXXZ) [D:\DCOS\mesos\src\tests\mesos-tests.vcxproj]
D:\DCOS\mesos\src\mesos-tests.exe : fatal error LNK1120: 2 unresolved externals [D:\DCOS\mesos\src\tests\mesos-tests.vcxproj]
172 Warning(s)
3 Error(s)
Time Elapsed 00:22:45.24
```
- Mesos Reviewbot Windows
On May 29, 2018, 8:54 a.m., Benjamin Bannier wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/67009/
> -----------------------------------------------------------
>
> (Updated May 29, 2018, 8:54 a.m.)
>
>
> Review request for mesos and Chun-Hung Hsiao.
>
>
> Bugs: MESOS-8837
> https://issues.apache.org/jira/browse/MESOS-8837
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Added tests of resource provider registrar recovery.
>
>
> Diffs
> -----
>
> src/tests/resource_provider_manager_tests.cpp 77a59e4d285b455154990f9b5cf80525f26583c9
>
>
> Diff: https://reviews.apache.org/r/67009/diff/2/
>
>
> Testing
> -------
>
> `make check`
>
>
> Thanks,
>
> Benjamin Bannier
>
>
Re: Review Request 67009: Added tests of resource provider registrar
recovery.
Posted by Chun-Hung Hsiao <ch...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/67009/#review204116
-----------------------------------------------------------
Ship it!
Ship It!
- Chun-Hung Hsiao
On May 29, 2018, 8:54 a.m., Benjamin Bannier wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/67009/
> -----------------------------------------------------------
>
> (Updated May 29, 2018, 8:54 a.m.)
>
>
> Review request for mesos and Chun-Hung Hsiao.
>
>
> Bugs: MESOS-8837
> https://issues.apache.org/jira/browse/MESOS-8837
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Added tests of resource provider registrar recovery.
>
>
> Diffs
> -----
>
> src/tests/resource_provider_manager_tests.cpp 77a59e4d285b455154990f9b5cf80525f26583c9
>
>
> Diff: https://reviews.apache.org/r/67009/diff/3/
>
>
> Testing
> -------
>
> `make check`
>
>
> Thanks,
>
> Benjamin Bannier
>
>
Re: Review Request 67009: Added tests of resource provider registrar
recovery.
Posted by Benjamin Bannier <be...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/67009/
-----------------------------------------------------------
(Updated May 29, 2018, 10:54 a.m.)
Review request for mesos and Chun-Hung Hsiao.
Changes
-------
Fixed issues raised by Chun.
Bugs: MESOS-8837
https://issues.apache.org/jira/browse/MESOS-8837
Repository: mesos
Description
-------
Added tests of resource provider registrar recovery.
Diffs (updated)
-----
src/tests/resource_provider_manager_tests.cpp 77a59e4d285b455154990f9b5cf80525f26583c9
Diff: https://reviews.apache.org/r/67009/diff/2/
Changes: https://reviews.apache.org/r/67009/diff/1-2/
Testing
-------
`make check`
Thanks,
Benjamin Bannier
Re: Review Request 67009: Added tests of resource provider registrar
recovery.
Posted by Mesos Reviewbot <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/67009/#review202702
-----------------------------------------------------------
Patch looks great!
Reviews applied: [67009]
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 May 8, 2018, 3:16 p.m., Benjamin Bannier wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/67009/
> -----------------------------------------------------------
>
> (Updated May 8, 2018, 3:16 p.m.)
>
>
> Review request for mesos and Chun-Hung Hsiao.
>
>
> Bugs: MESOS-8837
> https://issues.apache.org/jira/browse/MESOS-8837
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Added tests of resource provider registrar recovery.
>
>
> Diffs
> -----
>
> src/tests/resource_provider_manager_tests.cpp c2045f2ba24f3e4b959115f23b706e733a75fea8
>
>
> Diff: https://reviews.apache.org/r/67009/diff/1/
>
>
> Testing
> -------
>
> `make check`
>
>
> Thanks,
>
> Benjamin Bannier
>
>