You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Meng Zhu <mz...@mesosphere.io> on 2018/02/27 00:45:51 UTC

Review Request 65806: Fixed a bug where quota headroom is miscalculated.

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

Review request for mesos, Benjamin Mahler and Michael Park.


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


Repository: mesos


Description
-------

When calculating the quota headroom, we failed to consider
ancestor's reservation allocated to the child. This leads
to under-estimation of available headroom and excessive
resources being set aside for headroom. See MESOS-8604.

This patches fixes this issue by counting ancestor's reservation
allocated to the child as allocated-reservation even though
the child itself has no reservation.


Diffs
-----

  src/master/allocator/mesos/hierarchical.cpp 80e0a347d6641c922cf7c62bef220ff5c8864597 


Diff: https://reviews.apache.org/r/65806/diff/1/


Testing
-------


Thanks,

Meng Zhu


Re: Review Request 65806: Fixed a bug where quota headroom is miscalculated.

Posted by Meng Zhu <mz...@mesosphere.io>.

> On Feb. 26, 2018, 6:41 p.m., Benjamin Mahler wrote:
> > Does this need to depend on the previous renaming patch? Makes cherry-picking a little messier

Nope. Removed the dependency.


- Meng


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


On Feb. 26, 2018, 6:46 p.m., Meng Zhu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/65806/
> -----------------------------------------------------------
> 
> (Updated Feb. 26, 2018, 6:46 p.m.)
> 
> 
> Review request for mesos, Benjamin Mahler and Michael Park.
> 
> 
> Bugs: MESOS-8604
>     https://issues.apache.org/jira/browse/MESOS-8604
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> When calculating the quota headroom, we failed to consider
> ancestor's reservation allocated to the child. This leads
> to under-estimation of available headroom and excessive
> resources being set aside for headroom. See MESOS-8604.
> 
> This patches fixes this issue by counting ancestor's reservation
> allocated to the child as allocated-reservation even though
> the child itself has no reservation.
> 
> 
> Diffs
> -----
> 
>   src/master/allocator/mesos/hierarchical.cpp 80e0a347d6641c922cf7c62bef220ff5c8864597 
> 
> 
> Diff: https://reviews.apache.org/r/65806/diff/1/
> 
> 
> Testing
> -------
> 
> make check
> Dedicated test in #65807
> 
> 
> Thanks,
> 
> Meng Zhu
> 
>


Re: Review Request 65806: Fixed a bug where quota headroom is miscalculated.

Posted by Benjamin Mahler <bm...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/65806/#review198304
-----------------------------------------------------------



Does this need to depend on the previous renaming patch? Makes cherry-picking a little messier

- Benjamin Mahler


On Feb. 27, 2018, 12:45 a.m., Meng Zhu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/65806/
> -----------------------------------------------------------
> 
> (Updated Feb. 27, 2018, 12:45 a.m.)
> 
> 
> Review request for mesos, Benjamin Mahler and Michael Park.
> 
> 
> Bugs: MESOS-8604
>     https://issues.apache.org/jira/browse/MESOS-8604
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> When calculating the quota headroom, we failed to consider
> ancestor's reservation allocated to the child. This leads
> to under-estimation of available headroom and excessive
> resources being set aside for headroom. See MESOS-8604.
> 
> This patches fixes this issue by counting ancestor's reservation
> allocated to the child as allocated-reservation even though
> the child itself has no reservation.
> 
> 
> Diffs
> -----
> 
>   src/master/allocator/mesos/hierarchical.cpp 80e0a347d6641c922cf7c62bef220ff5c8864597 
> 
> 
> Diff: https://reviews.apache.org/r/65806/diff/1/
> 
> 
> Testing
> -------
> 
> make check
> Dedicated test in #65807
> 
> 
> Thanks,
> 
> Meng Zhu
> 
>


Re: Review Request 65806: Fixed a bug where quota headroom is miscalculated.

Posted by Benjamin Mahler <bm...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/65806/#review198307
-----------------------------------------------------------


Ship it!





src/master/allocator/mesos/hierarchical.cpp
Lines 1677-1678 (original), 1677-1679 (patched)
<https://reviews.apache.org/r/65806/#comment278431>

    Do we need the new variable? Looks like we just need to do the following in the equation below:
    
    ```
    availableHeadroom -=
      Resources::sum(reservationScalarQuantities) -
      totalAllocatedReservationScalarQuantities;
    ```



src/master/allocator/mesos/hierarchical.cpp
Lines 1681-1688 (patched)
<https://reviews.apache.org/r/65806/#comment278432>

    How about:
    
      // Calculate total allocated reservations. Note that we need to ensure
      // we count a reservation for "a" being allocated to "a/b", therefore
      // we cannot simply loop over the reservations' roles.



src/master/allocator/mesos/hierarchical.cpp
Lines 1697-1698 (patched)
<https://reviews.apache.org/r/65806/#comment278433>

    We could inline this to make it a little more succinct:
    
    ```
          continue; // This role has no allocation.
    ```


- Benjamin Mahler


On Feb. 27, 2018, 2:46 a.m., Meng Zhu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/65806/
> -----------------------------------------------------------
> 
> (Updated Feb. 27, 2018, 2:46 a.m.)
> 
> 
> Review request for mesos, Benjamin Mahler and Michael Park.
> 
> 
> Bugs: MESOS-8604
>     https://issues.apache.org/jira/browse/MESOS-8604
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> When calculating the quota headroom, we failed to consider
> ancestor's reservation allocated to the child. This leads
> to under-estimation of available headroom and excessive
> resources being set aside for headroom. See MESOS-8604.
> 
> This patches fixes this issue by counting ancestor's reservation
> allocated to the child as allocated-reservation even though
> the child itself has no reservation.
> 
> 
> Diffs
> -----
> 
>   src/master/allocator/mesos/hierarchical.cpp 80e0a347d6641c922cf7c62bef220ff5c8864597 
> 
> 
> Diff: https://reviews.apache.org/r/65806/diff/1/
> 
> 
> Testing
> -------
> 
> make check
> Dedicated test in #65807
> 
> 
> Thanks,
> 
> Meng Zhu
> 
>


Re: Review Request 65806: Fixed a bug where quota headroom is miscalculated.

Posted by Meng Zhu <mz...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/65806/
-----------------------------------------------------------

(Updated Feb. 26, 2018, 6:46 p.m.)


Review request for mesos, Benjamin Mahler and Michael Park.


Changes
-------

Removed the unnecessary patch dependency.


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


Repository: mesos


Description
-------

When calculating the quota headroom, we failed to consider
ancestor's reservation allocated to the child. This leads
to under-estimation of available headroom and excessive
resources being set aside for headroom. See MESOS-8604.

This patches fixes this issue by counting ancestor's reservation
allocated to the child as allocated-reservation even though
the child itself has no reservation.


Diffs
-----

  src/master/allocator/mesos/hierarchical.cpp 80e0a347d6641c922cf7c62bef220ff5c8864597 


Diff: https://reviews.apache.org/r/65806/diff/1/


Testing
-------

make check
Dedicated test in #65807


Thanks,

Meng Zhu