Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
Resource Mgmt: RI13 Sp 45, Resource Mgmt: RI14 Sp 46
-
3
Description
Currently, the allocator's roles map only tracks roles that have allocations or framework subscriptions:
https://github.com/apache/mesos/blob/1.7.2/src/master/allocator/mesos/hierarchical.hpp#L531-L535
And we separately track a map of total reservations for each role:
https://github.com/apache/mesos/blob/1.7.2/src/master/allocator/mesos/hierarchical.hpp#L541-L547
Confusingly, the roles map won't have an entry when there is a reservation for a role but no allocations or frameworks subscribed. We should ensure that the map has an entry when there are reservations. Also, we can consolidate the reservation information and framework ids into the same map, e.g.:
struct Role { hashset<FrameworkID> frameworkIds; ResourceQuantities totalReservations; }; hashmap<string, Role> roles;