Joseph Wu created MESOS-3042:
--------------------------------
Summary: Master/Allocator should send InverseOffers to any
resources to be maintained
Key: MESOS-3042
URL: https://issues.apache.org/jira/browse/MESOS-3042
Project: Mesos
Issue Type: Task
Components: allocation, master
Reporter: Joseph Wu
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
{code}
message ResourceOffersMessage {
repeated Offer offers = 1;
repeated string pids = 2;
// New field with InverseOffers
repeated InverseOffer inverseOffers = 3;
}
{code}
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.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)