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

Master/Allocator does not send InverseOffers to resources to be maintained

    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.25.0
    • allocation, master
    • Mesosphere Sprint 16, Mesosphere Sprint 17, Mesosphere Sprint 18
    • 8

    Description

      Offers are currently sent from master/allocator to framework via ResourceOffersMessage's. InverseOffers, which are roughly equivalent to negative Offers, can be sent in the same package.
      In src/messages/messages.proto

      message ResourceOffersMessage {
        repeated Offer offers = 1;
        repeated string pids = 2;
      
        // New field with InverseOffers
        repeated InverseOffer inverseOffers = 3;
      }
      

      Sent InverseOffers can be tracked in the master's local state:
      i.e. In src/master/master.hpp:

      struct Slave {
        ... // Existing fields.
      
        // Active InverseOffers on this slave.
        // Similar pattern to the "offers" field
        hashset<InverseOffer*> inverseOffers;
      }
      

      One actor (master or allocator) should populate the new InverseOffers field.

      • In master (src/master/master.cpp)
        • Master::offer is where the ResourceOffersMessage and Offer object is constructed.
        • The same method could also check for maintenance and send InverseOffers.
      • In the allocator (src/master/allocator/mesos/hierarchical.hpp)
        • HierarchicalAllocatorProcess::allocate is where slave resources are aggregated an sent off to the frameworks.
        • InverseOffers (i.e. negative resources) allocation could be calculated in this method.
        • A change to Master::offer (i.e. the "offerCallback") may be necessary to account for the negative resources.

      Possible test(s):

      • InverseOfferTest
        • Start master, slave, framework.
        • Accept resource offer, start task.
        • Set maintenance schedule to the future.
        • Check that InverseOffer(s) are sent to the framework.
        • Decline InverseOffer.
        • Check that more InverseOffer(s) are sent.
        • Accept InverseOffer.
        • Check that more InverseOffer(s) are sent.

      Attachments

        Issue Links

          Activity

            People

              jvanremoortere Joris Van Remoortere
              kaysoky Joseph Wu
              Benjamin Hindman Benjamin Hindman
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: