> On 一月 15, 2016, 2:34 a.m., Joseph Wu wrote:
> > src/common/resources.cpp, lines 715-719
> > <https://reviews.apache.org/r/41334/diff/8/?file=1186623#file1186623line715>
> >
> >     I'm going to revive this discussion because:
> >     
> >     1) This helper has essentially the opposite semantics of other helpers 
> > that have an `Option<string>& role` argument.  And it's not obvious why.
> >     2) This is inconsistent with `Resources::isUsageSlack` added in the 
> > next review.  Why do some revocable resources get filtered by roles and 
> > other not?
> >     3) General question: Why is it so important to filter out one role?  
> > Does it greatly simplify your implementation?  Or will you end up added 
> > lots of conditionals to deal with this case?

Actually, this is because we have one open issue for this: Do we need to offer 
the allocation slack to the role who offered those allocation slack resources, 
from the previous discussion, seems we can as the current role may also want to 
run some revocable tasks, so I think that we can remove the `role` parameter 
from here, comments?

A case is as this:
agent1: 
cpus(r1):100;mem(r1):100;cpus(*){ALLOCATION_SLACK}:100;mem(*){ALLOCATION_SLACK}:100

so when the offer from  agent1 send to framework with role `r1`, it will get 
all resources including both reserved resources and allocation slack resources, 
then the framework can select and decline resources back to mesos master based 
on task requirement.


- Guangya


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


On 一月 8, 2016, 1:12 a.m., Guangya Liu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41334/
> -----------------------------------------------------------
> 
> (Updated 一月 8, 2016, 1:12 a.m.)
> 
> 
> Review request for mesos, Ben Mahler, Artem Harutyunyan, Joris Van 
> Remoortere, Joseph Wu, and Klaus Ma.
> 
> 
> Bugs: MESOS-4146
>     https://issues.apache.org/jira/browse/MESOS-4146
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This helper function is used to filter out allocation slack resources.
> 
> 
> Diffs
> -----
> 
>   include/mesos/resources.hpp cc8fef9470d779078aa408ed03e747e5a492deaa 
>   include/mesos/v1/resources.hpp f4892977f8d7b0439db6e9cf7921334f606a496c 
>   src/common/resources.cpp 6afd2dfd81adecf7bdb3e523bc840efb62b79ef4 
>   src/tests/resources_tests.cpp e4a3435adc14f3b6b278b32348a6991543d5a320 
>   src/v1/resources.cpp 8de6672ba9b34947db81c74b8e03e8965e8af5fc 
> 
> Diff: https://reviews.apache.org/r/41334/diff/
> 
> 
> Testing
> -------
> 
> make
> make check
> 
> 
> Thanks,
> 
> Guangya Liu
> 
>

Reply via email to