You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Guangya Liu <gy...@gmail.com> on 2016/01/02 02:18:05 UTC

Re: Review Request 40632: WIP: Enabled oversubscribed resources for reservations in allocator.

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

(Updated 一月 2, 2016, 1:18 a.m.)


Review request for mesos, Klaus Ma and Jian Qiu.


Repository: mesos


Description
-------

Enabled oversubscribed resources for reservations in allocator.


Diffs (updated)
-----

  src/master/allocator/mesos/hierarchical.cpp 7f900c4e024485704d79e57ae22407557598fe6c 

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


Testing
-------

make
make check


Thanks,

Guangya Liu


Re: Review Request 40632: Enabled oversubscribed resources for reservations in allocator.

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

> On 一月 7, 2016, 8:22 p.m., Joseph Wu wrote:
> > src/master/allocator/mesos/hierarchical.cpp, lines 438-443
> > <https://reviews.apache.org/r/40632/diff/10/?file=1180362#file1180362line438>
> >
> >     Resources can be dynamically reserved, so ideally, you should recalculating the allocation slack in someplace like `updateAllocation`.  The `RESERVE` operation specifically increases allocation slack.

Patch is here https://reviews.apache.org/r/41791/


> On 一月 7, 2016, 8:22 p.m., Joseph Wu wrote:
> > src/master/allocator/mesos/hierarchical.cpp, line 516
> > <https://reviews.apache.org/r/40632/diff/10/?file=1180362#file1180362line516>
> >
> >     The Oversubscription logic here will overwrite anything you've done in `::addSlave`.

Patch is here https://reviews.apache.org/r/41847/


> On 一月 7, 2016, 8:22 p.m., Joseph Wu wrote:
> > src/master/allocator/mesos/hierarchical.cpp, lines 1305-1313
> > <https://reviews.apache.org/r/40632/diff/10/?file=1180362#file1180362line1305>
> >
> >     If you make the changes above, this recalculation will be unnecessary.  `resources.allocationSlack()` should be sufficient.

`resources.allocationSlack()` may not enough. If some task run on stateless reserved resources, the allocator should also remove those resources from allocation slack.

i.e.
total resources: `cpus(role1):100;mem(role1):100;cpus(*){ALLOCATION_SLACK}:100;mem(*){ALLOCATION_SLACK}:100`
allocated: `cpus(role1):30;mem(*){ALLOCATION_SLACK}:20`
Then the available resources should be: `cpus(role1):70;mem(role1):100;cpus(*){ALLOCATION_SLACK}:70;mem(*){ALLOCATION_SLACK}:80`

The allocation slack for cpus was also updated by decreasing 30 due to stateless reserved resources are used.


> On 一月 7, 2016, 8:22 p.m., Joseph Wu wrote:
> > src/master/allocator/mesos/hierarchical.cpp, lines 1343-1360
> > <https://reviews.apache.org/r/40632/diff/10/?file=1180362#file1180362line1343>
> >
> >     There would be less code duplication if you did something like:
> >     ```
> >     if (!remainingAllocationSlack.empty()) {
> >       resources = remainingAllocationSlack;
> >     } else {
> >       continue;
> >     }
> >     ```

Cool!


- Guangya


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


On 一月 7, 2016, 11:27 a.m., Guangya Liu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40632/
> -----------------------------------------------------------
> 
> (Updated 一月 7, 2016, 11:27 a.m.)
> 
> 
> Review request for mesos, Ben Mahler, Artem Harutyunyan, Joris Van Remoortere, Joseph Wu, Klaus Ma, and Jian Qiu.
> 
> 
> Bugs: MESOS-4145
>     https://issues.apache.org/jira/browse/MESOS-4145
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Enabled oversubscribed resources for reservations in allocator.
> 
> 
> Diffs
> -----
> 
>   src/master/allocator/mesos/hierarchical.cpp df8bccaf2b8cfc0cb5ca18d4867371ae7a84c12f 
>   src/tests/hierarchical_allocator_tests.cpp e044f832c2c16e53e663c6ced5452649bb0dcb59 
> 
> Diff: https://reviews.apache.org/r/40632/diff/
> 
> 
> Testing
> -------
> 
> make
> make check
> 
> 
> Thanks,
> 
> Guangya Liu
> 
>


Re: Review Request 40632: Enabled oversubscribed resources for reservations in allocator.

Posted by Joseph Wu <jo...@mesosphere.io>.

> On Jan. 7, 2016, 12:22 p.m., Joseph Wu wrote:
> > I haven't taken a close look at the tests yet.  However, it may benefit you to add tests (preferably in separate reviews) for:
> > 
> > + Dynamic reservations + optimistic offers.  Make sure the new reservations show up as allocation slack.
> > + Oversubscription + optimistic offers.  Make sure neither overwrites the other.
> > + Quota + optimistic offers.

Oops, I didn't notice that the next few reviews do some of this already.  

Can you add a note to the "Testing Done" and "Description" saying that the changes to allocator are spread out over several reviews?


- Joseph


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


On Jan. 7, 2016, 3:27 a.m., Guangya Liu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40632/
> -----------------------------------------------------------
> 
> (Updated Jan. 7, 2016, 3:27 a.m.)
> 
> 
> Review request for mesos, Ben Mahler, Artem Harutyunyan, Joris Van Remoortere, Joseph Wu, Klaus Ma, and Jian Qiu.
> 
> 
> Bugs: MESOS-4145
>     https://issues.apache.org/jira/browse/MESOS-4145
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Enabled oversubscribed resources for reservations in allocator.
> 
> 
> Diffs
> -----
> 
>   src/master/allocator/mesos/hierarchical.cpp df8bccaf2b8cfc0cb5ca18d4867371ae7a84c12f 
>   src/tests/hierarchical_allocator_tests.cpp e044f832c2c16e53e663c6ced5452649bb0dcb59 
> 
> Diff: https://reviews.apache.org/r/40632/diff/
> 
> 
> Testing
> -------
> 
> make
> make check
> 
> 
> Thanks,
> 
> Guangya Liu
> 
>


Re: Review Request 40632: Enabled oversubscribed resources for reservations in allocator.

Posted by Joseph Wu <jo...@mesosphere.io>.

> On Jan. 7, 2016, 12:22 p.m., Joseph Wu wrote:
> > src/master/allocator/mesos/hierarchical.cpp, lines 1305-1313
> > <https://reviews.apache.org/r/40632/diff/10/?file=1180362#file1180362line1305>
> >
> >     If you make the changes above, this recalculation will be unnecessary.  `resources.allocationSlack()` should be sufficient.
> 
> Guangya Liu wrote:
>     `resources.allocationSlack()` may not enough. If some task run on stateless reserved resources, the allocator should also remove those resources from allocation slack.
>     
>     i.e.
>     total resources: `cpus(role1):100;mem(role1):100;cpus(*){ALLOCATION_SLACK}:100;mem(*){ALLOCATION_SLACK}:100`
>     allocated: `cpus(role1):30;mem(*){ALLOCATION_SLACK}:20`
>     Then the available resources should be: `cpus(role1):70;mem(role1):100;cpus(*){ALLOCATION_SLACK}:70;mem(*){ALLOCATION_SLACK}:80`
>     
>     The allocation slack for cpus was also updated by decreasing 30 due to stateless reserved resources are used.

I'm going to drop this since the updated diffs make this comment somewhat obsolete.


- Joseph


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


On Jan. 13, 2016, 4:39 a.m., Guangya Liu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40632/
> -----------------------------------------------------------
> 
> (Updated Jan. 13, 2016, 4:39 a.m.)
> 
> 
> Review request for mesos, Ben Mahler, Artem Harutyunyan, Joris Van Remoortere, Joseph Wu, Klaus Ma, and Jian Qiu.
> 
> 
> Bugs: MESOS-4145
>     https://issues.apache.org/jira/browse/MESOS-4145
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Enabled oversubscribed resources for reservations in allocator.
> 
> There are five patches handling the allocator part:
> 1) This patch handles send offer, add slave and quota integration test.
> 2) https://reviews.apache.org/r/41847/ Handles the case of update slave.
> 3) https://reviews.apache.org/r/41791/ Handles the case of dynamic reservations (1/3).
> 4) https://reviews.apache.org/r/42113/ Handle unreserve logic for dynamic reservation (2/3)
> 5) https://reviews.apache.org/r/42194/ Handle unreserve logic for dynamic reservation (3/3)
> 
> 
> Diffs
> -----
> 
>   src/master/allocator/mesos/hierarchical.cpp d541bfa3f4190865c65d35c9d1ffdb8a3f194056 
>   src/tests/hierarchical_allocator_tests.cpp e044f832c2c16e53e663c6ced5452649bb0dcb59 
> 
> Diff: https://reviews.apache.org/r/40632/diff/
> 
> 
> Testing
> -------
> 
> make
> make check
> GLOG_v=2 ./bin/mesos-tests.sh  --gtest_filter="HierarchicalAllocatorTest.*" --verbose
> 
> 
> Thanks,
> 
> Guangya Liu
> 
>


Re: Review Request 40632: Enabled oversubscribed resources for reservations in allocator.

Posted by Joseph Wu <jo...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/40632/#review113303
-----------------------------------------------------------


I haven't taken a close look at the tests yet.  However, it may benefit you to add tests (preferably in separate reviews) for:

+ Dynamic reservations + optimistic offers.  Make sure the new reservations show up as allocation slack.
+ Oversubscription + optimistic offers.  Make sure neither overwrites the other.
+ Quota + optimistic offers.


src/master/allocator/mesos/hierarchical.cpp (lines 438 - 443)
<https://reviews.apache.org/r/40632/#comment173841>

    Resources can be dynamically reserved, so ideally, you should recalculating the allocation slack in someplace like `updateAllocation`.  The `RESERVE` operation specifically increases allocation slack.



src/master/allocator/mesos/hierarchical.cpp (line 516)
<https://reviews.apache.org/r/40632/#comment173835>

    The Oversubscription logic here will overwrite anything you've done in `::addSlave`.



src/master/allocator/mesos/hierarchical.cpp (lines 1305 - 1313)
<https://reviews.apache.org/r/40632/#comment173846>

    If you make the changes above, this recalculation will be unnecessary.  `resources.allocationSlack()` should be sufficient.



src/master/allocator/mesos/hierarchical.cpp (lines 1343 - 1360)
<https://reviews.apache.org/r/40632/#comment173855>

    There would be less code duplication if you did something like:
    ```
    if (!remainingAllocationSlack.empty()) {
      resources = remainingAllocationSlack;
    } else {
      continue;
    }
    ```


- Joseph Wu


On Jan. 7, 2016, 3:27 a.m., Guangya Liu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40632/
> -----------------------------------------------------------
> 
> (Updated Jan. 7, 2016, 3:27 a.m.)
> 
> 
> Review request for mesos, Ben Mahler, Artem Harutyunyan, Joris Van Remoortere, Joseph Wu, Klaus Ma, and Jian Qiu.
> 
> 
> Bugs: MESOS-4145
>     https://issues.apache.org/jira/browse/MESOS-4145
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Enabled oversubscribed resources for reservations in allocator.
> 
> 
> Diffs
> -----
> 
>   src/master/allocator/mesos/hierarchical.cpp df8bccaf2b8cfc0cb5ca18d4867371ae7a84c12f 
>   src/tests/hierarchical_allocator_tests.cpp e044f832c2c16e53e663c6ced5452649bb0dcb59 
> 
> Diff: https://reviews.apache.org/r/40632/diff/
> 
> 
> Testing
> -------
> 
> make
> make check
> 
> 
> Thanks,
> 
> Guangya Liu
> 
>


Re: Review Request 40632: Enabled oversubscribed resources for reservations in allocator.

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

> On 一月 16, 2016, 2:11 a.m., Joseph Wu wrote:
> > src/master/allocator/mesos/hierarchical.cpp, lines 1291-1319
> > <https://reviews.apache.org/r/40632/diff/15/?file=1195627#file1195627line1291>
> >
> >     None of this should be necessary:
> >     
> >     1) You should have all the allocation slack inside `available`.
> >     2) We don't have allocation slack ACLs in the MVP, so all allocation slack should fall under `available.unreserved`.  If we do have ACLs, some of the allocation slack will be accounted for in `available.reserved(role)`.
> >     3) You shouldn't need to recalculate this during `::allocate`.
> >     
> >     If any of the above are not true, you probably have a problem in the `Resource` helpers or in `::addSlave`.
> 
> Guangya Liu wrote:
>     We can take a look at the following cases:
>     1) total resources cpus(r1):100
>     2) register a framework f1, cycle 1: allocated cpus(r1):100;cpu(*){ALLOCATION_SLACK}:100 to f1
>     3) f1 recovered cpu(*){ALLOCATION_SLACK}:100 back
>     4) register another framwork f2, f2 get nothing here as f1 used up all reserved resoures and there is no allocation slack now.
>     
>     The above logic make sure that step 4) can always get the latest remaining allocation slack.
> 
> Joseph Wu wrote:
>     The step 3) in your case is presumably because you haven't implemented all the allocator methods yet (as of this review in the chain), like `recoverResources`, `updateAllocation`, and `updateAvailable`.
>     
>     If so, you should consider moving the test additions/changes before/after (this lets us know what your intended behavior is) the allocator changes.
> 
> Guangya Liu wrote:
>     I was updating the comments here to make it more clear.
>     
>     // Calculate the `remainingAllocationSlack` if the framework can
>     // use revocable resources and reservation oversubscription also
>     // enabled. The `remainingAllocationSlack` need to exclude the
>     // stateless reserved resources allocated in previous allocation
>     // cycle.
> 
> Joseph Wu wrote:
>     I would still **highly recommend** that you don't recalculate the allocation slack inside a doubly-nested for-loop.
>     
>     And I'll reinterate: if you can't find the allocation slack inside the `available` Resources object, then you're doing something wrong.  You should probably double-check if this is the case.

The reason I need to recalcuate this is because for a role, let's say `r1`, the `r1`'s resources including both `reserved` and `allocation slack` would be send out as an offer for `r1` if a framework is using `r1`.

A case is as this:
1) agent1 with cpus(r1):100
2) add agent1, then agent1 reosurces will become cpus(r1):100;cpus(*){ALLOCATION_SLACK}:100
3) Register a framework with r1
4) The allocator will send out resources as cpus(r1):100;cpus(*){ALLOCATION_SLACK}:100. For here, as we want thr framework can also run revocable tasks, so here, we are sending both reserved and revocable resources to framework and let the framework select the resources.
5) The allcator recover the allocation slack
6) When allocate again, the allocator need to recalculate the allocation slack and found it was 0

But if we do not send out both one role's `reserved` and `allocation slack`, we can simply use the `allocation slack` in `available` resources.

This is a question that we need to discuss today: Do we need to send out the offer in one role include both `reserved` and `allocation slack` ?


- Guangya


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


On 一月 20, 2016, 6:25 a.m., Guangya Liu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40632/
> -----------------------------------------------------------
> 
> (Updated 一月 20, 2016, 6:25 a.m.)
> 
> 
> Review request for mesos, Ben Mahler, Artem Harutyunyan, Joris Van Remoortere, Joseph Wu, Klaus Ma, and Jian Qiu.
> 
> 
> Bugs: MESOS-4145
>     https://issues.apache.org/jira/browse/MESOS-4145
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Enabled oversubscribed resources for reservations in allocator.
> The allocator part including 5 patches:
> 1) https://reviews.apache.org/r/40632 Enabled oversubscribed resources for reservations in allocator
> 2) https://reviews.apache.org/r/41847 Updated allocation slack when slave was updated.
> 3) https://reviews.apache.org/r/41791 Updated allocation slack for dynamic reserve (1/3).
> 4) https://reviews.apache.org/r/42113 Handle unreserve logic for dynamic reservation (2/3).
> 5) https://reviews.apache.org/r/42194 Handle unreserve logic for dynamic reservation (3/3).
> 
> 
> Diffs
> -----
> 
>   src/master/allocator/mesos/hierarchical.cpp e32ee4aa3ed9793bb5a99233e699e5cc2bdd796b 
>   src/tests/hierarchical_allocator_tests.cpp 953712149bd951789beb29c72779c4ac65aa48dc 
> 
> Diff: https://reviews.apache.org/r/40632/diff/
> 
> 
> Testing
> -------
> 
> make
> make check
> GLOG_v=2  ./bin/mesos-tests.sh  --gtest_filter="HierarchicalAllocatorTest.*" --verbose --gtest_repeat=100 --gtest_shuffle
> 
> 
> Thanks,
> 
> Guangya Liu
> 
>


Re: Review Request 40632: Enabled oversubscribed resources for reservations in allocator.

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

> On 一月 16, 2016, 2:11 a.m., Joseph Wu wrote:
> > src/tests/hierarchical_allocator_tests.cpp, line 993
> > <https://reviews.apache.org/r/40632/diff/15/?file=1195628#file1195628line993>
> >
> >     Can you pull this out into an entirely separate (not part of this review chain) review?
> >     
> >     We can get the test cleanup merged faster.
> >     Ditto for below.

All of the related clean up are moved to https://reviews.apache.org/r/42386/ but still in this chain, as following patches related to hierarchical test highly depend on this patch. Hope it is OK.


> On 一月 16, 2016, 2:11 a.m., Joseph Wu wrote:
> > src/master/allocator/mesos/hierarchical.cpp, lines 1291-1319
> > <https://reviews.apache.org/r/40632/diff/15/?file=1195627#file1195627line1291>
> >
> >     None of this should be necessary:
> >     
> >     1) You should have all the allocation slack inside `available`.
> >     2) We don't have allocation slack ACLs in the MVP, so all allocation slack should fall under `available.unreserved`.  If we do have ACLs, some of the allocation slack will be accounted for in `available.reserved(role)`.
> >     3) You shouldn't need to recalculate this during `::allocate`.
> >     
> >     If any of the above are not true, you probably have a problem in the `Resource` helpers or in `::addSlave`.

We can take a look at the following cases:
1) total resources cpus(r1):100
2) register a framework f1, cycle 1: allocated cpus(r1):100;cpu(*){ALLOCATION_SLACK}:100 to f1
3) f1 recovered cpu(*){ALLOCATION_SLACK}:100 back
4) register another framwork f2, f2 get nothing here as f1 used up all reserved resoures and there is no allocation slack now.

The above logic make sure that step 4) can always get the latest remaining allocation slack.


- Guangya


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


On 一月 16, 2016, 7:51 a.m., Guangya Liu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40632/
> -----------------------------------------------------------
> 
> (Updated 一月 16, 2016, 7:51 a.m.)
> 
> 
> Review request for mesos, Ben Mahler, Artem Harutyunyan, Joris Van Remoortere, Joseph Wu, Klaus Ma, and Jian Qiu.
> 
> 
> Bugs: MESOS-4145
>     https://issues.apache.org/jira/browse/MESOS-4145
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Enabled oversubscribed resources for reservations in allocator.
> The allocator part including 5 patches:
> 1) https://reviews.apache.org/r/40632 Enabled oversubscribed resources for reservations in allocator
> 2) https://reviews.apache.org/r/41847 Updated allocation slack when slave was updated.
> 3) https://reviews.apache.org/r/41791 Updated allocation slack for dynamic reserve (1/3).
> 4) https://reviews.apache.org/r/42113 Handle unreserve logic for dynamic reservation (2/3).
> 5) https://reviews.apache.org/r/42194 Handle unreserve logic for dynamic reservation (3/3).
> 
> 
> Diffs
> -----
> 
>   src/master/allocator/mesos/hierarchical.cpp 72e69a0f42dd724713f2a7a75f1b92ef16eb5569 
>   src/tests/hierarchical_allocator_tests.cpp 9362dd306497ba01e0f387c3862456cdcac6f863 
> 
> Diff: https://reviews.apache.org/r/40632/diff/
> 
> 
> Testing
> -------
> 
> make
> make check
> GLOG_v=2 ./bin/mesos-tests.sh  --gtest_filter="HierarchicalAllocatorTest.*" --verbose
> 
> 
> Thanks,
> 
> Guangya Liu
> 
>


Re: Review Request 40632: Enabled oversubscribed resources for reservations in allocator.

Posted by Joseph Wu <jo...@mesosphere.io>.

> On Jan. 15, 2016, 6:11 p.m., Joseph Wu wrote:
> > src/master/allocator/mesos/hierarchical.cpp, lines 1291-1319
> > <https://reviews.apache.org/r/40632/diff/15/?file=1195627#file1195627line1291>
> >
> >     None of this should be necessary:
> >     
> >     1) You should have all the allocation slack inside `available`.
> >     2) We don't have allocation slack ACLs in the MVP, so all allocation slack should fall under `available.unreserved`.  If we do have ACLs, some of the allocation slack will be accounted for in `available.reserved(role)`.
> >     3) You shouldn't need to recalculate this during `::allocate`.
> >     
> >     If any of the above are not true, you probably have a problem in the `Resource` helpers or in `::addSlave`.
> 
> Guangya Liu wrote:
>     We can take a look at the following cases:
>     1) total resources cpus(r1):100
>     2) register a framework f1, cycle 1: allocated cpus(r1):100;cpu(*){ALLOCATION_SLACK}:100 to f1
>     3) f1 recovered cpu(*){ALLOCATION_SLACK}:100 back
>     4) register another framwork f2, f2 get nothing here as f1 used up all reserved resoures and there is no allocation slack now.
>     
>     The above logic make sure that step 4) can always get the latest remaining allocation slack.

The step 3) in your case is presumably because you haven't implemented all the allocator methods yet (as of this review in the chain), like `recoverResources`, `updateAllocation`, and `updateAvailable`.

If so, you should consider moving the test additions/changes before/after (this lets us know what your intended behavior is) the allocator changes.


- Joseph


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


On Jan. 19, 2016, 12:03 a.m., Guangya Liu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40632/
> -----------------------------------------------------------
> 
> (Updated Jan. 19, 2016, 12:03 a.m.)
> 
> 
> Review request for mesos, Ben Mahler, Artem Harutyunyan, Joris Van Remoortere, Joseph Wu, Klaus Ma, and Jian Qiu.
> 
> 
> Bugs: MESOS-4145
>     https://issues.apache.org/jira/browse/MESOS-4145
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Enabled oversubscribed resources for reservations in allocator.
> The allocator part including 5 patches:
> 1) https://reviews.apache.org/r/40632 Enabled oversubscribed resources for reservations in allocator
> 2) https://reviews.apache.org/r/41847 Updated allocation slack when slave was updated.
> 3) https://reviews.apache.org/r/41791 Updated allocation slack for dynamic reserve (1/3).
> 4) https://reviews.apache.org/r/42113 Handle unreserve logic for dynamic reservation (2/3).
> 5) https://reviews.apache.org/r/42194 Handle unreserve logic for dynamic reservation (3/3).
> 
> 
> Diffs
> -----
> 
>   src/master/allocator/mesos/hierarchical.cpp 48acde69b1a2f305b568a7e322a58708063dd30a 
>   src/tests/hierarchical_allocator_tests.cpp 9362dd306497ba01e0f387c3862456cdcac6f863 
> 
> Diff: https://reviews.apache.org/r/40632/diff/
> 
> 
> Testing
> -------
> 
> make
> make check
> GLOG_v=2 ./bin/mesos-tests.sh  --gtest_filter="HierarchicalAllocatorTest.*" --verbose
> 
> 
> Thanks,
> 
> Guangya Liu
> 
>


Re: Review Request 40632: Enabled oversubscribed resources for reservations in allocator.

Posted by Joseph Wu <jo...@mesosphere.io>.

> On Jan. 15, 2016, 6:11 p.m., Joseph Wu wrote:
> > src/master/allocator/mesos/hierarchical.cpp, lines 1291-1319
> > <https://reviews.apache.org/r/40632/diff/15/?file=1195627#file1195627line1291>
> >
> >     None of this should be necessary:
> >     
> >     1) You should have all the allocation slack inside `available`.
> >     2) We don't have allocation slack ACLs in the MVP, so all allocation slack should fall under `available.unreserved`.  If we do have ACLs, some of the allocation slack will be accounted for in `available.reserved(role)`.
> >     3) You shouldn't need to recalculate this during `::allocate`.
> >     
> >     If any of the above are not true, you probably have a problem in the `Resource` helpers or in `::addSlave`.
> 
> Guangya Liu wrote:
>     We can take a look at the following cases:
>     1) total resources cpus(r1):100
>     2) register a framework f1, cycle 1: allocated cpus(r1):100;cpu(*){ALLOCATION_SLACK}:100 to f1
>     3) f1 recovered cpu(*){ALLOCATION_SLACK}:100 back
>     4) register another framwork f2, f2 get nothing here as f1 used up all reserved resoures and there is no allocation slack now.
>     
>     The above logic make sure that step 4) can always get the latest remaining allocation slack.
> 
> Joseph Wu wrote:
>     The step 3) in your case is presumably because you haven't implemented all the allocator methods yet (as of this review in the chain), like `recoverResources`, `updateAllocation`, and `updateAvailable`.
>     
>     If so, you should consider moving the test additions/changes before/after (this lets us know what your intended behavior is) the allocator changes.
> 
> Guangya Liu wrote:
>     I was updating the comments here to make it more clear.
>     
>     // Calculate the `remainingAllocationSlack` if the framework can
>     // use revocable resources and reservation oversubscription also
>     // enabled. The `remainingAllocationSlack` need to exclude the
>     // stateless reserved resources allocated in previous allocation
>     // cycle.

I would still **highly recommend** that you don't recalculate the allocation slack inside a doubly-nested for-loop.

And I'll reinterate: if you can't find the allocation slack inside the `available` Resources object, then you're doing something wrong.  You should probably double-check if this is the case.


- Joseph


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


On Jan. 19, 2016, 10:25 p.m., Guangya Liu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40632/
> -----------------------------------------------------------
> 
> (Updated Jan. 19, 2016, 10:25 p.m.)
> 
> 
> Review request for mesos, Ben Mahler, Artem Harutyunyan, Joris Van Remoortere, Joseph Wu, Klaus Ma, and Jian Qiu.
> 
> 
> Bugs: MESOS-4145
>     https://issues.apache.org/jira/browse/MESOS-4145
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Enabled oversubscribed resources for reservations in allocator.
> The allocator part including 5 patches:
> 1) https://reviews.apache.org/r/40632 Enabled oversubscribed resources for reservations in allocator
> 2) https://reviews.apache.org/r/41847 Updated allocation slack when slave was updated.
> 3) https://reviews.apache.org/r/41791 Updated allocation slack for dynamic reserve (1/3).
> 4) https://reviews.apache.org/r/42113 Handle unreserve logic for dynamic reservation (2/3).
> 5) https://reviews.apache.org/r/42194 Handle unreserve logic for dynamic reservation (3/3).
> 
> 
> Diffs
> -----
> 
>   src/master/allocator/mesos/hierarchical.cpp e32ee4aa3ed9793bb5a99233e699e5cc2bdd796b 
>   src/tests/hierarchical_allocator_tests.cpp 953712149bd951789beb29c72779c4ac65aa48dc 
> 
> Diff: https://reviews.apache.org/r/40632/diff/
> 
> 
> Testing
> -------
> 
> make
> make check
> GLOG_v=2  ./bin/mesos-tests.sh  --gtest_filter="HierarchicalAllocatorTest.*" --verbose --gtest_repeat=100 --gtest_shuffle
> 
> 
> Thanks,
> 
> Guangya Liu
> 
>


Re: Review Request 40632: Enabled oversubscribed resources for reservations in allocator.

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

> On 一月 16, 2016, 2:11 a.m., Joseph Wu wrote:
> > src/master/allocator/mesos/hierarchical.cpp, lines 1291-1319
> > <https://reviews.apache.org/r/40632/diff/15/?file=1195627#file1195627line1291>
> >
> >     None of this should be necessary:
> >     
> >     1) You should have all the allocation slack inside `available`.
> >     2) We don't have allocation slack ACLs in the MVP, so all allocation slack should fall under `available.unreserved`.  If we do have ACLs, some of the allocation slack will be accounted for in `available.reserved(role)`.
> >     3) You shouldn't need to recalculate this during `::allocate`.
> >     
> >     If any of the above are not true, you probably have a problem in the `Resource` helpers or in `::addSlave`.
> 
> Guangya Liu wrote:
>     We can take a look at the following cases:
>     1) total resources cpus(r1):100
>     2) register a framework f1, cycle 1: allocated cpus(r1):100;cpu(*){ALLOCATION_SLACK}:100 to f1
>     3) f1 recovered cpu(*){ALLOCATION_SLACK}:100 back
>     4) register another framwork f2, f2 get nothing here as f1 used up all reserved resoures and there is no allocation slack now.
>     
>     The above logic make sure that step 4) can always get the latest remaining allocation slack.
> 
> Joseph Wu wrote:
>     The step 3) in your case is presumably because you haven't implemented all the allocator methods yet (as of this review in the chain), like `recoverResources`, `updateAllocation`, and `updateAvailable`.
>     
>     If so, you should consider moving the test additions/changes before/after (this lets us know what your intended behavior is) the allocator changes.

I was updating the comments here to make it more clear.

// Calculate the `remainingAllocationSlack` if the framework can
// use revocable resources and reservation oversubscription also
// enabled. The `remainingAllocationSlack` need to exclude the
// stateless reserved resources allocated in previous allocation
// cycle.


- Guangya


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


On 一月 19, 2016, 8:03 a.m., Guangya Liu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40632/
> -----------------------------------------------------------
> 
> (Updated 一月 19, 2016, 8:03 a.m.)
> 
> 
> Review request for mesos, Ben Mahler, Artem Harutyunyan, Joris Van Remoortere, Joseph Wu, Klaus Ma, and Jian Qiu.
> 
> 
> Bugs: MESOS-4145
>     https://issues.apache.org/jira/browse/MESOS-4145
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Enabled oversubscribed resources for reservations in allocator.
> The allocator part including 5 patches:
> 1) https://reviews.apache.org/r/40632 Enabled oversubscribed resources for reservations in allocator
> 2) https://reviews.apache.org/r/41847 Updated allocation slack when slave was updated.
> 3) https://reviews.apache.org/r/41791 Updated allocation slack for dynamic reserve (1/3).
> 4) https://reviews.apache.org/r/42113 Handle unreserve logic for dynamic reservation (2/3).
> 5) https://reviews.apache.org/r/42194 Handle unreserve logic for dynamic reservation (3/3).
> 
> 
> Diffs
> -----
> 
>   src/master/allocator/mesos/hierarchical.cpp 48acde69b1a2f305b568a7e322a58708063dd30a 
>   src/tests/hierarchical_allocator_tests.cpp 9362dd306497ba01e0f387c3862456cdcac6f863 
> 
> Diff: https://reviews.apache.org/r/40632/diff/
> 
> 
> Testing
> -------
> 
> make
> make check
> GLOG_v=2 ./bin/mesos-tests.sh  --gtest_filter="HierarchicalAllocatorTest.*" --verbose
> 
> 
> Thanks,
> 
> Guangya Liu
> 
>


Re: Review Request 40632: Enabled oversubscribed resources for reservations in allocator.

Posted by Joseph Wu <jo...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/40632/#review114831
-----------------------------------------------------------



src/master/allocator/mesos/hierarchical.cpp (lines 1291 - 1319)
<https://reviews.apache.org/r/40632/#comment175675>

    None of this should be necessary:
    
    1) You should have all the allocation slack inside `available`.
    2) We don't have allocation slack ACLs in the MVP, so all allocation slack should fall under `available.unreserved`.  If we do have ACLs, some of the allocation slack will be accounted for in `available.reserved(role)`.
    3) You shouldn't need to recalculate this during `::allocate`.
    
    If any of the above are not true, you probably have a problem in the `Resource` helpers or in `::addSlave`.



src/master/allocator/mesos/hierarchical.cpp (lines 1337 - 1340)
<https://reviews.apache.org/r/40632/#comment175676>

    Suggestion:
    Quota does not affect revocable resources.  If the non-revocable component of this offer would exceed quota, the revocable portion can still be offered.



src/master/allocator/mesos/hierarchical.cpp (lines 1341 - 1346)
<https://reviews.apache.org/r/40632/#comment175677>

    This should be something resembling:
    ```
    Resources revocable = resources.revocable();
    if (revocable.empty()) {
      continue;
    } else {
      // Offer just the revocable resources.
      resources = revocable;
    }
    ```



src/tests/hierarchical_allocator_tests.cpp (lines 146 - 155)
<https://reviews.apache.org/r/40632/#comment175678>

    This change should probably go in the previous review.



src/tests/hierarchical_allocator_tests.cpp (line 993)
<https://reviews.apache.org/r/40632/#comment175679>

    Can you pull this out into an entirely separate (not part of this review chain) review?
    
    We can get the test cleanup merged faster.
    Ditto for below.



src/tests/hierarchical_allocator_tests.cpp (line 1009)
<https://reviews.apache.org/r/40632/#comment175680>

    Test cleanup -> separate review.



src/tests/hierarchical_allocator_tests.cpp (line 1101)
<https://reviews.apache.org/r/40632/#comment175681>

    Test cleanup -> separate review.



src/tests/hierarchical_allocator_tests.cpp (line 2067)
<https://reviews.apache.org/r/40632/#comment175682>

    Test cleanup -> separate review.


- Joseph Wu


On Jan. 13, 2016, 4:39 a.m., Guangya Liu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40632/
> -----------------------------------------------------------
> 
> (Updated Jan. 13, 2016, 4:39 a.m.)
> 
> 
> Review request for mesos, Ben Mahler, Artem Harutyunyan, Joris Van Remoortere, Joseph Wu, Klaus Ma, and Jian Qiu.
> 
> 
> Bugs: MESOS-4145
>     https://issues.apache.org/jira/browse/MESOS-4145
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Enabled oversubscribed resources for reservations in allocator.
> 
> There are five patches handling the allocator part:
> 1) This patch handles send offer, add slave and quota integration test.
> 2) https://reviews.apache.org/r/41847/ Handles the case of update slave.
> 3) https://reviews.apache.org/r/41791/ Handles the case of dynamic reservations (1/3).
> 4) https://reviews.apache.org/r/42113/ Handle unreserve logic for dynamic reservation (2/3)
> 5) https://reviews.apache.org/r/42194/ Handle unreserve logic for dynamic reservation (3/3)
> 
> 
> Diffs
> -----
> 
>   src/master/allocator/mesos/hierarchical.cpp d541bfa3f4190865c65d35c9d1ffdb8a3f194056 
>   src/tests/hierarchical_allocator_tests.cpp e044f832c2c16e53e663c6ced5452649bb0dcb59 
> 
> Diff: https://reviews.apache.org/r/40632/diff/
> 
> 
> Testing
> -------
> 
> make
> make check
> GLOG_v=2 ./bin/mesos-tests.sh  --gtest_filter="HierarchicalAllocatorTest.*" --verbose
> 
> 
> Thanks,
> 
> Guangya Liu
> 
>


Re: Review Request 40632: Enabled oversubscribed resources for reservations in allocator.

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

> On 一月 19, 2016, 11:09 p.m., Joseph Wu wrote:
> > src/tests/hierarchical_allocator_tests.cpp, lines 1995-1997
> > <https://reviews.apache.org/r/40632/diff/18/?file=1201213#file1201213line1995>
> >
> >     Consider moving this test to after you've implemented optimistic offers for `Allocator::recoverResources`.

I think that we can keep this test cases which focusing on recovering allocation slack. The update for `Allocator::recoverResources` is only used when shrinking dynamic reservations, and the allocation slack based on those shrinked dynamic reservations are being used by some revocable tasks.

Please refer to https://reviews.apache.org/r/42113/ and https://reviews.apache.org/r/42194/ for detail.


> On 一月 19, 2016, 11:09 p.m., Joseph Wu wrote:
> > src/tests/hierarchical_allocator_tests.cpp, lines 2045-2047
> > <https://reviews.apache.org/r/40632/diff/18/?file=1201213#file1201213line2045>
> >
> >     Consider moving this test to after you've implemented optimistic offers for `Allocator::recoverResources`.

Same as aobove.


- Guangya


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


On 一月 19, 2016, 8:03 a.m., Guangya Liu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40632/
> -----------------------------------------------------------
> 
> (Updated 一月 19, 2016, 8:03 a.m.)
> 
> 
> Review request for mesos, Ben Mahler, Artem Harutyunyan, Joris Van Remoortere, Joseph Wu, Klaus Ma, and Jian Qiu.
> 
> 
> Bugs: MESOS-4145
>     https://issues.apache.org/jira/browse/MESOS-4145
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Enabled oversubscribed resources for reservations in allocator.
> The allocator part including 5 patches:
> 1) https://reviews.apache.org/r/40632 Enabled oversubscribed resources for reservations in allocator
> 2) https://reviews.apache.org/r/41847 Updated allocation slack when slave was updated.
> 3) https://reviews.apache.org/r/41791 Updated allocation slack for dynamic reserve (1/3).
> 4) https://reviews.apache.org/r/42113 Handle unreserve logic for dynamic reservation (2/3).
> 5) https://reviews.apache.org/r/42194 Handle unreserve logic for dynamic reservation (3/3).
> 
> 
> Diffs
> -----
> 
>   src/master/allocator/mesos/hierarchical.cpp 48acde69b1a2f305b568a7e322a58708063dd30a 
>   src/tests/hierarchical_allocator_tests.cpp 9362dd306497ba01e0f387c3862456cdcac6f863 
> 
> Diff: https://reviews.apache.org/r/40632/diff/
> 
> 
> Testing
> -------
> 
> make
> make check
> GLOG_v=2 ./bin/mesos-tests.sh  --gtest_filter="HierarchicalAllocatorTest.*" --verbose
> 
> 
> Thanks,
> 
> Guangya Liu
> 
>


Re: Review Request 40632: Enabled oversubscribed resources for reservations in allocator.

Posted by Joseph Wu <jo...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/40632/#review115263
-----------------------------------------------------------



src/tests/hierarchical_allocator_tests.cpp (lines 1918 - 1919)
<https://reviews.apache.org/r/40632/#comment176206>

    Note: This separation comment is probably unnecessary.  As long as the new tests are named properly (i.e. AllocationSlack...) we can tell them apart quite easily.



src/tests/hierarchical_allocator_tests.cpp (line 1922)
<https://reviews.apache.org/r/40632/#comment176207>

    s/resources on a slave that are statically reserved/statically reserved resources/



src/tests/hierarchical_allocator_tests.cpp (lines 1924 - 1925)
<https://reviews.apache.org/r/40632/#comment176211>

    s/to any role and/to any role, and/
    
    s/for a role are only offered to frameworks in that role/are still only allocated to the reserved role/



src/tests/hierarchical_allocator_tests.cpp (lines 1952 - 1960)
<https://reviews.apache.org/r/40632/#comment176212>

    It would be great to have a comment above this :)



src/tests/hierarchical_allocator_tests.cpp (lines 1995 - 1997)
<https://reviews.apache.org/r/40632/#comment176198>

    Consider moving this test to after you've implemented optimistic offers for `Allocator::recoverResources`.



src/tests/hierarchical_allocator_tests.cpp (lines 2045 - 2047)
<https://reviews.apache.org/r/40632/#comment176199>

    Consider moving this test to after you've implemented optimistic offers for `Allocator::recoverResources`.



src/tests/hierarchical_allocator_tests.cpp (line 2089)
<https://reviews.apache.org/r/40632/#comment176213>

    s/was not count in Quota/can be allocated regardless of Quota/



src/tests/hierarchical_allocator_tests.cpp (line 2107)
<https://reviews.apache.org/r/40632/#comment176215>

    It may improve readability to split up that big comment.  Suggestion:
    
    Set quota for the quota'd role.  In the first allocation cycle, this effectively prevents `agent1` from being offered to any role except the quota'd role (as doing so would put the quota'd role under quota).



src/tests/hierarchical_allocator_tests.cpp (line 2111)
<https://reviews.apache.org/r/40632/#comment176218>

    Continued suggestion:
    
    Add a framework that can only be offered non-revocable resources from `agent2`.



src/tests/hierarchical_allocator_tests.cpp (lines 2116 - 2123)
<https://reviews.apache.org/r/40632/#comment176221>

    Continued suggestion:
    
    Check that `framework1` gets offered resources from `agent2` as well as allocation slack from `agent1`.


- Joseph Wu


On Jan. 19, 2016, 12:03 a.m., Guangya Liu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40632/
> -----------------------------------------------------------
> 
> (Updated Jan. 19, 2016, 12:03 a.m.)
> 
> 
> Review request for mesos, Ben Mahler, Artem Harutyunyan, Joris Van Remoortere, Joseph Wu, Klaus Ma, and Jian Qiu.
> 
> 
> Bugs: MESOS-4145
>     https://issues.apache.org/jira/browse/MESOS-4145
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Enabled oversubscribed resources for reservations in allocator.
> The allocator part including 5 patches:
> 1) https://reviews.apache.org/r/40632 Enabled oversubscribed resources for reservations in allocator
> 2) https://reviews.apache.org/r/41847 Updated allocation slack when slave was updated.
> 3) https://reviews.apache.org/r/41791 Updated allocation slack for dynamic reserve (1/3).
> 4) https://reviews.apache.org/r/42113 Handle unreserve logic for dynamic reservation (2/3).
> 5) https://reviews.apache.org/r/42194 Handle unreserve logic for dynamic reservation (3/3).
> 
> 
> Diffs
> -----
> 
>   src/master/allocator/mesos/hierarchical.cpp 48acde69b1a2f305b568a7e322a58708063dd30a 
>   src/tests/hierarchical_allocator_tests.cpp 9362dd306497ba01e0f387c3862456cdcac6f863 
> 
> Diff: https://reviews.apache.org/r/40632/diff/
> 
> 
> Testing
> -------
> 
> make
> make check
> GLOG_v=2 ./bin/mesos-tests.sh  --gtest_filter="HierarchicalAllocatorTest.*" --verbose
> 
> 
> Thanks,
> 
> Guangya Liu
> 
>


Re: Review Request 40632: Enabled oversubscribed resources for reservations in allocator.

Posted by Klaus Ma <kl...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/40632/#review116776
-----------------------------------------------------------




src/master/allocator/mesos/hierarchical.cpp (lines 1333 - 1335)
<https://reviews.apache.org/r/40632/#comment177869>

    The result is un-stable here: if framework accept reserved resource come firstly, the others can not get those revocable resources; but if tenant framework come fristly, it will get revocable resources. It all depedent on sorter, and the offer maybe wrong in about cases.


- Klaus Ma


On Jan. 23, 2016, 11:18 a.m., Guangya Liu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40632/
> -----------------------------------------------------------
> 
> (Updated Jan. 23, 2016, 11:18 a.m.)
> 
> 
> Review request for mesos, Ben Mahler, Artem Harutyunyan, Joris Van Remoortere, Joseph Wu, Klaus Ma, and Jian Qiu.
> 
> 
> Bugs: MESOS-4145
>     https://issues.apache.org/jira/browse/MESOS-4145
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Enabled oversubscribed resources for reservations in allocator.
> 
> 
> Diffs
> -----
> 
>   src/master/allocator/mesos/hierarchical.cpp 65c7e6b15c5308c0910667e1b12f39b21293a316 
>   src/tests/hierarchical_allocator_tests.cpp b1cb955b7eb1213c7ba4a9c5181545bb49154f06 
> 
> Diff: https://reviews.apache.org/r/40632/diff/
> 
> 
> Testing
> -------
> 
> make
> make check
> GLOG_v=2  ./bin/mesos-tests.sh  --gtest_filter="HierarchicalAllocatorTest.*" --verbose --gtest_repeat=100 --gtest_shuffle
> 
> 
> Thanks,
> 
> Guangya Liu
> 
>


Re: Review Request 40632: Enabled oversubscribed resources for reservations in allocator.

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

(Updated 三月 14, 2016, 4:03 a.m.)


Review request for mesos, Ben Mahler, Artem Harutyunyan, Joris Van Remoortere, Joseph Wu, Klaus Ma, and Jian Qiu.


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


Repository: mesos


Description
-------

Enabled oversubscribed resources for reservations in allocator.


Diffs
-----

  src/master/allocator/mesos/hierarchical.cpp 70291075c00a9a557529c2562dedcfc6c6c3ec32 
  src/tests/hierarchical_allocator_tests.cpp 459e02576f6d05abbbcc83ae5cabac5c66e93f05 

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


Testing
-------

make
make check
GLOG_v=2  ./bin/mesos-tests.sh  --gtest_filter="HierarchicalAllocatorTest.*" --verbose --gtest_repeat=100 --gtest_shuffle


Thanks,

Guangya Liu


Re: Review Request 40632: Enabled oversubscribed resources for reservations in allocator.

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

(Updated 三月 11, 2016, 9:10 a.m.)


Review request for mesos, Ben Mahler, Artem Harutyunyan, Joris Van Remoortere, Joseph Wu, Klaus Ma, and Jian Qiu.


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


Repository: mesos


Description
-------

Enabled oversubscribed resources for reservations in allocator.


Diffs (updated)
-----

  src/master/allocator/mesos/hierarchical.cpp 70291075c00a9a557529c2562dedcfc6c6c3ec32 
  src/tests/hierarchical_allocator_tests.cpp 459e02576f6d05abbbcc83ae5cabac5c66e93f05 

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


Testing
-------

make
make check
GLOG_v=2  ./bin/mesos-tests.sh  --gtest_filter="HierarchicalAllocatorTest.*" --verbose --gtest_repeat=100 --gtest_shuffle


Thanks,

Guangya Liu


Re: Review Request 40632: Enabled oversubscribed resources for reservations in allocator.

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

(Updated 二月 29, 2016, 7:04 a.m.)


Review request for mesos, Ben Mahler, Artem Harutyunyan, Joris Van Remoortere, Joseph Wu, Klaus Ma, and Jian Qiu.


Changes
-------

Remove dependency to make some patches get merged first.


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


Repository: mesos


Description
-------

Enabled oversubscribed resources for reservations in allocator.


Diffs
-----

  src/master/allocator/mesos/hierarchical.cpp 65c7e6b15c5308c0910667e1b12f39b21293a316 
  src/tests/hierarchical_allocator_tests.cpp b1cb955b7eb1213c7ba4a9c5181545bb49154f06 

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


Testing
-------

make
make check
GLOG_v=2  ./bin/mesos-tests.sh  --gtest_filter="HierarchicalAllocatorTest.*" --verbose --gtest_repeat=100 --gtest_shuffle


Thanks,

Guangya Liu


Re: Review Request 40632: Enabled oversubscribed resources for reservations in allocator.

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

(Updated 一月 23, 2016, 3:18 a.m.)


Review request for mesos, Ben Mahler, Artem Harutyunyan, Joris Van Remoortere, Joseph Wu, Klaus Ma, and Jian Qiu.


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


Repository: mesos


Description (updated)
-------

Enabled oversubscribed resources for reservations in allocator.


Diffs (updated)
-----

  src/master/allocator/mesos/hierarchical.cpp 65c7e6b15c5308c0910667e1b12f39b21293a316 
  src/tests/hierarchical_allocator_tests.cpp b1cb955b7eb1213c7ba4a9c5181545bb49154f06 

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


Testing
-------

make
make check
GLOG_v=2  ./bin/mesos-tests.sh  --gtest_filter="HierarchicalAllocatorTest.*" --verbose --gtest_repeat=100 --gtest_shuffle


Thanks,

Guangya Liu


Re: Review Request 40632: Enabled oversubscribed resources for reservations in allocator.

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

(Updated 一月 20, 2016, 6:25 a.m.)


Review request for mesos, Ben Mahler, Artem Harutyunyan, Joris Van Remoortere, Joseph Wu, Klaus Ma, and Jian Qiu.


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


Repository: mesos


Description
-------

Enabled oversubscribed resources for reservations in allocator.
The allocator part including 5 patches:
1) https://reviews.apache.org/r/40632 Enabled oversubscribed resources for reservations in allocator
2) https://reviews.apache.org/r/41847 Updated allocation slack when slave was updated.
3) https://reviews.apache.org/r/41791 Updated allocation slack for dynamic reserve (1/3).
4) https://reviews.apache.org/r/42113 Handle unreserve logic for dynamic reservation (2/3).
5) https://reviews.apache.org/r/42194 Handle unreserve logic for dynamic reservation (3/3).


Diffs (updated)
-----

  src/master/allocator/mesos/hierarchical.cpp e32ee4aa3ed9793bb5a99233e699e5cc2bdd796b 
  src/tests/hierarchical_allocator_tests.cpp 953712149bd951789beb29c72779c4ac65aa48dc 

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


Testing (updated)
-------

make
make check
GLOG_v=2  ./bin/mesos-tests.sh  --gtest_filter="HierarchicalAllocatorTest.*" --verbose --gtest_repeat=100 --gtest_shuffle


Thanks,

Guangya Liu


Re: Review Request 40632: Enabled oversubscribed resources for reservations in allocator.

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

(Updated 一月 19, 2016, 8:03 a.m.)


Review request for mesos, Ben Mahler, Artem Harutyunyan, Joris Van Remoortere, Joseph Wu, Klaus Ma, and Jian Qiu.


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


Repository: mesos


Description
-------

Enabled oversubscribed resources for reservations in allocator.
The allocator part including 5 patches:
1) https://reviews.apache.org/r/40632 Enabled oversubscribed resources for reservations in allocator
2) https://reviews.apache.org/r/41847 Updated allocation slack when slave was updated.
3) https://reviews.apache.org/r/41791 Updated allocation slack for dynamic reserve (1/3).
4) https://reviews.apache.org/r/42113 Handle unreserve logic for dynamic reservation (2/3).
5) https://reviews.apache.org/r/42194 Handle unreserve logic for dynamic reservation (3/3).


Diffs (updated)
-----

  src/master/allocator/mesos/hierarchical.cpp 48acde69b1a2f305b568a7e322a58708063dd30a 
  src/tests/hierarchical_allocator_tests.cpp 9362dd306497ba01e0f387c3862456cdcac6f863 

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


Testing
-------

make
make check
GLOG_v=2 ./bin/mesos-tests.sh  --gtest_filter="HierarchicalAllocatorTest.*" --verbose


Thanks,

Guangya Liu


Re: Review Request 40632: Enabled oversubscribed resources for reservations in allocator.

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

(Updated 一月 16, 2016, 7:51 a.m.)


Review request for mesos, Ben Mahler, Artem Harutyunyan, Joris Van Remoortere, Joseph Wu, Klaus Ma, and Jian Qiu.


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


Repository: mesos


Description
-------

Enabled oversubscribed resources for reservations in allocator.
The allocator part including 5 patches:
1) https://reviews.apache.org/r/40632 Enabled oversubscribed resources for reservations in allocator
2) https://reviews.apache.org/r/41847 Updated allocation slack when slave was updated.
3) https://reviews.apache.org/r/41791 Updated allocation slack for dynamic reserve (1/3).
4) https://reviews.apache.org/r/42113 Handle unreserve logic for dynamic reservation (2/3).
5) https://reviews.apache.org/r/42194 Handle unreserve logic for dynamic reservation (3/3).


Diffs (updated)
-----

  src/master/allocator/mesos/hierarchical.cpp 72e69a0f42dd724713f2a7a75f1b92ef16eb5569 
  src/tests/hierarchical_allocator_tests.cpp 9362dd306497ba01e0f387c3862456cdcac6f863 

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


Testing
-------

make
make check
GLOG_v=2 ./bin/mesos-tests.sh  --gtest_filter="HierarchicalAllocatorTest.*" --verbose


Thanks,

Guangya Liu


Re: Review Request 40632: Enabled oversubscribed resources for reservations in allocator.

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

(Updated 一月 16, 2016, 7:38 a.m.)


Review request for mesos, Ben Mahler, Artem Harutyunyan, Joris Van Remoortere, Joseph Wu, Klaus Ma, and Jian Qiu.


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


Repository: mesos


Description (updated)
-------

Enabled oversubscribed resources for reservations in allocator.
The allocator part including 5 patches:
1) https://reviews.apache.org/r/40632 Enabled oversubscribed resources for reservations in allocator
2) https://reviews.apache.org/r/41847 Updated allocation slack when slave was updated.
3) https://reviews.apache.org/r/41791 Updated allocation slack for dynamic reserve (1/3).
4) https://reviews.apache.org/r/42113 Handle unreserve logic for dynamic reservation (2/3).
5) https://reviews.apache.org/r/42194 Handle unreserve logic for dynamic reservation (3/3).


Diffs (updated)
-----

  src/master/allocator/mesos/hierarchical.cpp 72e69a0f42dd724713f2a7a75f1b92ef16eb5569 
  src/tests/hierarchical_allocator_tests.cpp 9362dd306497ba01e0f387c3862456cdcac6f863 

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


Testing
-------

make
make check
GLOG_v=2 ./bin/mesos-tests.sh  --gtest_filter="HierarchicalAllocatorTest.*" --verbose


Thanks,

Guangya Liu


Re: Review Request 40632: Enabled oversubscribed resources for reservations in allocator.

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

(Updated 一月 13, 2016, 12:39 p.m.)


Review request for mesos, Ben Mahler, Artem Harutyunyan, Joris Van Remoortere, Joseph Wu, Klaus Ma, and Jian Qiu.


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


Repository: mesos


Description (updated)
-------

Enabled oversubscribed resources for reservations in allocator.

There are five patches handling the allocator part:
1) This patch handles send offer, add slave and quota integration test.
2) https://reviews.apache.org/r/41847/ Handles the case of update slave.
3) https://reviews.apache.org/r/41791/ Handles the case of dynamic reservations (1/3).
4) https://reviews.apache.org/r/42113/ Handle unreserve logic for dynamic reservation (2/3)
5) https://reviews.apache.org/r/42194/ Handle unreserve logic for dynamic reservation (3/3)


Diffs (updated)
-----

  src/master/allocator/mesos/hierarchical.cpp d541bfa3f4190865c65d35c9d1ffdb8a3f194056 
  src/tests/hierarchical_allocator_tests.cpp e044f832c2c16e53e663c6ced5452649bb0dcb59 

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


Testing
-------

make
make check
GLOG_v=2 ./bin/mesos-tests.sh  --gtest_filter="HierarchicalAllocatorTest.*" --verbose


Thanks,

Guangya Liu


Re: Review Request 40632: Enabled oversubscribed resources for reservations in allocator.

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

(Updated 一月 13, 2016, 2:24 a.m.)


Review request for mesos, Ben Mahler, Artem Harutyunyan, Joris Van Remoortere, Joseph Wu, Klaus Ma, and Jian Qiu.


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


Repository: mesos


Description (updated)
-------

Enabled oversubscribed resources for reservations in allocator.

There are three patches handling the allocator part:
1) This patch handles send offer, add slave and quota integration test.
2) https://reviews.apache.org/r/41847/ Handles the case of update slave.
3) https://reviews.apache.org/r/41791/ Handles the case of dynamic reservations.
4?https://reviews.apache.org/r/42113/ Handle unreserve logic for dynamic reservation (1/2)
5?https://reviews.apache.org/r/42194/ Handle unreserve logic for dynamic reservation (1/2)


Diffs (updated)
-----

  src/master/allocator/mesos/hierarchical.cpp df8bccaf2b8cfc0cb5ca18d4867371ae7a84c12f 
  src/tests/hierarchical_allocator_tests.cpp e044f832c2c16e53e663c6ced5452649bb0dcb59 

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


Testing (updated)
-------

make
make check
GLOG_v=2 ./bin/mesos-tests.sh  --gtest_filter="HierarchicalAllocatorTest.*" --verbose


Thanks,

Guangya Liu


Re: Review Request 40632: Enabled oversubscribed resources for reservations in allocator.

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

(Updated 一月 8, 2016, 6:55 a.m.)


Review request for mesos, Ben Mahler, Artem Harutyunyan, Joris Van Remoortere, Joseph Wu, Klaus Ma, and Jian Qiu.


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


Repository: mesos


Description
-------

Enabled oversubscribed resources for reservations in allocator.

There are three patches handling the allocator part:
1) This patch handles send offer, add slave and quota integration test.
2) https://reviews.apache.org/r/41847/ Handles the case of update slave.
3) https://reviews.apache.org/r/41791/ Handles the case of dynamic reservations.


Diffs (updated)
-----

  src/master/allocator/mesos/hierarchical.cpp df8bccaf2b8cfc0cb5ca18d4867371ae7a84c12f 
  src/tests/hierarchical_allocator_tests.cpp e044f832c2c16e53e663c6ced5452649bb0dcb59 

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


Testing
-------

make
make check


Thanks,

Guangya Liu


Re: Review Request 40632: Enabled oversubscribed resources for reservations in allocator.

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

(Updated 一月 8, 2016, 2:34 a.m.)


Review request for mesos, Ben Mahler, Artem Harutyunyan, Joris Van Remoortere, Joseph Wu, Klaus Ma, and Jian Qiu.


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


Repository: mesos


Description (updated)
-------

Enabled oversubscribed resources for reservations in allocator.

There are three patches handling the allocator part:
1) This patch handles send offer, add slave and quota integration test.
2) https://reviews.apache.org/r/41847/ Handles the case of update slave.
3) https://reviews.apache.org/r/41791/ Handles the case of dynamic reservations.


Diffs (updated)
-----

  src/master/allocator/mesos/hierarchical.cpp df8bccaf2b8cfc0cb5ca18d4867371ae7a84c12f 
  src/tests/hierarchical_allocator_tests.cpp e044f832c2c16e53e663c6ced5452649bb0dcb59 

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


Testing
-------

make
make check


Thanks,

Guangya Liu


Re: Review Request 40632: Enabled oversubscribed resources for reservations in allocator.

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

> On 一月 7, 2016, 11:51 a.m., Klaus Ma wrote:
> > src/master/allocator/mesos/hierarchical.cpp, line 1379
> > <https://reviews.apache.org/r/40632/diff/11/?file=1186198#file1186198line1379>
> >
> >     Add `allocation slack resource` if any

`resources.unreserved()` already include allocation slack.


- Guangya


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


On 一月 7, 2016, 11:27 a.m., Guangya Liu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40632/
> -----------------------------------------------------------
> 
> (Updated 一月 7, 2016, 11:27 a.m.)
> 
> 
> Review request for mesos, Ben Mahler, Artem Harutyunyan, Joris Van Remoortere, Joseph Wu, Klaus Ma, and Jian Qiu.
> 
> 
> Bugs: MESOS-4145
>     https://issues.apache.org/jira/browse/MESOS-4145
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Enabled oversubscribed resources for reservations in allocator.
> 
> 
> Diffs
> -----
> 
>   src/master/allocator/mesos/hierarchical.cpp df8bccaf2b8cfc0cb5ca18d4867371ae7a84c12f 
>   src/tests/hierarchical_allocator_tests.cpp e044f832c2c16e53e663c6ced5452649bb0dcb59 
> 
> Diff: https://reviews.apache.org/r/40632/diff/
> 
> 
> Testing
> -------
> 
> make
> make check
> 
> 
> Thanks,
> 
> Guangya Liu
> 
>


Re: Review Request 40632: Enabled oversubscribed resources for reservations in allocator.

Posted by Klaus Ma <kl...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/40632/#review113240
-----------------------------------------------------------



src/master/allocator/mesos/hierarchical.cpp (line 1379)
<https://reviews.apache.org/r/40632/#comment173738>

    Add `allocation slack resource` if any


- Klaus Ma


On Jan. 7, 2016, 7:27 p.m., Guangya Liu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40632/
> -----------------------------------------------------------
> 
> (Updated Jan. 7, 2016, 7:27 p.m.)
> 
> 
> Review request for mesos, Ben Mahler, Artem Harutyunyan, Joris Van Remoortere, Joseph Wu, Klaus Ma, and Jian Qiu.
> 
> 
> Bugs: MESOS-4145
>     https://issues.apache.org/jira/browse/MESOS-4145
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Enabled oversubscribed resources for reservations in allocator.
> 
> 
> Diffs
> -----
> 
>   src/master/allocator/mesos/hierarchical.cpp df8bccaf2b8cfc0cb5ca18d4867371ae7a84c12f 
>   src/tests/hierarchical_allocator_tests.cpp e044f832c2c16e53e663c6ced5452649bb0dcb59 
> 
> Diff: https://reviews.apache.org/r/40632/diff/
> 
> 
> Testing
> -------
> 
> make
> make check
> 
> 
> Thanks,
> 
> Guangya Liu
> 
>


Re: Review Request 40632: Enabled oversubscribed resources for reservations in allocator.

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

(Updated 一月 7, 2016, 11:27 a.m.)


Review request for mesos, Ben Mahler, Artem Harutyunyan, Joris Van Remoortere, Joseph Wu, Klaus Ma, and Jian Qiu.


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


Repository: mesos


Description
-------

Enabled oversubscribed resources for reservations in allocator.


Diffs (updated)
-----

  src/master/allocator/mesos/hierarchical.cpp df8bccaf2b8cfc0cb5ca18d4867371ae7a84c12f 
  src/tests/hierarchical_allocator_tests.cpp e044f832c2c16e53e663c6ced5452649bb0dcb59 

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


Testing
-------

make
make check


Thanks,

Guangya Liu


Re: Review Request 40632: Enabled oversubscribed resources for reservations in allocator.

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

> On 一月 7, 2016, 6:55 a.m., Klaus Ma wrote:
> > src/master/allocator/mesos/hierarchical.cpp, line 1350
> > <https://reviews.apache.org/r/40632/diff/10/?file=1180362#file1180362line1350>
> >
> >     It does not include `ALLOCATIONS_SLACK` in `remainingClusterResources`; so if account `remainingAllocationSlack` in `allocatedForWDRF`, the check of `remainingClusterResources.contains(allocatedForWDRF + resources)` will be always false.

The `remainingClusterResources` DOES include all revocable resoruces including both usgae slack and allocation slack. Please refer to https://github.com/apache/mesos/blob/master/src/master/allocator/mesos/hierarchical.cpp#L1220-L1224


- Guangya


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


On 一月 3, 2016, 9:21 a.m., Guangya Liu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40632/
> -----------------------------------------------------------
> 
> (Updated 一月 3, 2016, 9:21 a.m.)
> 
> 
> Review request for mesos, Ben Mahler, Artem Harutyunyan, Joris Van Remoortere, Joseph Wu, Klaus Ma, and Jian Qiu.
> 
> 
> Bugs: MESOS-4145
>     https://issues.apache.org/jira/browse/MESOS-4145
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Enabled oversubscribed resources for reservations in allocator.
> 
> 
> Diffs
> -----
> 
>   src/master/allocator/mesos/hierarchical.cpp 7f900c4e024485704d79e57ae22407557598fe6c 
>   src/tests/hierarchical_allocator_tests.cpp e044f832c2c16e53e663c6ced5452649bb0dcb59 
> 
> Diff: https://reviews.apache.org/r/40632/diff/
> 
> 
> Testing
> -------
> 
> make
> make check
> 
> 
> Thanks,
> 
> Guangya Liu
> 
>


Re: Review Request 40632: Enabled oversubscribed resources for reservations in allocator.

Posted by Klaus Ma <kl...@gmail.com>.

> On Jan. 7, 2016, 2:55 p.m., Klaus Ma wrote:
> > src/master/allocator/mesos/hierarchical.cpp, line 1350
> > <https://reviews.apache.org/r/40632/diff/10/?file=1180362#file1180362line1350>
> >
> >     It does not include `ALLOCATIONS_SLACK` in `remainingClusterResources`; so if account `remainingAllocationSlack` in `allocatedForWDRF`, the check of `remainingClusterResources.contains(allocatedForWDRF + resources)` will be always false.
> 
> Guangya Liu wrote:
>     The `remainingClusterResources` DOES include all revocable resoruces including both usgae slack and allocation slack. Please refer to https://github.com/apache/mesos/blob/master/src/master/allocator/mesos/hierarchical.cpp#L1220-L1224

Yes, that's OK :)


- Klaus


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


On Jan. 7, 2016, 7:27 p.m., Guangya Liu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40632/
> -----------------------------------------------------------
> 
> (Updated Jan. 7, 2016, 7:27 p.m.)
> 
> 
> Review request for mesos, Ben Mahler, Artem Harutyunyan, Joris Van Remoortere, Joseph Wu, Klaus Ma, and Jian Qiu.
> 
> 
> Bugs: MESOS-4145
>     https://issues.apache.org/jira/browse/MESOS-4145
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Enabled oversubscribed resources for reservations in allocator.
> 
> 
> Diffs
> -----
> 
>   src/master/allocator/mesos/hierarchical.cpp df8bccaf2b8cfc0cb5ca18d4867371ae7a84c12f 
>   src/tests/hierarchical_allocator_tests.cpp e044f832c2c16e53e663c6ced5452649bb0dcb59 
> 
> Diff: https://reviews.apache.org/r/40632/diff/
> 
> 
> Testing
> -------
> 
> make
> make check
> 
> 
> Thanks,
> 
> Guangya Liu
> 
>


Re: Review Request 40632: Enabled oversubscribed resources for reservations in allocator.

Posted by Klaus Ma <kl...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/40632/#review113193
-----------------------------------------------------------



src/master/allocator/mesos/hierarchical.cpp (line 1350)
<https://reviews.apache.org/r/40632/#comment173699>

    It does not include `ALLOCATIONS_SLACK` in `remainingClusterResources`; so if account `remainingAllocationSlack` in `allocatedForWDRF`, the check of `remainingClusterResources.contains(allocatedForWDRF + resources)` will be always false.



src/tests/hierarchical_allocator_tests.cpp (line 210)
<https://reviews.apache.org/r/40632/#comment173681>

    add blank line.


- Klaus Ma


On Jan. 3, 2016, 5:21 p.m., Guangya Liu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40632/
> -----------------------------------------------------------
> 
> (Updated Jan. 3, 2016, 5:21 p.m.)
> 
> 
> Review request for mesos, Ben Mahler, Artem Harutyunyan, Joris Van Remoortere, Joseph Wu, Klaus Ma, and Jian Qiu.
> 
> 
> Bugs: MESOS-4145
>     https://issues.apache.org/jira/browse/MESOS-4145
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Enabled oversubscribed resources for reservations in allocator.
> 
> 
> Diffs
> -----
> 
>   src/master/allocator/mesos/hierarchical.cpp 7f900c4e024485704d79e57ae22407557598fe6c 
>   src/tests/hierarchical_allocator_tests.cpp e044f832c2c16e53e663c6ced5452649bb0dcb59 
> 
> Diff: https://reviews.apache.org/r/40632/diff/
> 
> 
> Testing
> -------
> 
> make
> make check
> 
> 
> Thanks,
> 
> Guangya Liu
> 
>


Re: Review Request 40632: Enabled oversubscribed resources for reservations in allocator.

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

(Updated 一月 3, 2016, 9:21 a.m.)


Review request for mesos, Ben Mahler, Artem Harutyunyan, Joris Van Remoortere, Joseph Wu, Klaus Ma, and Jian Qiu.


Summary (updated)
-----------------

Enabled oversubscribed resources for reservations in allocator.


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


Repository: mesos


Description
-------

Enabled oversubscribed resources for reservations in allocator.


Diffs
-----

  src/master/allocator/mesos/hierarchical.cpp 7f900c4e024485704d79e57ae22407557598fe6c 
  src/tests/hierarchical_allocator_tests.cpp e044f832c2c16e53e663c6ced5452649bb0dcb59 

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


Testing
-------

make
make check


Thanks,

Guangya Liu


Re: Review Request 40632: WIP: Enabled oversubscribed resources for reservations in allocator.

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

(Updated 一月 3, 2016, 3:03 a.m.)


Review request for mesos, Klaus Ma and Jian Qiu.


Repository: mesos


Description
-------

Enabled oversubscribed resources for reservations in allocator.


Diffs (updated)
-----

  src/master/allocator/mesos/hierarchical.cpp 7f900c4e024485704d79e57ae22407557598fe6c 
  src/tests/hierarchical_allocator_tests.cpp e044f832c2c16e53e663c6ced5452649bb0dcb59 

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


Testing
-------

make
make check


Thanks,

Guangya Liu