Hello Qian, Yes, dynamic reservation (at least currently) is per role, rather than the framework level. The main motivation for such a design was based on the following thought: "dynamic reservation should simply be a dynamic version of the existing static reservation."
You're absolutely right that if multiple frameworks are in the same role, the resources reserved for that role can be offered to any of the frameworks in that role. The justification for this behavior is that: that's what happens if we were to statically reserve resources for a role, and have multiple frameworks in it anyway. If a framework requires sole ownership of the resources, the operator is required to create a role for that framework only. Having said that, I've argued for per-framework reservation. The obvious benefits are that (1) no need to worry about resources potentially being shared, (2) no need for operators to set up the ACLs to enforce sole ownership of resources, etc. An implied benefit is that Mesos can automatically unreserve the resources reserved by the framework if the framework leaves and exceeds its reregistration_timeout. I still believe the per-framework reservation makes more sense, and as long as there's enough interest for them, we'll get to work on it as follow-up, post-MVP work. Thanks, MPark. On Sun, Aug 30, 2015 at 9:35 AM Qian AZ Zhang <[email protected]> wrote: > > > Hi, > > I took a look at dynamic reservation design doc and the related code in > Mesos master, it seem dynamic reservation works in role level rather than > in framework level, that means a framework can only reserve some resources > for its role rather than itself. If so, then I am thinking about this case: > both Cassandra framework and HDFS framework belongs to role1, and HDFS > dynamically reserves some resources in a slave for role1, then I think it > may be possible for allocator to offer those resources to Cassandra since > it also belongs to role1, but actually HDFS expects to be offered with > those resources to launch its tasks. > > Please anyone correct me if my understanding above was wrong, thanks! > > > Regards, > Qian Zhang
