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 <ma...@gmail.com> on 2015/09/30 05:39:45 UTC

Review Request 38875: Moved the framework/executor exists check before Subscribe call in Agent

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

Review request for mesos, Ben Mahler, Isabel Jimenez, and Vinod Kone.


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


Repository: mesos


Description
-------

Refactored the `api/v1/executor` endpoint to do executor/framework exists(`NULL`) checks before `Subscribe` since the slave explicitly knows the `frameworkID/executorID` when it launches it. Also modified tests to first spawn a dummy `cat` process and then make a `Subscribe` call to ensure that the Agent knows about the Framework/Executor and not reject it via `BadRequest` due to the `NULL` checks.


Diffs
-----

  src/slave/http.cpp f9cf7bbe81b7fe9637de9a8d66329c16a7e1a89b 
  src/tests/executor_http_api_tests.cpp 31938c295367686d444f8a8aa2c43d2696b481ec 

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


Testing
-------

make check


Thanks,

Anand Mazumdar


Re: Review Request 38875: Moved the framework/executor exists check before Subscribe call in Agent

Posted by Anand Mazumdar <ma...@gmail.com>.

> On Sept. 30, 2015, 5 a.m., Guangya Liu wrote:
> > src/slave/http.cpp, line 304
> > <https://reviews.apache.org/r/38875/diff/1/?file=1087515#file1087515line304>
> >
> >     Can you please add some comments for when this if condition will be hit? I see that the scheduler API is not handling such logic.

It should be : https://github.com/apache/mesos/blob/master/src/master/http.cpp#L465

The only difference here being that we also need to explicitly check for the state to be `REGISTERING` as the agent creates an executor object when it receives a `RunTaskMessage` from the master


- Anand


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


On Sept. 30, 2015, 3:39 a.m., Anand Mazumdar wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/38875/
> -----------------------------------------------------------
> 
> (Updated Sept. 30, 2015, 3:39 a.m.)
> 
> 
> Review request for mesos, Ben Mahler, Isabel Jimenez, and Vinod Kone.
> 
> 
> Bugs: MESOS-3515
>     https://issues.apache.org/jira/browse/MESOS-3515
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Refactored the `api/v1/executor` endpoint to do executor/framework exists(`NULL`) checks before `Subscribe` since the slave explicitly knows the `frameworkID/executorID` when it launches it. Also modified tests to first spawn a dummy `cat` process and then make a `Subscribe` call to ensure that the Agent knows about the Framework/Executor and not reject it via `BadRequest` due to the `NULL` checks.
> 
> 
> Diffs
> -----
> 
>   src/slave/http.cpp f9cf7bbe81b7fe9637de9a8d66329c16a7e1a89b 
>   src/tests/executor_http_api_tests.cpp 31938c295367686d444f8a8aa2c43d2696b481ec 
> 
> Diff: https://reviews.apache.org/r/38875/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Anand Mazumdar
> 
>


Re: Review Request 38875: Moved the framework/executor exists check before Subscribe call in Agent

Posted by Guangya Liu <gy...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/38875/#review101074
-----------------------------------------------------------



src/slave/http.cpp (line 292)
<https://reviews.apache.org/r/38875/#comment158388>

    Can you please add some comments for when this if condition will be hit? I see that the scheduler API is not handling such logic.


- Guangya Liu


On 九月 30, 2015, 3:39 a.m., Anand Mazumdar wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/38875/
> -----------------------------------------------------------
> 
> (Updated 九月 30, 2015, 3:39 a.m.)
> 
> 
> Review request for mesos, Ben Mahler, Isabel Jimenez, and Vinod Kone.
> 
> 
> Bugs: MESOS-3515
>     https://issues.apache.org/jira/browse/MESOS-3515
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Refactored the `api/v1/executor` endpoint to do executor/framework exists(`NULL`) checks before `Subscribe` since the slave explicitly knows the `frameworkID/executorID` when it launches it. Also modified tests to first spawn a dummy `cat` process and then make a `Subscribe` call to ensure that the Agent knows about the Framework/Executor and not reject it via `BadRequest` due to the `NULL` checks.
> 
> 
> Diffs
> -----
> 
>   src/slave/http.cpp f9cf7bbe81b7fe9637de9a8d66329c16a7e1a89b 
>   src/tests/executor_http_api_tests.cpp 31938c295367686d444f8a8aa2c43d2696b481ec 
> 
> Diff: https://reviews.apache.org/r/38875/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Anand Mazumdar
> 
>


Re: Review Request 38875: Moved the framework/executor exists check before Subscribe call in Agent

Posted by Ben Mahler <be...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/38875/#review103959
-----------------------------------------------------------

Ship it!


Ship It!

- Ben Mahler


On Oct. 24, 2015, 6:43 p.m., Anand Mazumdar wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/38875/
> -----------------------------------------------------------
> 
> (Updated Oct. 24, 2015, 6:43 p.m.)
> 
> 
> Review request for mesos, Ben Mahler, Isabel Jimenez, and Vinod Kone.
> 
> 
> Bugs: MESOS-3515
>     https://issues.apache.org/jira/browse/MESOS-3515
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Refactored the `api/v1/executor` endpoint to do executor/framework exists(`NULL`) checks before `Subscribe` since the slave explicitly knows the `frameworkID/executorID` when it launches it. Also modified tests to first spawn a dummy `cat` process and then make a `Subscribe` call to ensure that the Agent knows about the Framework/Executor and not reject it via `BadRequest` due to the `NULL` checks.
> 
> 
> Diffs
> -----
> 
>   src/slave/http.cpp 80bda34e2b344b96d5d2f9c1fecd36046f67ab49 
>   src/tests/executor_http_api_tests.cpp 31938c295367686d444f8a8aa2c43d2696b481ec 
> 
> Diff: https://reviews.apache.org/r/38875/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Anand Mazumdar
> 
>


Re: Review Request 38875: Moved the framework/executor exists check before Subscribe call in Agent

Posted by Anand Mazumdar <ma...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/38875/
-----------------------------------------------------------

(Updated Oct. 24, 2015, 6:43 p.m.)


Review request for mesos, Ben Mahler, Isabel Jimenez, and Vinod Kone.


Changes
-------

Review comments


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


Repository: mesos


Description
-------

Refactored the `api/v1/executor` endpoint to do executor/framework exists(`NULL`) checks before `Subscribe` since the slave explicitly knows the `frameworkID/executorID` when it launches it. Also modified tests to first spawn a dummy `cat` process and then make a `Subscribe` call to ensure that the Agent knows about the Framework/Executor and not reject it via `BadRequest` due to the `NULL` checks.


Diffs (updated)
-----

  src/slave/http.cpp 80bda34e2b344b96d5d2f9c1fecd36046f67ab49 
  src/tests/executor_http_api_tests.cpp 31938c295367686d444f8a8aa2c43d2696b481ec 

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


Testing
-------

make check


Thanks,

Anand Mazumdar


Re: Review Request 38875: Moved the framework/executor exists check before Subscribe call in Agent

Posted by Anand Mazumdar <ma...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/38875/
-----------------------------------------------------------

(Updated Oct. 24, 2015, 6:37 p.m.)


Review request for mesos, Ben Mahler, Isabel Jimenez, and Vinod Kone.


Changes
-------

Modified to use the `SchedulerDriver` instead of manually sending a `KillTaskMessage`


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


Repository: mesos


Description
-------

Refactored the `api/v1/executor` endpoint to do executor/framework exists(`NULL`) checks before `Subscribe` since the slave explicitly knows the `frameworkID/executorID` when it launches it. Also modified tests to first spawn a dummy `cat` process and then make a `Subscribe` call to ensure that the Agent knows about the Framework/Executor and not reject it via `BadRequest` due to the `NULL` checks.


Diffs (updated)
-----

  src/slave/http.cpp 80bda34e2b344b96d5d2f9c1fecd36046f67ab49 
  src/tests/executor_http_api_tests.cpp 31938c295367686d444f8a8aa2c43d2696b481ec 

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


Testing
-------

make check


Thanks,

Anand Mazumdar


Re: Review Request 38875: Moved the framework/executor exists check before Subscribe call in Agent

Posted by Anand Mazumdar <ma...@gmail.com>.

> On Oct. 5, 2015, 11:57 p.m., Isabel Jimenez wrote:
> > src/slave/http.cpp, line 310
> > <https://reviews.apache.org/r/38875/diff/1/?file=1087515#file1087515line310>
> >
> >     Could you please change the syntax for every case to be consistent with `: {` through this switch?
> 
> Guangya Liu wrote:
>     Does the "{" needed here?

I can make the change. Bit of an overkill though, as these switches would not be stubs quite soon and have a `{`:

There is already a patch out for Call::MESSAGE: https://reviews.apache.org/r/38899
MESOS-3476 is already being worked on.


- Anand


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


On Sept. 30, 2015, 3:39 a.m., Anand Mazumdar wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/38875/
> -----------------------------------------------------------
> 
> (Updated Sept. 30, 2015, 3:39 a.m.)
> 
> 
> Review request for mesos, Ben Mahler, Isabel Jimenez, and Vinod Kone.
> 
> 
> Bugs: MESOS-3515
>     https://issues.apache.org/jira/browse/MESOS-3515
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Refactored the `api/v1/executor` endpoint to do executor/framework exists(`NULL`) checks before `Subscribe` since the slave explicitly knows the `frameworkID/executorID` when it launches it. Also modified tests to first spawn a dummy `cat` process and then make a `Subscribe` call to ensure that the Agent knows about the Framework/Executor and not reject it via `BadRequest` due to the `NULL` checks.
> 
> 
> Diffs
> -----
> 
>   src/slave/http.cpp f9cf7bbe81b7fe9637de9a8d66329c16a7e1a89b 
>   src/tests/executor_http_api_tests.cpp 31938c295367686d444f8a8aa2c43d2696b481ec 
> 
> Diff: https://reviews.apache.org/r/38875/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Anand Mazumdar
> 
>


Re: Review Request 38875: Moved the framework/executor exists check before Subscribe call in Agent

Posted by Guangya Liu <gy...@gmail.com>.

> On 十月 5, 2015, 11:57 p.m., Isabel Jimenez wrote:
> > src/slave/http.cpp, line 310
> > <https://reviews.apache.org/r/38875/diff/1/?file=1087515#file1087515line310>
> >
> >     Could you please change the syntax for every case to be consistent with `: {` through this switch?

Does the "{" needed here?


- Guangya


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


On 九月 30, 2015, 3:39 a.m., Anand Mazumdar wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/38875/
> -----------------------------------------------------------
> 
> (Updated 九月 30, 2015, 3:39 a.m.)
> 
> 
> Review request for mesos, Ben Mahler, Isabel Jimenez, and Vinod Kone.
> 
> 
> Bugs: MESOS-3515
>     https://issues.apache.org/jira/browse/MESOS-3515
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Refactored the `api/v1/executor` endpoint to do executor/framework exists(`NULL`) checks before `Subscribe` since the slave explicitly knows the `frameworkID/executorID` when it launches it. Also modified tests to first spawn a dummy `cat` process and then make a `Subscribe` call to ensure that the Agent knows about the Framework/Executor and not reject it via `BadRequest` due to the `NULL` checks.
> 
> 
> Diffs
> -----
> 
>   src/slave/http.cpp f9cf7bbe81b7fe9637de9a8d66329c16a7e1a89b 
>   src/tests/executor_http_api_tests.cpp 31938c295367686d444f8a8aa2c43d2696b481ec 
> 
> Diff: https://reviews.apache.org/r/38875/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Anand Mazumdar
> 
>


Re: Review Request 38875: Moved the framework/executor exists check before Subscribe call in Agent

Posted by Isabel Jimenez <co...@isabeljimenez.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/38875/#review101562
-----------------------------------------------------------



src/slave/http.cpp (line 298)
<https://reviews.apache.org/r/38875/#comment158997>

    Could you please change the syntax for every case to be consistent with `: {` through this switch?


- Isabel Jimenez


On Sept. 30, 2015, 3:39 a.m., Anand Mazumdar wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/38875/
> -----------------------------------------------------------
> 
> (Updated Sept. 30, 2015, 3:39 a.m.)
> 
> 
> Review request for mesos, Ben Mahler, Isabel Jimenez, and Vinod Kone.
> 
> 
> Bugs: MESOS-3515
>     https://issues.apache.org/jira/browse/MESOS-3515
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Refactored the `api/v1/executor` endpoint to do executor/framework exists(`NULL`) checks before `Subscribe` since the slave explicitly knows the `frameworkID/executorID` when it launches it. Also modified tests to first spawn a dummy `cat` process and then make a `Subscribe` call to ensure that the Agent knows about the Framework/Executor and not reject it via `BadRequest` due to the `NULL` checks.
> 
> 
> Diffs
> -----
> 
>   src/slave/http.cpp f9cf7bbe81b7fe9637de9a8d66329c16a7e1a89b 
>   src/tests/executor_http_api_tests.cpp 31938c295367686d444f8a8aa2c43d2696b481ec 
> 
> Diff: https://reviews.apache.org/r/38875/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Anand Mazumdar
> 
>