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

Quota may be under allocated for disk resources.

    XMLWordPrintableJSON

Details

    • Resource Mgmt RI12 Sp 43
    • 2

    Description

      Due to a bug in the resources chopping logic:
      https://github.com/apache/mesos/blob/1915150c6a83cd95197e25a68a6adf9b3ef5fb11/src/master/allocator/mesos/hierarchical.cpp#L1665-L1668

            if (Resources::shrink(&resource, limitScalar.get())) {
              targetScalarQuantites[resource.name()] -= limitScalar.get(); // bug
              result += std::move(resource);
            }
      

      When chopping different resources with the same name (e.g. vanilla disk and mount disk), we only include one of the resources. For example, if a role has a quota of 100disk, and an agent has 50 vanilla disk and 50 mount disk, the offer will only contain 50 disk (either vanilla or the mount type). The correct behavior should be that both disks should be offered.

      Since today, only disk resources might have the same name but different meta-data (for unreserved/nonrevocable/nonshared resources – we only chop this), this bug should only affect disk resources today.

      The correct code should be:

            if (Resources::shrink(&resource, limitScalar.get())) {
              targetScalarQuantites[resource.name()] -= resource.scalar(); // Only subtract the shrunk resource scalar
              result += std::move(resource);
            }
      

      Attachments

        Activity

          People

            mzhu Meng Zhu
            mzhu Meng Zhu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: