You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Jan Schlicht <ja...@mesosphere.io> on 2017/08/01 14:04:18 UTC
Review Request 61275: Added a UPID parameter to the resource provider
driver.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/61275/
-----------------------------------------------------------
Review request for mesos, Benjamin Bannier and Jie Yu.
Repository: mesos
Description
-------
The UPID wil be used by the resource provider driver to determine
the endpoint of the resource provider manager API.
Diffs
-----
include/mesos/v1/resource_provider.hpp 88b606212ea57fee1c1ea522d2dc7f8124a9adef
src/resource_provider/daemon.hpp 467a5d30510f0c8f7f042d989c615c97bbae52af
src/resource_provider/daemon.cpp adcb60af8244840c56fbd2d846bdaeecb4f62282
src/resource_provider/driver.cpp 6778ec9c863022446f141ee88f70eb563178ea05
src/resource_provider/local.hpp 604c5d06b393349c352d0b698609ad6bfb16454a
src/resource_provider/local.cpp a57c7c99c674f18036c36ec4b6df71947f700db8
src/resource_provider/storage/provider.hpp c6ea440feeb4cd79c59aa1f25851513e5d8dcc86
src/resource_provider/storage/provider.cpp 4c39312be5e4a6d783df3d385a66be6b3dcf8603
src/slave/slave.cpp 7381530515f86faf4c3e8f82bcd9483f6cf0498b
Diff: https://reviews.apache.org/r/61275/diff/1/
Testing
-------
make check
Thanks,
Jan Schlicht
Re: Review Request 61275: Added a URL parameter to the resource
provider driver.
Posted by Jie Yu <yu...@gmail.com>.
> On Aug. 3, 2017, 10 a.m., Benjamin Bannier wrote:
> > src/resource_provider/daemon.hpp
> > Lines 44 (patched)
> > <https://reviews.apache.org/r/61275/diff/2/?file=1788101#file1788101line44>
> >
> > I wonder if it would make more sense to keep passing a pid here like you did previously. With that we'd form the `URL` inside the daemon when creating the drivers.
> >
> > Since the use of http is a detail of how drivers currently work, passing a pid would prevent us from leaking that fact beyond the daemon. Also, a driver will take a `ContentType` which is specific to HTTP which makes sense together with an URL; an URL in isolation seems leaky for that reason as well to me. I believe a pid and some `slave::Flags` passed here would form a similarly intuitive package on a different level of abstraction.
`pid` is libprocess specific concept. The RP that uses this driver might not be using libprocess. As the other comment I have in the other review, this really should be an Endpoint detector if you want to make http driver general (that can be used for scheduler/executor drivers).
The v1 resource provider API is HTTP based API, so 'http' is not a detail, it's a protocol.
- Jie
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/61275/#review182080
-----------------------------------------------------------
On Aug. 2, 2017, 11:37 a.m., Jan Schlicht wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61275/
> -----------------------------------------------------------
>
> (Updated Aug. 2, 2017, 11:37 a.m.)
>
>
> Review request for mesos, Benjamin Bannier and Jie Yu.
>
>
> Bugs: MESOS-7469
> https://issues.apache.org/jira/browse/MESOS-7469
>
>
> Repository: mesos
>
>
> Description
> -------
>
> The URL will be used by the resource provider driver to determine
> the endpoint of the resource provider manager API.
>
>
> Diffs
> -----
>
> include/mesos/v1/resource_provider.hpp 88b606212ea57fee1c1ea522d2dc7f8124a9adef
> src/resource_provider/daemon.hpp 467a5d30510f0c8f7f042d989c615c97bbae52af
> src/resource_provider/daemon.cpp adcb60af8244840c56fbd2d846bdaeecb4f62282
> src/resource_provider/driver.cpp 6778ec9c863022446f141ee88f70eb563178ea05
> src/resource_provider/local.hpp 604c5d06b393349c352d0b698609ad6bfb16454a
> src/resource_provider/local.cpp a57c7c99c674f18036c36ec4b6df71947f700db8
> src/resource_provider/storage/provider.hpp c6ea440feeb4cd79c59aa1f25851513e5d8dcc86
> src/resource_provider/storage/provider.cpp 4c39312be5e4a6d783df3d385a66be6b3dcf8603
> src/slave/slave.cpp 7381530515f86faf4c3e8f82bcd9483f6cf0498b
>
>
> Diff: https://reviews.apache.org/r/61275/diff/2/
>
>
> Testing
> -------
>
> make check
>
>
> Thanks,
>
> Jan Schlicht
>
>
Re: Review Request 61275: Added a URL parameter to the resource
provider driver.
Posted by Benjamin Bannier <be...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/61275/#review182080
-----------------------------------------------------------
src/resource_provider/daemon.hpp
Lines 44 (patched)
<https://reviews.apache.org/r/61275/#comment257928>
I wonder if it would make more sense to keep passing a pid here like you did previously. With that we'd form the `URL` inside the daemon when creating the drivers.
Since the use of http is a detail of how drivers currently work, passing a pid would prevent us from leaking that fact beyond the daemon. Also, a driver will take a `ContentType` which is specific to HTTP which makes sense together with an URL; an URL in isolation seems leaky for that reason as well to me. I believe a pid and some `slave::Flags` passed here would form a similarly intuitive package on a different level of abstraction.
- Benjamin Bannier
On Aug. 2, 2017, 1:37 p.m., Jan Schlicht wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61275/
> -----------------------------------------------------------
>
> (Updated Aug. 2, 2017, 1:37 p.m.)
>
>
> Review request for mesos, Benjamin Bannier and Jie Yu.
>
>
> Bugs: MESOS-7469
> https://issues.apache.org/jira/browse/MESOS-7469
>
>
> Repository: mesos
>
>
> Description
> -------
>
> The URL will be used by the resource provider driver to determine
> the endpoint of the resource provider manager API.
>
>
> Diffs
> -----
>
> include/mesos/v1/resource_provider.hpp 88b606212ea57fee1c1ea522d2dc7f8124a9adef
> src/resource_provider/daemon.hpp 467a5d30510f0c8f7f042d989c615c97bbae52af
> src/resource_provider/daemon.cpp adcb60af8244840c56fbd2d846bdaeecb4f62282
> src/resource_provider/driver.cpp 6778ec9c863022446f141ee88f70eb563178ea05
> src/resource_provider/local.hpp 604c5d06b393349c352d0b698609ad6bfb16454a
> src/resource_provider/local.cpp a57c7c99c674f18036c36ec4b6df71947f700db8
> src/resource_provider/storage/provider.hpp c6ea440feeb4cd79c59aa1f25851513e5d8dcc86
> src/resource_provider/storage/provider.cpp 4c39312be5e4a6d783df3d385a66be6b3dcf8603
> src/slave/slave.cpp 7381530515f86faf4c3e8f82bcd9483f6cf0498b
>
>
> Diff: https://reviews.apache.org/r/61275/diff/2/
>
>
> Testing
> -------
>
> make check
>
>
> Thanks,
>
> Jan Schlicht
>
>
Re: Review Request 61275: Added a URL parameter to the resource
provider driver.
Posted by Jie Yu <yu...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/61275/#review183234
-----------------------------------------------------------
Ship it!
Ship It!
- Jie Yu
On Aug. 2, 2017, 11:37 a.m., Jan Schlicht wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61275/
> -----------------------------------------------------------
>
> (Updated Aug. 2, 2017, 11:37 a.m.)
>
>
> Review request for mesos, Benjamin Bannier and Jie Yu.
>
>
> Bugs: MESOS-7469
> https://issues.apache.org/jira/browse/MESOS-7469
>
>
> Repository: mesos
>
>
> Description
> -------
>
> The URL will be used by the resource provider driver to determine
> the endpoint of the resource provider manager API.
>
>
> Diffs
> -----
>
> include/mesos/v1/resource_provider.hpp 88b606212ea57fee1c1ea522d2dc7f8124a9adef
> src/resource_provider/daemon.hpp 467a5d30510f0c8f7f042d989c615c97bbae52af
> src/resource_provider/daemon.cpp adcb60af8244840c56fbd2d846bdaeecb4f62282
> src/resource_provider/driver.cpp 6778ec9c863022446f141ee88f70eb563178ea05
> src/resource_provider/local.hpp 604c5d06b393349c352d0b698609ad6bfb16454a
> src/resource_provider/local.cpp a57c7c99c674f18036c36ec4b6df71947f700db8
> src/resource_provider/storage/provider.hpp c6ea440feeb4cd79c59aa1f25851513e5d8dcc86
> src/resource_provider/storage/provider.cpp 4c39312be5e4a6d783df3d385a66be6b3dcf8603
> src/slave/slave.cpp 7381530515f86faf4c3e8f82bcd9483f6cf0498b
>
>
> Diff: https://reviews.apache.org/r/61275/diff/2/
>
>
> Testing
> -------
>
> make check
>
>
> Thanks,
>
> Jan Schlicht
>
>
Re: Review Request 61275: Added a URL parameter to the resource
provider driver.
Posted by Jan Schlicht <ja...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/61275/
-----------------------------------------------------------
(Updated Aug. 2, 2017, 1:37 p.m.)
Review request for mesos, Benjamin Bannier and Jie Yu.
Changes
-------
Addressed issues.
Summary (updated)
-----------------
Added a URL parameter to the resource provider driver.
Bugs: MESOS-7469
https://issues.apache.org/jira/browse/MESOS-7469
Repository: mesos
Description (updated)
-------
The URL will be used by the resource provider driver to determine
the endpoint of the resource provider manager API.
Diffs (updated)
-----
include/mesos/v1/resource_provider.hpp 88b606212ea57fee1c1ea522d2dc7f8124a9adef
src/resource_provider/daemon.hpp 467a5d30510f0c8f7f042d989c615c97bbae52af
src/resource_provider/daemon.cpp adcb60af8244840c56fbd2d846bdaeecb4f62282
src/resource_provider/driver.cpp 6778ec9c863022446f141ee88f70eb563178ea05
src/resource_provider/local.hpp 604c5d06b393349c352d0b698609ad6bfb16454a
src/resource_provider/local.cpp a57c7c99c674f18036c36ec4b6df71947f700db8
src/resource_provider/storage/provider.hpp c6ea440feeb4cd79c59aa1f25851513e5d8dcc86
src/resource_provider/storage/provider.cpp 4c39312be5e4a6d783df3d385a66be6b3dcf8603
src/slave/slave.cpp 7381530515f86faf4c3e8f82bcd9483f6cf0498b
Diff: https://reviews.apache.org/r/61275/diff/2/
Changes: https://reviews.apache.org/r/61275/diff/1-2/
Testing
-------
make check
Thanks,
Jan Schlicht
Re: Review Request 61275: Added a UPID parameter to the resource
provider driver.
Posted by Jie Yu <yu...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/61275/#review181910
-----------------------------------------------------------
include/mesos/v1/resource_provider.hpp
Line 61 (original), 63 (patched)
<https://reviews.apache.org/r/61275/#comment257709>
This is very unintuitive. I would take a url here instead:
```
Driver(const process::http::URL& url,
ContentType contentType,
const std::function<void(void)>& connected,
const std::function<void(void)>& disconnected,
const std::function<void(const std::queue<Event>&)>& received);
```
The construction of the `url` should be left to the caller. The caller can choose to generate the `url` based on the upid.
Just imagine anyone who does not familiar with Mesos code base that wants to implement a RP using this driver. `upid` is not very intuitive to them.
- Jie Yu
On Aug. 1, 2017, 2:04 p.m., Jan Schlicht wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61275/
> -----------------------------------------------------------
>
> (Updated Aug. 1, 2017, 2:04 p.m.)
>
>
> Review request for mesos, Benjamin Bannier and Jie Yu.
>
>
> Repository: mesos
>
>
> Description
> -------
>
> The UPID wil be used by the resource provider driver to determine
> the endpoint of the resource provider manager API.
>
>
> Diffs
> -----
>
> include/mesos/v1/resource_provider.hpp 88b606212ea57fee1c1ea522d2dc7f8124a9adef
> src/resource_provider/daemon.hpp 467a5d30510f0c8f7f042d989c615c97bbae52af
> src/resource_provider/daemon.cpp adcb60af8244840c56fbd2d846bdaeecb4f62282
> src/resource_provider/driver.cpp 6778ec9c863022446f141ee88f70eb563178ea05
> src/resource_provider/local.hpp 604c5d06b393349c352d0b698609ad6bfb16454a
> src/resource_provider/local.cpp a57c7c99c674f18036c36ec4b6df71947f700db8
> src/resource_provider/storage/provider.hpp c6ea440feeb4cd79c59aa1f25851513e5d8dcc86
> src/resource_provider/storage/provider.cpp 4c39312be5e4a6d783df3d385a66be6b3dcf8603
> src/slave/slave.cpp 7381530515f86faf4c3e8f82bcd9483f6cf0498b
>
>
> Diff: https://reviews.apache.org/r/61275/diff/1/
>
>
> Testing
> -------
>
> make check
>
>
> Thanks,
>
> Jan Schlicht
>
>