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

Quota is not enforced properly when subroles have reservations.

    XMLWordPrintableJSON

    Details

    • Target Version/s:
    • Sprint:
      Resource Mgmt RI12 Sp 43
    • Story Points:
      3

      Description

      Note: the discussion here concerns quota enforcement for top-level role, setting quota on sublevel role is not supported.

      If a subrole directly makes a reservation, the accounting of `roleConsumedQuota` will be off:

      https://github.com/apache/mesos/blob/master/src/master/allocator/mesos/hierarchical.cpp#L1703-L1705

      Specifically, in this formula:
      `Consumed Quota = reservations + allocation - allocated reservations`

      The `reservations` part does not account subrole's reservation to its ancestors. If a reservation is made directly for role "a/b", its reservation is accounted only for "a/b" but not for "a". Similarly, if a top role ( "a") reservation is refined to a subrole ("a/b"), the current code first subtracts the reservation from "a" and then track that under "a/b".

      We should make it hierarchical-aware.

      The "allocation" and "allocated reservations" are both tracked in the sorter where the hierarchical relationship is considered – allocations are added hierarchically.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                bmahler Benjamin Mahler
                Reporter:
                mzhu Meng Zhu
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: