You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Andrei Budnik <ab...@mesosphere.com> on 2017/11/06 18:41:33 UTC
Review Request 63589: Fixed bug in tests leading to orphaned
containers.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63589/
-----------------------------------------------------------
Review request for mesos, Alexander Rukletsov, Benno Evers, and Gilbert Song.
Bugs: MESOS-7506
https://issues.apache.org/jira/browse/MESOS-7506
Repository: mesos
Description
-------
Previously, some tests tried to advance the clock until task status
update was sent, while task's container was destroying. Container
destruction consists of multiple steps, where some steps have a timeout
specified, e.g. `cgroups::DESTROY_TIMEOUT`. So, there was a race
between container destruction process and the loop that advanced the
clock, leading to the following outcomes:
(1) Container destroyed, before clock advancing reaches timeout.
(2) Triggered timeout due to clock advancing, before container
destruction completes. That results in leaving orphaned
containers that will be detected by Slave destructor in
`tests/cluster.cpp`, so the test will fail.
This change gets rid of the loop and resumes clock after a single
advancing of the clock.
Diffs
-----
src/tests/slave_recovery_tests.cpp db337ba4e213820e7ad0c3f1b480388a2e456556
src/tests/slave_tests.cpp 9c2db7adf45af4209ecc475d938ce4b77c5a3ab4
Diff: https://reviews.apache.org/r/63589/diff/1/
Testing
-------
1. make check
2. internal ci (5x)
Thanks,
Andrei Budnik
Re: Review Request 63589: Fixed bug in tests leading to orphaned
containers.
Posted by Mesos Reviewbot Windows <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63589/#review190748
-----------------------------------------------------------
PASS: Mesos patch 63589 was successfully built and tested.
Reviews applied: `['63589']`
All the build artifacts available at: http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/63589
- Mesos Reviewbot Windows
On Nov. 6, 2017, 6:41 p.m., Andrei Budnik wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63589/
> -----------------------------------------------------------
>
> (Updated Nov. 6, 2017, 6:41 p.m.)
>
>
> Review request for mesos, Alexander Rukletsov, Benno Evers, and Gilbert Song.
>
>
> Bugs: MESOS-7506
> https://issues.apache.org/jira/browse/MESOS-7506
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Previously, some tests tried to advance the clock until task status
> update was sent, while task's container was destroying. Container
> destruction consists of multiple steps, where some steps have a timeout
> specified, e.g. `cgroups::DESTROY_TIMEOUT`. So, there was a race
> between container destruction process and the loop that advanced the
> clock, leading to the following outcomes:
>
> (1) Container destroyed, before clock advancing reaches timeout.
>
> (2) Triggered timeout due to clock advancing, before container
> destruction completes. That results in leaving orphaned
> containers that will be detected by Slave destructor in
> `tests/cluster.cpp`, so the test will fail.
>
> This change gets rid of the loop and resumes clock after a single
> advancing of the clock.
>
>
> Diffs
> -----
>
> src/tests/slave_recovery_tests.cpp 64bba047c6eaee563126a8bd1c6fa048f18172e1
> src/tests/slave_tests.cpp cf2fbac4cc53d632c385eb72adb0d80ef942e8a6
>
>
> Diff: https://reviews.apache.org/r/63589/diff/2/
>
>
> Testing
> -------
>
> 1. make check
> 2. internal ci (5x)
>
>
> Thanks,
>
> Andrei Budnik
>
>
Re: Review Request 63589: Fixed bug in tests leading to orphaned
containers.
Posted by Alexander Rukletsov <ru...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63589/#review190610
-----------------------------------------------------------
src/tests/slave_recovery_tests.cpp
Line 1167 (original), 1167 (patched)
<https://reviews.apache.org/r/63589/#comment268099>
Do a `Clock::settle()` please.
src/tests/slave_recovery_tests.cpp
Lines 1190-1192 (original), 1188-1190 (patched)
<https://reviews.apache.org/r/63589/#comment268112>
It is a good habit to resume the clock before exiting the test. Please do it before stopping the driver. Here and everywhere where applicable
src/tests/slave_recovery_tests.cpp
Lines 1191-1194 (original), 1189-1192 (patched)
<https://reviews.apache.org/r/63589/#comment268098>
A good habit is to resume the clock before exiting the test.
src/tests/slave_recovery_tests.cpp
Lines 1277-1279 (original), 1275-1277 (patched)
<https://reviews.apache.org/r/63589/#comment268108>
Add `Clock::settle` in-between to make sure the message is processed. Here and below where applies.
src/tests/slave_recovery_tests.cpp
Lines 1303-1305 (original), 1299-1301 (patched)
<https://reviews.apache.org/r/63589/#comment268102>
And let's resume the clock before stopping the driver.
src/tests/slave_recovery_tests.cpp
Lines 1394-1399 (original), 1388-1393 (patched)
<https://reviews.apache.org/r/63589/#comment268107>
You need to add `Clock::settle()` to make sure the comment is true.
src/tests/slave_recovery_tests.cpp
Lines 1465-1474 (original), 1454-1470 (patched)
<https://reviews.apache.org/r/63589/#comment268118>
If I understand correctly, what you need is a confirmation, that the task has launched and the ack has been acked. To achieve that, you don't really need `statusStarting` and `statusRunning`.
src/tests/slave_recovery_tests.cpp
Lines 1992-1994 (original), 1997-1999 (patched)
<https://reviews.apache.org/r/63589/#comment268119>
Aaand resume the clock : )
src/tests/slave_recovery_tests.cpp
Lines 2101-2103 (original), 2119-2121 (patched)
<https://reviews.apache.org/r/63589/#comment268120>
Please resume
- Alexander Rukletsov
On Nov. 6, 2017, 6:41 p.m., Andrei Budnik wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63589/
> -----------------------------------------------------------
>
> (Updated Nov. 6, 2017, 6:41 p.m.)
>
>
> Review request for mesos, Alexander Rukletsov, Benno Evers, and Gilbert Song.
>
>
> Bugs: MESOS-7506
> https://issues.apache.org/jira/browse/MESOS-7506
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Previously, some tests tried to advance the clock until task status
> update was sent, while task's container was destroying. Container
> destruction consists of multiple steps, where some steps have a timeout
> specified, e.g. `cgroups::DESTROY_TIMEOUT`. So, there was a race
> between container destruction process and the loop that advanced the
> clock, leading to the following outcomes:
>
> (1) Container destroyed, before clock advancing reaches timeout.
>
> (2) Triggered timeout due to clock advancing, before container
> destruction completes. That results in leaving orphaned
> containers that will be detected by Slave destructor in
> `tests/cluster.cpp`, so the test will fail.
>
> This change gets rid of the loop and resumes clock after a single
> advancing of the clock.
>
>
> Diffs
> -----
>
> src/tests/slave_recovery_tests.cpp db337ba4e213820e7ad0c3f1b480388a2e456556
> src/tests/slave_tests.cpp 9c2db7adf45af4209ecc475d938ce4b77c5a3ab4
>
>
> Diff: https://reviews.apache.org/r/63589/diff/1/
>
>
> Testing
> -------
>
> 1. make check
> 2. internal ci (5x)
>
>
> Thanks,
>
> Andrei Budnik
>
>
Re: Review Request 63589: Fixed bug in tests leading to orphaned
containers.
Posted by Mesos Reviewbot <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63589/#review190261
-----------------------------------------------------------
Patch looks great!
Reviews applied: [63589]
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 Nov. 6, 2017, 10:41 a.m., Andrei Budnik wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63589/
> -----------------------------------------------------------
>
> (Updated Nov. 6, 2017, 10:41 a.m.)
>
>
> Review request for mesos, Alexander Rukletsov, Benno Evers, and Gilbert Song.
>
>
> Bugs: MESOS-7506
> https://issues.apache.org/jira/browse/MESOS-7506
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Previously, some tests tried to advance the clock until task status
> update was sent, while task's container was destroying. Container
> destruction consists of multiple steps, where some steps have a timeout
> specified, e.g. `cgroups::DESTROY_TIMEOUT`. So, there was a race
> between container destruction process and the loop that advanced the
> clock, leading to the following outcomes:
>
> (1) Container destroyed, before clock advancing reaches timeout.
>
> (2) Triggered timeout due to clock advancing, before container
> destruction completes. That results in leaving orphaned
> containers that will be detected by Slave destructor in
> `tests/cluster.cpp`, so the test will fail.
>
> This change gets rid of the loop and resumes clock after a single
> advancing of the clock.
>
>
> Diffs
> -----
>
> src/tests/slave_recovery_tests.cpp db337ba4e213820e7ad0c3f1b480388a2e456556
> src/tests/slave_tests.cpp 9c2db7adf45af4209ecc475d938ce4b77c5a3ab4
>
>
> Diff: https://reviews.apache.org/r/63589/diff/1/
>
>
> Testing
> -------
>
> 1. make check
> 2. internal ci (5x)
>
>
> Thanks,
>
> Andrei Budnik
>
>
Re: Review Request 63589: Fixed bug in tests leading to orphaned
containers.
Posted by Alexander Rukletsov <ru...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63589/#review190880
-----------------------------------------------------------
Ship it!
Ship It!
- Alexander Rukletsov
On Nov. 6, 2017, 6:41 p.m., Andrei Budnik wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63589/
> -----------------------------------------------------------
>
> (Updated Nov. 6, 2017, 6:41 p.m.)
>
>
> Review request for mesos, Alexander Rukletsov, Benno Evers, and Gilbert Song.
>
>
> Bugs: MESOS-7506
> https://issues.apache.org/jira/browse/MESOS-7506
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Previously, some tests tried to advance the clock until task status
> update was sent, while task's container was destroying. Container
> destruction consists of multiple steps, where some steps have a timeout
> specified, e.g. `cgroups::DESTROY_TIMEOUT`. So, there was a race
> between container destruction process and the loop that advanced the
> clock, leading to the following outcomes:
>
> (1) Container destroyed, before clock advancing reaches timeout.
>
> (2) Triggered timeout due to clock advancing, before container
> destruction completes. That results in leaving orphaned
> containers that will be detected by Slave destructor in
> `tests/cluster.cpp`, so the test will fail.
>
> This change gets rid of the loop and resumes clock after a single
> advancing of the clock.
>
>
> Diffs
> -----
>
> src/tests/slave_recovery_tests.cpp 64bba047c6eaee563126a8bd1c6fa048f18172e1
> src/tests/slave_tests.cpp cf2fbac4cc53d632c385eb72adb0d80ef942e8a6
>
>
> Diff: https://reviews.apache.org/r/63589/diff/2/
>
>
> Testing
> -------
>
> 1. make check
> 2. internal ci (5x)
>
>
> Thanks,
>
> Andrei Budnik
>
>
Re: Review Request 63589: Fixed bug in tests leading to orphaned
containers.
Posted by Mesos Reviewbot Windows <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63589/#review190263
-----------------------------------------------------------
FAIL: Some Mesos libprocess-tests failed.
Reviews applied: `['63589']`
Failed command: `C:\DCOS\mesos\3rdparty\libprocess\src\tests\Debug\libprocess-tests.exe`
All the build artifacts available at: http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/63589
Relevant logs:
- [libprocess-tests-stdout.log](http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/63589/logs/libprocess-tests-stdout.log):
```
[ RUN ] SSLVerifyIPAdd/SSLTest.RequireCertificate/0
C:\DCOS\mesos\mesos\3rdparty\libprocess\src\tests\ssl_tests.cpp(446): error: (await_subprocess(client.get(), 0)).failure():
[++++++++++] Subprocess output.
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from SSLClientTest
[ RUN ] SSLClientTest.client
[ OK ] SSLClientTest.client (18 ms)
[----------] 1 test from SSLClientTest (18 ms total)
[----------] Global test environment tear-down
[==========] 1 test from 1 test case ran. (18 ms total)
[ PASSED ] 1 test.
[++++++++++]
[ FAILED ] SSLVerifyIPAdd/SSLTest.RequireCertificate/0, where GetParam() = "false" (723 ms)
[ RUN ] SSLVerifyIPAdd/SSLTest.RequireCertificate/1
[ OK ] SSLVerifyIPAdd/SSLTest.RequireCertificate/1 (1150 ms)
[----------] 4 tests from SSLVerifyIPAdd/SSLTest (3572 ms total)
[----------] Global test environment tear-down
[==========] 201 tests from 33 test cases ran. (45754 ms total)
[ PASSED ] 200 tests.
[ FAILED ] 1 test, listed below:
[ FAILED ] SSLVerifyIPAdd/SSLTest.RequireCertificate/0, where GetParam() = "false"
1 FAILED TEST
YOU HAVE 19 DISABLED TESTS
```
- [libprocess-tests-stderr.log](http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/63589/logs/libprocess-tests-stderr.log):
```
I1107 02:27:07.658520 3448 openssl.cpp:509] CA directory path unspecified! NOTE: Set CA directory path with LIBPROCESS_SSL_CA_DIR=<dirpath>
I1107 02:27:07.658520 3448 openssl.cpp:514] Will not verify peer certificate!
NOTE: Set LIBPROCESS_SSL_VERIFY_CERT=1 to enable peWARNING: Logging before InitGoogleLogging() is written to STDERR
I1107 02:27:07.980528 2608 openssl.cpp:509] CA directory path unspecified! NOTE: Set CA directory path with LIBPROCESS_SSL_CA_DIR=<dirpath>
I1107 02:27:07.981528 2608 openssl.cpp:514] Will not verify peer certificate!
NOTE: Set LIBPROCESS_SSL_VERIFY_CERT=1 to enable peer certificate verification
I1107 02:27:07.981528 2608 openssl.cpp:534] LIBPROCESS_SSL_REQUIRE_CERT implies peer certificate verification.
LIBPROCESS_SSL_VERIFY_CERT set to true
I1107 02:27:07.981528 2608 openssl.cpp:563] Using CA file: C:\Users\mesos\AppData\Local\Temp\CYDW2S\cert.pem
WARNING: Logging before InitGoogleLogging() is written to STDERR
I1107 02:27:09.207059 2504 openssl.cpp:509] CA directory path unspecified! NOTE: Set CA directory path with LIBPROCESS_SSL_CA_DIR=<dirpath>
I1107 02:27:09.212220 2504 openssl.cpp:514] Will not verify peer certificate!
NOTE: Set LIBPROCESS_SSL_VERIFY_CERT=1 to enable peer certificate verification
I1107 02:27:09.213196 2504 openssl.cpp:526] Will use IP address verification in subject alternative name certificate extension.
I1107 02:27:09.213196 2504 openssl.cpp:534] LIBPROCESS_SSL_REQUIRE_CERT implies peer certificate verification.
LIBPROCESS_SSL_VERIFY_CERT set to true
I1107 02:27:09.213196 2504 openssl.cpp:563] Using CA file: C:\Users\mesos\AppData\Local\Temp\WJnCf3\cert.pem
er certificate verification
I1107 02:27:07.687523 3448 openssl.cpp:534] LIBPROCESS_SSL_REQUIRE_CERT implies peer certificate verification.
LIBPROCESS_SSL_VERIFY_CERT set to true
I1107 02:27:07.688521 3448 openssl.cpp:563] Using CA file: C:\Users\mesos\AppData\Local\Temp\CYDW2S\cert.pem
I1107 02:27:08.904052 3448 openssl.cpp:509] CA directory path unspecified! NOTE: Set CA directory path with LIBPROCESS_SSL_CA_DIR=<dirpath>
I1107 02:27:08.905052 3448 openssl.cpp:514] Will not verify peer certificate!
NOTE: Set LIBPROCESS_SSL_VERIFY_CERT=1 to enable peer certificate verification
I1107 02:27:08.905052 3448 openssl.cpp:526] Will use IP address verification in subject alternative name certificate extension.
I1107 02:27:08.905052 3448 openssl.cpp:534] LIBPROCESS_SSL_REQUIRE_CERT implies peer certificate verification.
LIBPROCESS_SSL_VERIFY_CERT set to true
I1107 02:27:08.905052 3448 openssl.cpp:563] Using CA file: C:\Users\mesos\AppData\Local\Temp\WJnCf3\cert.pem
I1107 02:27:09.432168 1944 process.cpp:1067] Failed to accept socket: future discarded
```
- Mesos Reviewbot Windows
On Nov. 6, 2017, 10:41 a.m., Andrei Budnik wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63589/
> -----------------------------------------------------------
>
> (Updated Nov. 6, 2017, 10:41 a.m.)
>
>
> Review request for mesos, Alexander Rukletsov, Benno Evers, and Gilbert Song.
>
>
> Bugs: MESOS-7506
> https://issues.apache.org/jira/browse/MESOS-7506
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Previously, some tests tried to advance the clock until task status
> update was sent, while task's container was destroying. Container
> destruction consists of multiple steps, where some steps have a timeout
> specified, e.g. `cgroups::DESTROY_TIMEOUT`. So, there was a race
> between container destruction process and the loop that advanced the
> clock, leading to the following outcomes:
>
> (1) Container destroyed, before clock advancing reaches timeout.
>
> (2) Triggered timeout due to clock advancing, before container
> destruction completes. That results in leaving orphaned
> containers that will be detected by Slave destructor in
> `tests/cluster.cpp`, so the test will fail.
>
> This change gets rid of the loop and resumes clock after a single
> advancing of the clock.
>
>
> Diffs
> -----
>
> src/tests/slave_recovery_tests.cpp db337ba4e213820e7ad0c3f1b480388a2e456556
> src/tests/slave_tests.cpp 9c2db7adf45af4209ecc475d938ce4b77c5a3ab4
>
>
> Diff: https://reviews.apache.org/r/63589/diff/1/
>
>
> Testing
> -------
>
> 1. make check
> 2. internal ci (5x)
>
>
> Thanks,
>
> Andrei Budnik
>
>