mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benno Evers <bev...@mesosphere.com>
Subject Re: Review Request 71729: Added authorization handling for reservations with `source`.
Date Wed, 06 Nov 2019 16:11:49 GMT

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




src/master/master.cpp
Lines 3810 (patched)
<https://reviews.apache.org/r/71729/#comment306287>

    It doesn't seem ideal to have recursively nested calls to `collectauthorizations()`, even
if the logic is sound it seems hard to reason about.
    
    Would it be possible to eliminate the branching by setting `source` to be `resources.popReservation()`
if `source` is empty?



src/master/master.cpp
Lines 3820 (patched)
<https://reviews.apache.org/r/71729/#comment306284>

    Shouldn't the first `Unreserve` operation contain the original `source`?



src/master/master.cpp
Lines 3828 (patched)
<https://reviews.apache.org/r/71729/#comment306285>

    Is this the same as `reserve.resources().reservations()`?



src/master/master.cpp
Lines 3834 (patched)
<https://reviews.apache.org/r/71729/#comment306279>

    That look more like debug-statements rather than `INFO`-level logging?


- Benno Evers


On Nov. 6, 2019, 10:10 a.m., Benjamin Bannier wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/71729/
> -----------------------------------------------------------
> 
> (Updated Nov. 6, 2019, 10:10 a.m.)
> 
> 
> Review request for mesos and Benno Evers.
> 
> 
> Bugs: MESOS-9991
>     https://issues.apache.org/jira/browse/MESOS-9991
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch adds authorization handling for `RESERVE` operations
> containing `source` fields. In order to stay backwards-compatible we add
> a dedicated authorization branch for such operations which under the
> hood translates each removed reservation to an `UNRESERVE` operation and
> every added reservation as a `RESERVE` operation where we fall back to
> existing authorization code for authorization.
> 
> 
> Diffs
> -----
> 
>   src/master/master.cpp 2fdd6f7ddbb488d785c6f875c8b0c46c5f881d9d 
>   src/tests/master_authorization_tests.cpp 06471aa7779d399f4474ed40db3fbcc60b8298b2 
> 
> 
> Diff: https://reviews.apache.org/r/71729/diff/1/
> 
> 
> Testing
> -------
> 
> `make check`
> 
> 
> Thanks,
> 
> Benjamin Bannier
> 
>


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