You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Anand Mazumdar <an...@apache.org> on 2017/08/10 19:32:48 UTC
Review Request 61575: Added a test for verifying signal escalation on
the default executor.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/61575/
-----------------------------------------------------------
Review request for mesos, Jie Yu and Vinod Kone.
Bugs: MESOS-7879
https://issues.apache.org/jira/browse/MESOS-7879
Repository: mesos
Description
-------
This test uses the kill policy helper and blocks the SIGTERM signal.
Diffs
-----
src/tests/default_executor_tests.cpp b9776314a8781963b92ba9ac297654f61a443bc8
Diff: https://reviews.apache.org/r/61575/diff/1/
Testing
-------
make check
Thanks,
Anand Mazumdar
Re: Review Request 61575: Added a test for verifying signal
escalation on the default executor.
Posted by Anand Mazumdar <an...@apache.org>.
> On Aug. 14, 2017, 7:04 p.m., Gastón Kleiman wrote:
> > src/tests/default_executor_tests.cpp
> > Lines 600 (patched)
> > <https://reviews.apache.org/r/61575/diff/2/?file=1796675#file1796675line600>
> >
> > s/EXPECT_NE(0, offers->offers().size());/EXPECT_FALSE(offers->offers().empty)());
I used `ASSERT_NE` instead.
> On Aug. 14, 2017, 7:04 p.m., Gastón Kleiman wrote:
> > src/tests/default_executor_tests.cpp
> > Lines 613-661 (patched)
> > <https://reviews.apache.org/r/61575/diff/2/?file=1796675#file1796675line613>
> >
> > What do you think about the following shorter (and IMHO more readable) approach?
> >
> > ```
> > v1::Offer::Operation launchGroup = v1::LAUNCH_GROUP(
> > executorInfo,
> > v1::createTaskGroupInfo({taskInfo}));
> >
> > Future<v1::scheduler::Event::Update> update1;
> > EXPECT_CALL(*scheduler, update(_, _))
> > .WillOnce(DoAll(
> > FutureArg<1>(&update1),
> > v1::scheduler::SendAcknowledge(
> > frameworkId,
> > offer.agent_id())));
> >
> > mesos.send(v1::createCallAccept(
> > frameworkId,
> > offer,
> > {reserve, create, launchGroup}));
> > ```
We need to do a sweep of the file before using these new helpers first to be consistent within this file.
- Anand
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/61575/#review182895
-----------------------------------------------------------
On Aug. 16, 2017, 7:14 p.m., Anand Mazumdar wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61575/
> -----------------------------------------------------------
>
> (Updated Aug. 16, 2017, 7:14 p.m.)
>
>
> Review request for mesos, Gastón Kleiman, Jie Yu, and Vinod Kone.
>
>
> Bugs: MESOS-7879
> https://issues.apache.org/jira/browse/MESOS-7879
>
>
> Repository: mesos
>
>
> Description
> -------
>
> This test uses the kill policy helper and blocks the SIGTERM signal.
>
> Review: https://reviews.apache.org/r/61575
>
>
> Diffs
> -----
>
> src/tests/default_executor_tests.cpp afe0afabf784fb65eb833beadd3c584722c321e1
> src/tests/kill_policy_test_helper.hpp 29651102ec46b477e6e797c6e6bdef5b10afa665
> src/tests/kill_policy_test_helper.cpp a1880595ff015475f1ba49437d49f7397da19422
>
>
> Diff: https://reviews.apache.org/r/61575/diff/4/
>
>
> Testing
> -------
>
> make check
>
>
> Thanks,
>
> Anand Mazumdar
>
>
Re: Review Request 61575: Added a test for verifying signal
escalation on the default executor.
Posted by Gastón Kleiman <ga...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/61575/#review182895
-----------------------------------------------------------
src/tests/default_executor_tests.cpp
Lines 537 (patched)
<https://reviews.apache.org/r/61575/#comment258837>
s/terimate/terminate/
src/tests/default_executor_tests.cpp
Lines 593-597 (patched)
<https://reviews.apache.org/r/61575/#comment258839>
In some tests we do this instead:
```
v1::ExecutorInfo executorInfo = v1::createExecutorInfo(
v1::DEFAULT_EXECUTOR_ID.value(),
None(),
None(),
v1::ExecutorInfo::DEFAULT);
```
At some point we might want to choose one approach and do a sweeping change in this file.
src/tests/default_executor_tests.cpp
Lines 600 (patched)
<https://reviews.apache.org/r/61575/#comment258840>
s/EXPECT_NE(0, offers->offers().size());/EXPECT_FALSE(offers->offers().empty)());
src/tests/default_executor_tests.cpp
Lines 613-661 (patched)
<https://reviews.apache.org/r/61575/#comment258842>
What do you think about the following shorter (and IMHO more readable) approach?
```
v1::Offer::Operation launchGroup = v1::LAUNCH_GROUP(
executorInfo,
v1::createTaskGroupInfo({taskInfo}));
Future<v1::scheduler::Event::Update> update1;
EXPECT_CALL(*scheduler, update(_, _))
.WillOnce(DoAll(
FutureArg<1>(&update1),
v1::scheduler::SendAcknowledge(
frameworkId,
offer.agent_id())));
mesos.send(v1::createCallAccept(
frameworkId,
offer,
{reserve, create, launchGroup}));
```
- Gastón Kleiman
On Aug. 14, 2017, 5:59 p.m., Anand Mazumdar wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61575/
> -----------------------------------------------------------
>
> (Updated Aug. 14, 2017, 5:59 p.m.)
>
>
> Review request for mesos, Jie Yu and Vinod Kone.
>
>
> Bugs: MESOS-7879
> https://issues.apache.org/jira/browse/MESOS-7879
>
>
> Repository: mesos
>
>
> Description
> -------
>
> This test uses the kill policy helper and blocks the SIGTERM signal.
>
>
> Diffs
> -----
>
> src/tests/default_executor_tests.cpp b9776314a8781963b92ba9ac297654f61a443bc8
>
>
> Diff: https://reviews.apache.org/r/61575/diff/2/
>
>
> Testing
> -------
>
> make check
>
>
> Thanks,
>
> Anand Mazumdar
>
>
Re: Review Request 61575: Added a test for verifying signal
escalation on the default executor.
Posted by Gastón Kleiman <ga...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/61575/#review183019
-----------------------------------------------------------
src/tests/default_executor_tests.cpp
Lines 599 (patched)
<https://reviews.apache.org/r/61575/#comment259008>
Please use `ASSERT_FALSE(offers->offers().empty())` instead.
src/tests/default_executor_tests.cpp
Lines 609 (patched)
<https://reviews.apache.org/r/61575/#comment259010>
Remove the empty line.
src/tests/default_executor_tests.cpp
Lines 621 (patched)
<https://reviews.apache.org/r/61575/#comment259014>
I think we should make the grace period a bit longer to be able to check if a `TASK_KILLING` status update is sent.
src/tests/default_executor_tests.cpp
Lines 625-626 (patched)
<https://reviews.apache.org/r/61575/#comment259011>
I think that it'd be more readable to remove this from here, and to use the following instead of the `CALL` block that follows:
```
v1::Offer::Operation launchGroup = v1::LAUNCH_GROUP(
executorInfo,
v1::createTaskGroupInfo({task1, task2}));
mesos.send(v1::createCallAccept(frameworkId, offer, {launchGroup}));
```
src/tests/default_executor_tests.cpp
Lines 629-630 (patched)
<https://reviews.apache.org/r/61575/#comment259012>
If you use the following, you can remove the acknowledge block bellow:
```
EXPECT_CALL(*scheduler, update(_, _))
.WillOnce(DoAll(
FutureArg<1>(&update1),
v1::scheduler::SendAcknowledge(
frameworkId,
offer.agent_id())));
```
src/tests/default_executor_tests.cpp
Lines 675 (patched)
<https://reviews.apache.org/r/61575/#comment259013>
s/signify/signal/
src/tests/default_executor_tests.cpp
Lines 721 (patched)
<https://reviews.apache.org/r/61575/#comment259015>
This checks that the process finally got a `SIGKILL`, but we can't be sure if it got a `SIGTERM` before that.
I couldn't find a test that checks this with the other executors, but I think that we should at least add a TODO.
- Gastón Kleiman
On Aug. 15, 2017, 10:11 p.m., Anand Mazumdar wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61575/
> -----------------------------------------------------------
>
> (Updated Aug. 15, 2017, 10:11 p.m.)
>
>
> Review request for mesos, Gastón Kleiman, Jie Yu, and Vinod Kone.
>
>
> Bugs: MESOS-7879
> https://issues.apache.org/jira/browse/MESOS-7879
>
>
> Repository: mesos
>
>
> Description
> -------
>
> This also required a small modification to the kill test helper binary
> to write a marker file signifying that the signal handlers have been
> set up correctly.
>
>
> Diffs
> -----
>
> src/tests/default_executor_tests.cpp b9776314a8781963b92ba9ac297654f61a443bc8
> src/tests/kill_policy_test_helper.hpp 29651102ec46b477e6e797c6e6bdef5b10afa665
> src/tests/kill_policy_test_helper.cpp a1880595ff015475f1ba49437d49f7397da19422
>
>
> Diff: https://reviews.apache.org/r/61575/diff/3/
>
>
> Testing
> -------
>
> make check
>
>
> Thanks,
>
> Anand Mazumdar
>
>
Re: Review Request 61575: Added a test for verifying signal
escalation on the default executor.
Posted by Mesos Reviewbot Windows <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/61575/#review183055
-----------------------------------------------------------
Failed to apply patch!
Reviews applied: [61569, 61570, 61571, 61572, 61573, 61668, 61574, 61575]
Logs available here: http://104.210.40.105/logs/master/61575
- Mesos Reviewbot Windows
On Aug. 16, 2017, 12:14 p.m., Anand Mazumdar wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61575/
> -----------------------------------------------------------
>
> (Updated Aug. 16, 2017, 12:14 p.m.)
>
>
> Review request for mesos, Gastón Kleiman, Jie Yu, and Vinod Kone.
>
>
> Bugs: MESOS-7879
> https://issues.apache.org/jira/browse/MESOS-7879
>
>
> Repository: mesos
>
>
> Description
> -------
>
> This test uses the kill policy helper and blocks the SIGTERM signal.
>
> Review: https://reviews.apache.org/r/61575
>
>
> Diffs
> -----
>
> src/tests/default_executor_tests.cpp afe0afabf784fb65eb833beadd3c584722c321e1
> src/tests/kill_policy_test_helper.hpp 29651102ec46b477e6e797c6e6bdef5b10afa665
> src/tests/kill_policy_test_helper.cpp a1880595ff015475f1ba49437d49f7397da19422
>
>
> Diff: https://reviews.apache.org/r/61575/diff/4/
>
>
> Testing
> -------
>
> make check
>
>
> Thanks,
>
> Anand Mazumdar
>
>
Re: Review Request 61575: Added a test for verifying signal
escalation on the default executor.
Posted by Anand Mazumdar <an...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/61575/
-----------------------------------------------------------
(Updated Aug. 16, 2017, 7:14 p.m.)
Review request for mesos, Gastón Kleiman, Jie Yu, and Vinod Kone.
Changes
-------
Review comments.
Bugs: MESOS-7879
https://issues.apache.org/jira/browse/MESOS-7879
Repository: mesos
Description (updated)
-------
This test uses the kill policy helper and blocks the SIGTERM signal.
Review: https://reviews.apache.org/r/61575
Diffs (updated)
-----
src/tests/default_executor_tests.cpp afe0afabf784fb65eb833beadd3c584722c321e1
src/tests/kill_policy_test_helper.hpp 29651102ec46b477e6e797c6e6bdef5b10afa665
src/tests/kill_policy_test_helper.cpp a1880595ff015475f1ba49437d49f7397da19422
Diff: https://reviews.apache.org/r/61575/diff/4/
Changes: https://reviews.apache.org/r/61575/diff/3-4/
Testing
-------
make check
Thanks,
Anand Mazumdar
Re: Review Request 61575: Added a test for verifying signal
escalation on the default executor.
Posted by Anand Mazumdar <an...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/61575/
-----------------------------------------------------------
(Updated Aug. 15, 2017, 10:11 p.m.)
Review request for mesos, Gastón Kleiman, Jie Yu, and Vinod Kone.
Changes
-------
Review comments.
Bugs: MESOS-7879
https://issues.apache.org/jira/browse/MESOS-7879
Repository: mesos
Description (updated)
-------
This also required a small modification to the kill test helper binary
to write a marker file signifying that the signal handlers have been
set up correctly.
Diffs (updated)
-----
src/tests/default_executor_tests.cpp b9776314a8781963b92ba9ac297654f61a443bc8
src/tests/kill_policy_test_helper.hpp 29651102ec46b477e6e797c6e6bdef5b10afa665
src/tests/kill_policy_test_helper.cpp a1880595ff015475f1ba49437d49f7397da19422
Diff: https://reviews.apache.org/r/61575/diff/3/
Changes: https://reviews.apache.org/r/61575/diff/2-3/
Testing
-------
make check
Thanks,
Anand Mazumdar
Re: Review Request 61575: Added a test for verifying signal
escalation on the default executor.
Posted by Anand Mazumdar <an...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/61575/
-----------------------------------------------------------
(Updated Aug. 14, 2017, 5:59 p.m.)
Review request for mesos, Jie Yu and Vinod Kone.
Changes
-------
Minor change to a comment.
Bugs: MESOS-7879
https://issues.apache.org/jira/browse/MESOS-7879
Repository: mesos
Description
-------
This test uses the kill policy helper and blocks the SIGTERM signal.
Diffs (updated)
-----
src/tests/default_executor_tests.cpp b9776314a8781963b92ba9ac297654f61a443bc8
Diff: https://reviews.apache.org/r/61575/diff/2/
Changes: https://reviews.apache.org/r/61575/diff/1-2/
Testing
-------
make check
Thanks,
Anand Mazumdar
Re: Review Request 61575: Added a test for verifying signal
escalation on the default executor.
Posted by Mesos Reviewbot Windows <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/61575/#review182685
-----------------------------------------------------------
Bad patch!
Reviews applied: [61569, 61570, 61571, 61572, 61573, 61574, 61575]
Logs available here: http://104.210.40.105/logs/master/61575
- Mesos Reviewbot Windows
On Aug. 10, 2017, 7:32 p.m., Anand Mazumdar wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61575/
> -----------------------------------------------------------
>
> (Updated Aug. 10, 2017, 7:32 p.m.)
>
>
> Review request for mesos, Jie Yu and Vinod Kone.
>
>
> Bugs: MESOS-7879
> https://issues.apache.org/jira/browse/MESOS-7879
>
>
> Repository: mesos
>
>
> Description
> -------
>
> This test uses the kill policy helper and blocks the SIGTERM signal.
>
>
> Diffs
> -----
>
> src/tests/default_executor_tests.cpp b9776314a8781963b92ba9ac297654f61a443bc8
>
>
> Diff: https://reviews.apache.org/r/61575/diff/1/
>
>
> Testing
> -------
>
> make check
>
>
> Thanks,
>
> Anand Mazumdar
>
>
Re: Review Request 61575: Added a test for verifying signal
escalation on the default executor.
Posted by Mesos Reviewbot <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/61575/#review182680
-----------------------------------------------------------
Patch looks great!
Reviews applied: [61569, 61570, 61571, 61572, 61573, 61574, 61575]
Passed command: export OS='ubuntu:14.04' BUILDTOOL='autotools' COMPILER='gcc' CONFIGURATION='--verbose' ENVIRONMENT='GLOG_v=1 MESOS_VERBOSE=1'; ./support/docker-build.sh
- Mesos Reviewbot
On Aug. 10, 2017, 7:32 p.m., Anand Mazumdar wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61575/
> -----------------------------------------------------------
>
> (Updated Aug. 10, 2017, 7:32 p.m.)
>
>
> Review request for mesos, Jie Yu and Vinod Kone.
>
>
> Bugs: MESOS-7879
> https://issues.apache.org/jira/browse/MESOS-7879
>
>
> Repository: mesos
>
>
> Description
> -------
>
> This test uses the kill policy helper and blocks the SIGTERM signal.
>
>
> Diffs
> -----
>
> src/tests/default_executor_tests.cpp b9776314a8781963b92ba9ac297654f61a443bc8
>
>
> Diff: https://reviews.apache.org/r/61575/diff/1/
>
>
> Testing
> -------
>
> make check
>
>
> Thanks,
>
> Anand Mazumdar
>
>