mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Mahler <bmah...@apache.org>
Subject Re: Review Request 70915: Made `/roles` endpoint also return quota limits.
Date Mon, 24 Jun 2019 18:51:09 GMT

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




src/master/readonly_handler.cpp
Lines 719-720 (patched)
<https://reviews.apache.org/r/70915/#comment303096>

    Also, can you document for the reader why "guarantee" and "limit" are here, rather than
using the serializer introduced here:
    
    https://reviews.apache.org/r/70919/diff/2#2


- Benjamin Mahler


On June 21, 2019, 2:29 a.m., Meng Zhu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/70915/
> -----------------------------------------------------------
> 
> (Updated June 21, 2019, 2:29 a.m.)
> 
> 
> Review request for mesos and Benjamin Mahler.
> 
> 
> Bugs: MESOS-9854
>     https://issues.apache.org/jira/browse/MESOS-9854
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Now that guarantees are decoupled from limits, we should
> return limits and guarantees separately in the `/roles` endpoint.
> 
> Three incompatible changes are introduced:
> 
> - The `principal` field is removed. This legacy field was used to
> record the principal of the operator who configured the quota.
> So that later, if a different operator with a different principal
> wants to modify the quota, the action can be properly authorized.
> This use case has since been deprecated and the principal field
> will no longer be filled going forward.
> 
> - Resources with zero quantity will no longer be included in
> the `guarantee` field.
> 
> - The `guarantee` field will continue to be filled.
> However, since we are decoupling the quota guarantee from the limit.
> One can no longer assume that the limit will be the same as guarantee.
> A separate `limit` field is introduced.
> 
> Before, the response might contain:
> ```
> {
>   "quota": {
>     "guarantee": {
>       "cpus": 1,
>       "disk": 0,
>       "gpus": 0,
>       "mem": 512
>     },
>     "principal": "test-principal",
>     "role": "foo"
>   }
> }
> ```
> 
> After:
> ```
> {
>   "quota": {
>     "guarantee": {
>       "cpus": 1,
>       "mem": 512
>     },
>     "limit": {
>       "cpus": 1,
>       "mem": 512
>     },
>     "role": "foo"
>   }
> }
> ```
> 
> Also fixed an affected test.
> 
> 
> Diffs
> -----
> 
>   src/common/http.hpp b8c71ec3cf94b607ded689cafb91ab11308a1369 
>   src/common/http.cpp 6962959326e8844a463eb8d63be04e5dfcc6bc6e 
>   src/master/readonly_handler.cpp d62f139ed25dc6d03e91f76bf6574ad8c3c6baa0 
>   src/tests/role_tests.cpp e428fb48344c721386aa3d3ffcf18a84e4b6c9f5 
> 
> 
> Diff: https://reviews.apache.org/r/70915/diff/2/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Meng Zhu
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message