Uploaded image for project: 'Mesos'
  1. Mesos
  2. MESOS-2176

Hierarchical allocator inconsistently accounts for reserved resources.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.22.0
    • allocation
    • None
    • Twitter Mesos Q4 Sprint 5
    • 5

    Description

      Looking through the allocator code for MESOS-2099, I see an issue with respect to accounting reserved resources in the sorters:

      Within HierarchicalAllocatorProcess::allocate, only unreserved resources are accounted for in the sorters, whereas everywhere else (add/remove framework, add/remove slave) we account for both reserved and unreserved.

      From git blame, it looks like this issue was introduced over a long course of refactoring and fixes to the allocator. My guess is that this was never caught due to the lack of unit-testability of the allocator (unnecessarily requires a master PID to use an allocator).

      From my understanding, the two levels of the hierarchical sorter should have the following semantics:

      1. Level 1 sorts across roles. Only unreserved resources are shared across roles, and therefore the "role sorter" for level 1 should only account for the unreserved resource pool.
      2. Level 2 sorts across frameworks, within a role. Both unreserved and reserved resources are shared across frameworks within a role, and therefore the "framework sorters" for level 2 should each account for the reserved resource pool for the role, as well as the unreserved resources allocated inside the role.

      Attachments

        Issue Links

          Activity

            People

              bmahler Benjamin Mahler
              bmahler Benjamin Mahler
              Jie Yu Jie Yu
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: