> 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? > > Guangya Liu wrote: > 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.
@Joseph, I'm removing the role paramter from the helper function as all of the roles should have same view of allocation slack. - Guangya ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/41334/#review114639 ----------------------------------------------------------- On 一月 16, 2016, 3:57 a.m., Guangya Liu wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/41334/ > ----------------------------------------------------------- > > (Updated 一月 16, 2016, 3:57 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 575d6651185d8431f01d589f4afc255cb751181a > src/tests/resources_tests.cpp b42610f1bf8eacfd7bf388d351f8745f1d96f666 > src/v1/resources.cpp 8de6672ba9b34947db81c74b8e03e8965e8af5fc > > Diff: https://reviews.apache.org/r/41334/diff/ > > > Testing > ------- > > make > make check > GLOG_v=2 ./bin/mesos-tests.sh --gtest_filter="RevocableResourceTest.Filter" > --verbose > > > Thanks, > > Guangya Liu > >
