Re: Review Request 45008: Moved command scheduler to use the scheduler library.

2016-03-29 Thread Vinod Kone


> On March 18, 2016, 5:34 a.m., Guangya Liu wrote:
> > src/cli/execute.cpp, line 456
> > 
> >
> > Can you please add some comments here for why `devolve`here?
> > 
> > Do we have plan to update all `status` use V1?

I think Anand did it because mesos::internal::protobuf::isTerminalState() takes 
a v0 state.


- Vinod


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


On March 28, 2016, 10:32 p.m., Anand Mazumdar wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45008/
> ---
> 
> (Updated March 28, 2016, 10:32 p.m.)
> 
> 
> Review request for mesos, Guangya Liu and Vinod Kone.
> 
> 
> Bugs: MESOS-3559
> https://issues.apache.org/jira/browse/MESOS-3559
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> This change moves the command scheduler (`mesos-execute`) to use
> the scheduler library instead of the driver.
> 
> 
> Diffs
> -
> 
>   src/cli/execute.cpp ed42cb568f3d16856f48b3bbd354cb2b0fb83e8e 
> 
> Diff: https://reviews.apache.org/r/45008/diff/
> 
> 
> Testing
> ---
> 
> make check, an example run:
> 
> ```
> build git:(mesos-3559) : ./src/mesos-execute --command="sleep 1" 
> --master=127.0.1.1:5050 --name=task1
> I0317 19:04:43.974733 21678 scheduler.cpp:172] Version: 0.29.0
> Subscribed with ID '7decbfe9-8b46-48f5-8573-0a5a3e465a1f-0001
> task task1 submitted to agent 5a54dc00-7fd8-477f-a666-1b1ab86a0033-S0
> Received status update TASK_RUNNING for task task1
> Received status update TASK_FINISHED for task task1
> E0317 19:04:45.148203 21680 scheduler.cpp:585] End-Of-File received from 
> master. The master closed the event stream
> 
> build git:(mesos-3559) : echo $?
> 0
> ```
> 
> 
> Thanks,
> 
> Anand Mazumdar
> 
>



Re: Review Request 45008: Moved command scheduler to use the scheduler library.

2016-03-29 Thread Vinod Kone

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


Ship it!




Ship It!

- Vinod Kone


On March 28, 2016, 10:32 p.m., Anand Mazumdar wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45008/
> ---
> 
> (Updated March 28, 2016, 10:32 p.m.)
> 
> 
> Review request for mesos, Guangya Liu and Vinod Kone.
> 
> 
> Bugs: MESOS-3559
> https://issues.apache.org/jira/browse/MESOS-3559
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> This change moves the command scheduler (`mesos-execute`) to use
> the scheduler library instead of the driver.
> 
> 
> Diffs
> -
> 
>   src/cli/execute.cpp ed42cb568f3d16856f48b3bbd354cb2b0fb83e8e 
> 
> Diff: https://reviews.apache.org/r/45008/diff/
> 
> 
> Testing
> ---
> 
> make check, an example run:
> 
> ```
> build git:(mesos-3559) : ./src/mesos-execute --command="sleep 1" 
> --master=127.0.1.1:5050 --name=task1
> I0317 19:04:43.974733 21678 scheduler.cpp:172] Version: 0.29.0
> Subscribed with ID '7decbfe9-8b46-48f5-8573-0a5a3e465a1f-0001
> task task1 submitted to agent 5a54dc00-7fd8-477f-a666-1b1ab86a0033-S0
> Received status update TASK_RUNNING for task task1
> Received status update TASK_FINISHED for task task1
> E0317 19:04:45.148203 21680 scheduler.cpp:585] End-Of-File received from 
> master. The master closed the event stream
> 
> build git:(mesos-3559) : echo $?
> 0
> ```
> 
> 
> Thanks,
> 
> Anand Mazumdar
> 
>



Re: Review Request 45008: Moved command scheduler to use the scheduler library.

2016-03-28 Thread Anand Mazumdar


> On March 28, 2016, 9:39 p.m., Vinod Kone wrote:
> > src/cli/execute.cpp, lines 245-266
> > 
> >
> > The semantics of stop() are a bit hard to intuit.
> > 
> > How about we have two methods 
> >  - `error()` that handles error cases (logs error and exits)
> >  - `stop()` that exits cleanly by calling terminate
> >  - 
> > 
> > Also not sure if TEARDOWN call is strictly necessary? Master is going 
> > to clean it up anyway once the socket breaks?

Thanks for the suggestion.

As per our offline discussion, removed `stop()` completely.


> On March 28, 2016, 9:39 p.m., Vinod Kone wrote:
> > src/cli/execute.cpp, line 418
> > 
> >
> > I think it's probably worth logging the FAILURE event.

The previous version did not use to log anything upon an executor/agent 
failure. https://github.com/apache/mesos/blob/master/src/cli/execute.cpp#L301

That said, I am happy to add it in a subsequent review if you feel strongly 
about it. I am dropping this for now. Feel free to reopen.


- Anand


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


On March 18, 2016, 3:27 a.m., Anand Mazumdar wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45008/
> ---
> 
> (Updated March 18, 2016, 3:27 a.m.)
> 
> 
> Review request for mesos, Guangya Liu and Vinod Kone.
> 
> 
> Bugs: MESOS-3559
> https://issues.apache.org/jira/browse/MESOS-3559
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> This change moves the command scheduler (`mesos-execute`) to use
> the scheduler library instead of the driver.
> 
> 
> Diffs
> -
> 
>   src/cli/execute.cpp ed42cb568f3d16856f48b3bbd354cb2b0fb83e8e 
> 
> Diff: https://reviews.apache.org/r/45008/diff/
> 
> 
> Testing
> ---
> 
> make check, an example run:
> 
> ```
> build git:(mesos-3559) : ./src/mesos-execute --command="sleep 1" 
> --master=127.0.1.1:5050 --name=task1
> I0317 19:04:43.974733 21678 scheduler.cpp:172] Version: 0.29.0
> Subscribed with ID '7decbfe9-8b46-48f5-8573-0a5a3e465a1f-0001
> task task1 submitted to agent 5a54dc00-7fd8-477f-a666-1b1ab86a0033-S0
> Received status update TASK_RUNNING for task task1
> Received status update TASK_FINISHED for task task1
> E0317 19:04:45.148203 21680 scheduler.cpp:585] End-Of-File received from 
> master. The master closed the event stream
> 
> build git:(mesos-3559) : echo $?
> 0
> ```
> 
> 
> Thanks,
> 
> Anand Mazumdar
> 
>



Re: Review Request 45008: Moved command scheduler to use the scheduler library.

2016-03-28 Thread Anand Mazumdar

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

(Updated March 28, 2016, 10:32 p.m.)


Review request for mesos, Guangya Liu and Vinod Kone.


Changes
---

Review comments from Vinod


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


Repository: mesos


Description
---

This change moves the command scheduler (`mesos-execute`) to use
the scheduler library instead of the driver.


Diffs (updated)
-

  src/cli/execute.cpp ed42cb568f3d16856f48b3bbd354cb2b0fb83e8e 

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


Testing
---

make check, an example run:

```
build git:(mesos-3559) : ./src/mesos-execute --command="sleep 1" 
--master=127.0.1.1:5050 --name=task1
I0317 19:04:43.974733 21678 scheduler.cpp:172] Version: 0.29.0
Subscribed with ID '7decbfe9-8b46-48f5-8573-0a5a3e465a1f-0001
task task1 submitted to agent 5a54dc00-7fd8-477f-a666-1b1ab86a0033-S0
Received status update TASK_RUNNING for task task1
Received status update TASK_FINISHED for task task1
E0317 19:04:45.148203 21680 scheduler.cpp:585] End-Of-File received from 
master. The master closed the event stream

build git:(mesos-3559) : echo $?
0
```


Thanks,

Anand Mazumdar



Re: Review Request 45008: Moved command scheduler to use the scheduler library.

2016-03-28 Thread Vinod Kone

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




src/cli/execute.cpp (lines 45 - 47)


reorder?



src/cli/execute.cpp (lines 242 - 263)


The semantics of stop() are a bit hard to intuit.

How about we have two methods 
 - `error()` that handles error cases (logs error and exits)
 - `stop()` that exits cleanly by calling terminate
 - 

Also not sure if TEARDOWN call is strictly necessary? Master is going to 
clean it up anyway once the socket breaks?



src/cli/execute.cpp (line 412)


I think it's probably worth logging the FAILURE event.


- Vinod Kone


On March 18, 2016, 3:27 a.m., Anand Mazumdar wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45008/
> ---
> 
> (Updated March 18, 2016, 3:27 a.m.)
> 
> 
> Review request for mesos, Guangya Liu and Vinod Kone.
> 
> 
> Bugs: MESOS-3559
> https://issues.apache.org/jira/browse/MESOS-3559
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> This change moves the command scheduler (`mesos-execute`) to use
> the scheduler library instead of the driver.
> 
> 
> Diffs
> -
> 
>   src/cli/execute.cpp ed42cb568f3d16856f48b3bbd354cb2b0fb83e8e 
> 
> Diff: https://reviews.apache.org/r/45008/diff/
> 
> 
> Testing
> ---
> 
> make check, an example run:
> 
> ```
> build git:(mesos-3559) : ./src/mesos-execute --command="sleep 1" 
> --master=127.0.1.1:5050 --name=task1
> I0317 19:04:43.974733 21678 scheduler.cpp:172] Version: 0.29.0
> Subscribed with ID '7decbfe9-8b46-48f5-8573-0a5a3e465a1f-0001
> task task1 submitted to agent 5a54dc00-7fd8-477f-a666-1b1ab86a0033-S0
> Received status update TASK_RUNNING for task task1
> Received status update TASK_FINISHED for task task1
> E0317 19:04:45.148203 21680 scheduler.cpp:585] End-Of-File received from 
> master. The master closed the event stream
> 
> build git:(mesos-3559) : echo $?
> 0
> ```
> 
> 
> Thanks,
> 
> Anand Mazumdar
> 
>



Re: Review Request 45008: Moved command scheduler to use the scheduler library.

2016-03-19 Thread Guangya Liu

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




src/cli/execute.cpp (line 448)


Can you please add some comments here for why `devolve`here?

Do we have plan to update all `status` use V1?


- Guangya Liu


On 三月 18, 2016, 3:27 a.m., Anand Mazumdar wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45008/
> ---
> 
> (Updated 三月 18, 2016, 3:27 a.m.)
> 
> 
> Review request for mesos, Guangya Liu and Vinod Kone.
> 
> 
> Bugs: MESOS-3559
> https://issues.apache.org/jira/browse/MESOS-3559
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> This change moves the command scheduler (`mesos-execute`) to use
> the scheduler library instead of the driver.
> 
> 
> Diffs
> -
> 
>   src/cli/execute.cpp ed42cb568f3d16856f48b3bbd354cb2b0fb83e8e 
> 
> Diff: https://reviews.apache.org/r/45008/diff/
> 
> 
> Testing
> ---
> 
> make check, an example run:
> 
> ```
> build git:(mesos-3559) : ./src/mesos-execute --command="sleep 1" 
> --master=127.0.1.1:5050 --name=task1
> I0317 19:04:43.974733 21678 scheduler.cpp:172] Version: 0.29.0
> Subscribed with ID '7decbfe9-8b46-48f5-8573-0a5a3e465a1f-0001
> task task1 submitted to agent 5a54dc00-7fd8-477f-a666-1b1ab86a0033-S0
> Received status update TASK_RUNNING for task task1
> Received status update TASK_FINISHED for task task1
> E0317 19:04:45.148203 21680 scheduler.cpp:585] End-Of-File received from 
> master. The master closed the event stream
> 
> build git:(mesos-3559) : echo $?
> 0
> ```
> 
> 
> Thanks,
> 
> Anand Mazumdar
> 
>