Re: Review Request 54232: Shutdown tasks of completed frameworks on agent re-registration.

2017-01-23 Thread Vinod Kone

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


Ship it!




Ship It!

- Vinod Kone


On Jan. 24, 2017, 12:54 a.m., Neil Conway wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/54232/
> ---
> 
> (Updated Jan. 24, 2017, 12:54 a.m.)
> 
> 
> Review request for mesos and Vinod Kone.
> 
> 
> Bugs: MESOS-6602
> https://issues.apache.org/jira/browse/MESOS-6602
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Previously, if a framework completed (e.g., due to a teardown operation
> or framework shutdown), any framework tasks running on partitioned
> agents would not be shutdown when the agent re-registered. For tasks
> that are not partition-aware, the task would be shutdown on agent
> re-registration anyway. But for partition-aware tasks, this could lead
> to orphan tasks.
> 
> Fix this by changing the master to shutdown such tasks when the agent
> reregisters.
> 
> Note that if the master fails over between the time the framework
> completes and a partitioned agent re-registers, any framework tasks
> running on the agent will NOT be shutdown. This is a known bug; fixing
> it requires persisting the framework shutdown operation to the registry
> (MESOS-1719).
> 
> 
> Diffs
> -
> 
>   src/master/master.cpp 73159328ce3fd838e02eba0e6a30cf69efc319ba 
>   src/tests/partition_tests.cpp e7f64182f39dfdf15d035b43c18bf58aecfc74d1 
> 
> Diff: https://reviews.apache.org/r/54232/diff/
> 
> 
> Testing
> ---
> 
> `make check`
> 
> 
> Thanks,
> 
> Neil Conway
> 
>



Re: Review Request 54232: Shutdown tasks of completed frameworks on agent re-registration.

2017-01-23 Thread Neil Conway

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

(Updated Jan. 24, 2017, 12:54 a.m.)


Review request for mesos and Vinod Kone.


Changes
---

Simplify into a single loop, per review suggestion.


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


Repository: mesos


Description
---

Previously, if a framework completed (e.g., due to a teardown operation
or framework shutdown), any framework tasks running on partitioned
agents would not be shutdown when the agent re-registered. For tasks
that are not partition-aware, the task would be shutdown on agent
re-registration anyway. But for partition-aware tasks, this could lead
to orphan tasks.

Fix this by changing the master to shutdown such tasks when the agent
reregisters.

Note that if the master fails over between the time the framework
completes and a partitioned agent re-registers, any framework tasks
running on the agent will NOT be shutdown. This is a known bug; fixing
it requires persisting the framework shutdown operation to the registry
(MESOS-1719).


Diffs (updated)
-

  src/master/master.cpp 73159328ce3fd838e02eba0e6a30cf69efc319ba 
  src/tests/partition_tests.cpp e7f64182f39dfdf15d035b43c18bf58aecfc74d1 

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


Testing
---

`make check`


Thanks,

Neil Conway



Re: Review Request 54232: Shutdown tasks of completed frameworks on agent re-registration.

2017-01-23 Thread Vinod Kone

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




src/master/master.cpp (lines 5591 - 5598)


can you add this if check inside the `foreach` loop?

```
  foreach (const Task& task, tasks) {
const FrameworkID& frameworkId = task.framework_id();
Framework* framework = getFramework(frameworkId);
 
// Don't add the task if the framework is shutdown.
if (!isCompletedFramework(task.framework_id())) {
 continue;
}

// Always re-add partition-aware tasks.
if (partitionAwareFrameworks.contains(frameworkId)) {
  tasks_.push_back(task);

  if (framework != nullptr) {
framework->unreachableTasks.erase(task.task_id());
  }
} else if (!slaveWasRemoved) {
  // Only re-add non-partition-aware tasks if the master has
  // failed over since the agent was marked unreachable.
  tasks_.push_back(task);
}
  }
```


- Vinod Kone


On Jan. 18, 2017, 7:33 p.m., Neil Conway wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/54232/
> ---
> 
> (Updated Jan. 18, 2017, 7:33 p.m.)
> 
> 
> Review request for mesos and Vinod Kone.
> 
> 
> Bugs: MESOS-6602
> https://issues.apache.org/jira/browse/MESOS-6602
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Previously, if a framework completed (e.g., due to a teardown operation
> or framework shutdown), any framework tasks running on partitioned
> agents would not be shutdown when the agent re-registered. For tasks
> that are not partition-aware, the task would be shutdown on agent
> re-registration anyway. But for partition-aware tasks, this could lead
> to orphan tasks.
> 
> Fix this by changing the master to shutdown such tasks when the agent
> reregisters.
> 
> Note that if the master fails over between the time the framework
> completes and a partitioned agent re-registers, any framework tasks
> running on the agent will NOT be shutdown. This is a known bug; fixing
> it requires persisting the framework shutdown operation to the registry
> (MESOS-1719).
> 
> 
> Diffs
> -
> 
>   src/master/master.cpp 73159328ce3fd838e02eba0e6a30cf69efc319ba 
>   src/tests/partition_tests.cpp 72013d1bfee275c6f3cb90173f0c408d55e0bc5d 
> 
> Diff: https://reviews.apache.org/r/54232/diff/
> 
> 
> Testing
> ---
> 
> `make check`
> 
> 
> Thanks,
> 
> Neil Conway
> 
>



Re: Review Request 54232: Shutdown tasks of completed frameworks on agent re-registration.

2017-01-18 Thread Neil Conway

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

(Updated Jan. 18, 2017, 7:33 p.m.)


Review request for mesos and Vinod Kone.


Changes
---

Remove helper function.


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


Repository: mesos


Description
---

Previously, if a framework completed (e.g., due to a teardown operation
or framework shutdown), any framework tasks running on partitioned
agents would not be shutdown when the agent re-registered. For tasks
that are not partition-aware, the task would be shutdown on agent
re-registration anyway. But for partition-aware tasks, this could lead
to orphan tasks.

Fix this by changing the master to shutdown such tasks when the agent
reregisters.

Note that if the master fails over between the time the framework
completes and a partitioned agent re-registers, any framework tasks
running on the agent will NOT be shutdown. This is a known bug; fixing
it requires persisting the framework shutdown operation to the registry
(MESOS-1719).


Diffs (updated)
-

  src/master/master.cpp 73159328ce3fd838e02eba0e6a30cf69efc319ba 
  src/tests/partition_tests.cpp 72013d1bfee275c6f3cb90173f0c408d55e0bc5d 

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


Testing
---

`make check`


Thanks,

Neil Conway



Re: Review Request 54232: Shutdown tasks of completed frameworks on agent re-registration.

2017-01-17 Thread Neil Conway

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

(Updated Jan. 17, 2017, 6:37 p.m.)


Review request for mesos and Vinod Kone.


Changes
---

Improve comments.


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


Repository: mesos


Description
---

Previously, if a framework completed (e.g., due to a teardown operation
or framework shutdown), any framework tasks running on partitioned
agents would not be shutdown when the agent re-registered. For tasks
that are not partition-aware, the task would be shutdown on agent
re-registration anyway. But for partition-aware tasks, this could lead
to orphan tasks.

Fix this by changing the master to shutdown such tasks when the agent
reregisters.

Note that if the master fails over between the time the framework
completes and a partitioned agent re-registers, any framework tasks
running on the agent will NOT be shutdown. This is a known bug; fixing
it requires persisting the framework shutdown operation to the registry
(MESOS-1719).


Diffs (updated)
-

  src/master/master.hpp 44f4fecb1fbe8bebf830990a59a5462338e6e004 
  src/master/master.cpp b863ff6e93931c3d1ee056248084c7f44caf2fd9 
  src/tests/partition_tests.cpp 72013d1bfee275c6f3cb90173f0c408d55e0bc5d 

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


Testing
---

`make check`


Thanks,

Neil Conway



Re: Review Request 54232: Shutdown tasks of completed frameworks on agent re-registration.

2017-01-12 Thread Neil Conway

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

(Updated Jan. 12, 2017, 10:55 p.m.)


Review request for mesos and Vinod Kone.


Changes
---

Use a single loop, per review comments.


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


Repository: mesos


Description
---

Previously, if a framework completed (e.g., due to a teardown operation
or framework shutdown), any framework tasks running on partitioned
agents would not be shutdown when the agent re-registered. For tasks
that are not partition-aware, the task would be shutdown on agent
re-registration anyway. But for partition-aware tasks, this could lead
to orphan tasks.

Fix this by changing the master to shutdown such tasks when the agent
reregisters.

Note that if the master fails over between the time the framework
completes and a partitioned agent re-registers, any framework tasks
running on the agent will NOT be shutdown. This is a known bug; fixing
it requires persisting the framework shutdown operation to the registry
(MESOS-1719).


Diffs (updated)
-

  src/master/master.hpp 368ee1d5e97784fa54e0f141906405ee8f104317 
  src/master/master.cpp 1746a88953dbdc148d98881bcf7027b62ad6b040 
  src/tests/partition_tests.cpp 72013d1bfee275c6f3cb90173f0c408d55e0bc5d 

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


Testing
---

`make check`


Thanks,

Neil Conway



Re: Review Request 54232: Shutdown tasks of completed frameworks on agent re-registration.

2017-01-10 Thread Vinod Kone

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




src/master/master.cpp (lines 5689 - 5728)


can you do one pass over framworks to decide whether to shutdown them or 
not? an added benefit is that, you won't end up sending shutdown twice (e.g., 
for non-partition aware completed frameworks).


- Vinod Kone


On Jan. 10, 2017, 10:32 p.m., Neil Conway wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/54232/
> ---
> 
> (Updated Jan. 10, 2017, 10:32 p.m.)
> 
> 
> Review request for mesos and Vinod Kone.
> 
> 
> Bugs: MESOS-6602
> https://issues.apache.org/jira/browse/MESOS-6602
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Previously, if a framework completed (e.g., due to a teardown operation
> or framework shutdown), any framework tasks running on partitioned
> agents would not be shutdown when the agent re-registered. For tasks
> that are not partition-aware, the task would be shutdown on agent
> re-registration anyway. But for partition-aware tasks, this could lead
> to orphan tasks.
> 
> Fix this by changing the master to shutdown such tasks when the agent
> reregisters.
> 
> Note that if the master fails over between the time the framework
> completes and a partitioned agent re-registers, any framework tasks
> running on the agent will NOT be shutdown. This is a known bug; fixing
> it requires persisting the framework shutdown operation to the registry
> (MESOS-1719).
> 
> 
> Diffs
> -
> 
>   src/master/master.hpp 368ee1d5e97784fa54e0f141906405ee8f104317 
>   src/master/master.cpp 1746a88953dbdc148d98881bcf7027b62ad6b040 
>   src/tests/partition_tests.cpp 72013d1bfee275c6f3cb90173f0c408d55e0bc5d 
> 
> Diff: https://reviews.apache.org/r/54232/diff/
> 
> 
> Testing
> ---
> 
> `make check`
> 
> 
> Thanks,
> 
> Neil Conway
> 
>



Re: Review Request 54232: Shutdown tasks of completed frameworks on agent re-registration.

2017-01-10 Thread Vinod Kone


> On Jan. 3, 2017, 10:51 p.m., Vinod Kone wrote:
> > src/master/master.cpp, line 5512
> > 
> >
> > inline this?
> 
> Neil Conway wrote:
> To me, using a separate function was more readable than writing the logic 
> inline. Happy to change it if you disagree, though.

see my comment on the dependent review for my reasoning.


- Vinod


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


On Jan. 10, 2017, 10:32 p.m., Neil Conway wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/54232/
> ---
> 
> (Updated Jan. 10, 2017, 10:32 p.m.)
> 
> 
> Review request for mesos and Vinod Kone.
> 
> 
> Bugs: MESOS-6602
> https://issues.apache.org/jira/browse/MESOS-6602
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Previously, if a framework completed (e.g., due to a teardown operation
> or framework shutdown), any framework tasks running on partitioned
> agents would not be shutdown when the agent re-registered. For tasks
> that are not partition-aware, the task would be shutdown on agent
> re-registration anyway. But for partition-aware tasks, this could lead
> to orphan tasks.
> 
> Fix this by changing the master to shutdown such tasks when the agent
> reregisters.
> 
> Note that if the master fails over between the time the framework
> completes and a partitioned agent re-registers, any framework tasks
> running on the agent will NOT be shutdown. This is a known bug; fixing
> it requires persisting the framework shutdown operation to the registry
> (MESOS-1719).
> 
> 
> Diffs
> -
> 
>   src/master/master.hpp 368ee1d5e97784fa54e0f141906405ee8f104317 
>   src/master/master.cpp 1746a88953dbdc148d98881bcf7027b62ad6b040 
>   src/tests/partition_tests.cpp 72013d1bfee275c6f3cb90173f0c408d55e0bc5d 
> 
> Diff: https://reviews.apache.org/r/54232/diff/
> 
> 
> Testing
> ---
> 
> `make check`
> 
> 
> Thanks,
> 
> Neil Conway
> 
>



Re: Review Request 54232: Shutdown tasks of completed frameworks on agent re-registration.

2017-01-10 Thread Neil Conway


> On Jan. 3, 2017, 10:51 p.m., Vinod Kone wrote:
> > src/master/master.cpp, line 5512
> > 
> >
> > inline this?

To me, using a separate function was more readable than writing the logic 
inline. Happy to change it if you disagree, though.


- Neil


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


On Jan. 10, 2017, 10:32 p.m., Neil Conway wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/54232/
> ---
> 
> (Updated Jan. 10, 2017, 10:32 p.m.)
> 
> 
> Review request for mesos and Vinod Kone.
> 
> 
> Bugs: MESOS-6602
> https://issues.apache.org/jira/browse/MESOS-6602
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Previously, if a framework completed (e.g., due to a teardown operation
> or framework shutdown), any framework tasks running on partitioned
> agents would not be shutdown when the agent re-registered. For tasks
> that are not partition-aware, the task would be shutdown on agent
> re-registration anyway. But for partition-aware tasks, this could lead
> to orphan tasks.
> 
> Fix this by changing the master to shutdown such tasks when the agent
> reregisters.
> 
> Note that if the master fails over between the time the framework
> completes and a partitioned agent re-registers, any framework tasks
> running on the agent will NOT be shutdown. This is a known bug; fixing
> it requires persisting the framework shutdown operation to the registry
> (MESOS-1719).
> 
> 
> Diffs
> -
> 
>   src/master/master.hpp 368ee1d5e97784fa54e0f141906405ee8f104317 
>   src/master/master.cpp 1746a88953dbdc148d98881bcf7027b62ad6b040 
>   src/tests/partition_tests.cpp 72013d1bfee275c6f3cb90173f0c408d55e0bc5d 
> 
> Diff: https://reviews.apache.org/r/54232/diff/
> 
> 
> Testing
> ---
> 
> `make check`
> 
> 
> Thanks,
> 
> Neil Conway
> 
>



Re: Review Request 54232: Shutdown tasks of completed frameworks on agent re-registration.

2017-01-10 Thread Neil Conway

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

(Updated Jan. 10, 2017, 10:32 p.m.)


Review request for mesos and Vinod Kone.


Changes
---

Mark unreachable tasks as completed in `removeFramework`.


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


Repository: mesos


Description
---

Previously, if a framework completed (e.g., due to a teardown operation
or framework shutdown), any framework tasks running on partitioned
agents would not be shutdown when the agent re-registered. For tasks
that are not partition-aware, the task would be shutdown on agent
re-registration anyway. But for partition-aware tasks, this could lead
to orphan tasks.

Fix this by changing the master to shutdown such tasks when the agent
reregisters.

Note that if the master fails over between the time the framework
completes and a partitioned agent re-registers, any framework tasks
running on the agent will NOT be shutdown. This is a known bug; fixing
it requires persisting the framework shutdown operation to the registry
(MESOS-1719).


Diffs (updated)
-

  src/master/master.hpp 368ee1d5e97784fa54e0f141906405ee8f104317 
  src/master/master.cpp 1746a88953dbdc148d98881bcf7027b62ad6b040 
  src/tests/partition_tests.cpp 72013d1bfee275c6f3cb90173f0c408d55e0bc5d 

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


Testing
---

`make check`


Thanks,

Neil Conway



Re: Review Request 54232: Shutdown tasks of completed frameworks on agent re-registration.

2017-01-09 Thread Neil Conway

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

(Updated Jan. 10, 2017, 2:29 a.m.)


Review request for mesos and Vinod Kone.


Changes
---

Improve test case.


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


Repository: mesos


Description
---

Previously, if a framework completed (e.g., due to a teardown operation
or framework shutdown), any framework tasks running on partitioned
agents would not be shutdown when the agent re-registered. For tasks
that are not partition-aware, the task would be shutdown on agent
re-registration anyway. But for partition-aware tasks, this could lead
to orphan tasks.

Fix this by changing the master to shutdown such tasks when the agent
reregisters.

Note that if the master fails over between the time the framework
completes and a partitioned agent re-registers, any framework tasks
running on the agent will NOT be shutdown. This is a known bug; fixing
it requires persisting the framework shutdown operation to the registry
(MESOS-1719).


Diffs (updated)
-

  src/master/master.hpp 368ee1d5e97784fa54e0f141906405ee8f104317 
  src/master/master.cpp 39d203b0ef820a78c6871177e02c5051fd23ec70 
  src/tests/partition_tests.cpp 72013d1bfee275c6f3cb90173f0c408d55e0bc5d 

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


Testing
---

`make check`


Thanks,

Neil Conway



Re: Review Request 54232: Shutdown tasks of completed frameworks on agent re-registration.

2017-01-03 Thread Vinod Kone

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




src/master/master.cpp (line 5512)


inline this?



src/tests/partition_tests.cpp (lines 1130 - 1133)


I agree. Lets move unreachable tasks to completed as well in 
`removeFramework` to avoid confusion. We can change the behavior for PA and 
non-PA together at a later time if necessary.


- Vinod Kone


On Dec. 2, 2016, 12:25 a.m., Neil Conway wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/54232/
> ---
> 
> (Updated Dec. 2, 2016, 12:25 a.m.)
> 
> 
> Review request for mesos and Vinod Kone.
> 
> 
> Bugs: MESOS-6602
> https://issues.apache.org/jira/browse/MESOS-6602
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Previously, if a framework completed (e.g., due to a teardown operation
> or framework shutdown), any framework tasks running on partitioned
> agents would not be shutdown when the agent re-registered. For tasks
> that are not partition-aware, the task would be shutdown on agent
> re-registration anyway. But for partition-aware tasks, this could lead
> to orphan tasks.
> 
> Fix this by changing the master to shutdown such tasks when the agent
> reregisters.
> 
> Note that if the master fails over between the time the framework
> completes and a partitioned agent re-registers, any framework tasks
> running on the agent will NOT be shutdown. This is a known bug; fixing
> it requires persisting the framework shutdown operation to the registry
> (MESOS-1719).
> 
> 
> Diffs
> -
> 
>   src/master/master.hpp 877ca9010d0d6efc97f3d71fbd27272a255409d0 
>   src/master/master.cpp e03a2e8025943825a2902102c43dc0eb66bacb6a 
>   src/tests/partition_tests.cpp 5a0d4bd2de6a5aa0e9fdf0d34cd10d16fd4e34a1 
> 
> Diff: https://reviews.apache.org/r/54232/diff/
> 
> 
> Testing
> ---
> 
> `make check`
> 
> 
> Thanks,
> 
> Neil Conway
> 
>



Re: Review Request 54232: Shutdown tasks of completed frameworks on agent re-registration.

2016-12-01 Thread Mesos ReviewBot

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



Patch looks great!

Reviews applied: [53885, 53886, 53887, 53888, 53889, 53890, 53891, 53892, 
53893, 53894, 53895, 53896, 53897, 54177, 54178, 54179, 54180, 54181, 54182, 
54183, 54232]

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 Dec. 2, 2016, 12:25 a.m., Neil Conway wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/54232/
> ---
> 
> (Updated Dec. 2, 2016, 12:25 a.m.)
> 
> 
> Review request for mesos and Vinod Kone.
> 
> 
> Bugs: MESOS-6602
> https://issues.apache.org/jira/browse/MESOS-6602
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Previously, if a framework completed (e.g., due to a teardown operation
> or framework shutdown), any framework tasks running on partitioned
> agents would not be shutdown when the agent re-registered. For tasks
> that are not partition-aware, the task would be shutdown on agent
> re-registration anyway. But for partition-aware tasks, this could lead
> to orphan tasks.
> 
> Fix this by changing the master to shutdown such tasks when the agent
> reregisters.
> 
> Note that if the master fails over between the time the framework
> completes and a partitioned agent re-registers, any framework tasks
> running on the agent will NOT be shutdown. This is a known bug; fixing
> it requires persisting the framework shutdown operation to the registry
> (MESOS-1719).
> 
> 
> Diffs
> -
> 
>   src/master/master.hpp 877ca9010d0d6efc97f3d71fbd27272a255409d0 
>   src/master/master.cpp e03a2e8025943825a2902102c43dc0eb66bacb6a 
>   src/tests/partition_tests.cpp 5a0d4bd2de6a5aa0e9fdf0d34cd10d16fd4e34a1 
> 
> Diff: https://reviews.apache.org/r/54232/diff/
> 
> 
> Testing
> ---
> 
> `make check`
> 
> 
> Thanks,
> 
> Neil Conway
> 
>



Re: Review Request 54232: Shutdown tasks of completed frameworks on agent re-registration.

2016-12-01 Thread Neil Conway

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

(Updated Dec. 2, 2016, 12:25 a.m.)


Review request for mesos and Vinod Kone.


Changes
---

Update test case.


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


Repository: mesos


Description
---

Previously, if a framework completed (e.g., due to a teardown operation
or framework shutdown), any framework tasks running on partitioned
agents would not be shutdown when the agent re-registered. For tasks
that are not partition-aware, the task would be shutdown on agent
re-registration anyway. But for partition-aware tasks, this could lead
to orphan tasks.

Fix this by changing the master to shutdown such tasks when the agent
reregisters.

Note that if the master fails over between the time the framework
completes and a partitioned agent re-registers, any framework tasks
running on the agent will NOT be shutdown. This is a known bug; fixing
it requires persisting the framework shutdown operation to the registry
(MESOS-1719).


Diffs (updated)
-

  src/master/master.hpp 877ca9010d0d6efc97f3d71fbd27272a255409d0 
  src/master/master.cpp e03a2e8025943825a2902102c43dc0eb66bacb6a 
  src/tests/partition_tests.cpp 5a0d4bd2de6a5aa0e9fdf0d34cd10d16fd4e34a1 

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


Testing
---

`make check`


Thanks,

Neil Conway



Re: Review Request 54232: Shutdown tasks of completed frameworks on agent re-registration.

2016-11-30 Thread Mesos ReviewBot

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



Patch looks great!

Reviews applied: [53885, 53886, 53887, 53888, 53889, 53890, 53891, 53892, 
53893, 53894, 53895, 53896, 53897, 54177, 54178, 54179, 54180, 54181, 54182, 
54183, 54232]

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 Nov. 30, 2016, 10:25 p.m., Neil Conway wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/54232/
> ---
> 
> (Updated Nov. 30, 2016, 10:25 p.m.)
> 
> 
> Review request for mesos and Vinod Kone.
> 
> 
> Bugs: MESOS-6602
> https://issues.apache.org/jira/browse/MESOS-6602
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Previously, if a framework completed (e.g., due to a teardown operation
> or framework shutdown), any framework tasks running on partitioned
> agents would not be shutdown when the agent re-registered. For tasks
> that are not partition-aware, the task would be shutdown on agent
> re-registration anyway. But for partition-aware tasks, this could lead
> to orphan tasks.
> 
> Fix this by changing the master to shutdown such tasks when the agent
> reregisters.
> 
> Note that if the master fails over between the time the framework
> completes and a partitioned agent re-registers, any framework tasks
> running on the agent will NOT be shutdown. This is a known bug; fixing
> it requires persisting the framework shutdown operation to the registry
> (MESOS-1719).
> 
> 
> Diffs
> -
> 
>   src/master/master.hpp 877ca9010d0d6efc97f3d71fbd27272a255409d0 
>   src/master/master.cpp e03a2e8025943825a2902102c43dc0eb66bacb6a 
>   src/tests/partition_tests.cpp 5a0d4bd2de6a5aa0e9fdf0d34cd10d16fd4e34a1 
> 
> Diff: https://reviews.apache.org/r/54232/diff/
> 
> 
> Testing
> ---
> 
> `make check`
> 
> 
> Thanks,
> 
> Neil Conway
> 
>



Review Request 54232: Shutdown tasks of completed frameworks on agent re-registration.

2016-11-30 Thread Neil Conway

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

Review request for mesos and Vinod Kone.


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


Repository: mesos


Description
---

Previously, if a framework completed (e.g., due to a teardown operation
or framework shutdown), any framework tasks running on partitioned
agents would not be shutdown when the agent re-registered. For tasks
that are not partition-aware, the task would be shutdown on agent
re-registration anyway. But for partition-aware tasks, this could lead
to orphan tasks.

Fix this by changing the master to shutdown such tasks when the agent
reregisters.

Note that if the master fails over between the time the framework
completes and a partitioned agent re-registers, any framework tasks
running on the agent will NOT be shutdown. This is a known bug; fixing
it requires persisting the framework shutdown operation to the registry
(MESOS-1719).


Diffs
-

  src/master/master.hpp 877ca9010d0d6efc97f3d71fbd27272a255409d0 
  src/master/master.cpp e03a2e8025943825a2902102c43dc0eb66bacb6a 
  src/tests/partition_tests.cpp 5a0d4bd2de6a5aa0e9fdf0d34cd10d16fd4e34a1 

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


Testing
---

`make check`


Thanks,

Neil Conway