mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Bannier <>
Subject Re: Review Request 61183: Triggered 'UpdateSlaveMessage' when 'ResourceProviderManager' updates.
Date Wed, 06 Sep 2017 14:52:14 GMT

This is an automatically generated e-mail. To reply, visit:

(Updated Sept. 6, 2017, 4:52 p.m.)

Review request for mesos, Jie Yu and Jan Schlicht.


Addressed Jan's offline comments.

Repository: mesos


The agent's resource provider manager sends a
'ResourceProviderMessage' when its managed resources change. This
commit adds handling in the agent so that an 'UpdateSlaveMessage' is
sent to the master to update the total resource available on the
agent. We also store this total in the agent memory so that it can be
resent on agent resubscription.

In order to provide push-like handling of the resource provider
manager's message queue, we chain recursive calls to the handler for
continuous processing. Initially, processing is kicked off from
'Slave::initialize'. In this simple implementation we e.g., provide no
direct way to stop processing of messages, yet, but it can be achieved
by e.g., replacing the manager with a new instance (this would also
require updating routes).

Since the agent can only send an 'UpdateSlaveMessage' when it is
registered with a master, a simple back-off of 5 s is implemented which
will defer processing of a ready message should the agent not yet have

To facilitate logging we add a stringification function for

Diffs (updated)

  src/resource_provider/message.hpp 916926bf278de9ed919384a82a452d3ced06bd04 
  src/slave/slave.hpp 7d07868451e93d34ba694d40216c1e4036fd4094 
  src/slave/slave.cpp df920ec07cd59c7ba6baccfc1c20ed3809f187d6 
  src/tests/slave_tests.cpp 1bdadce4c50cbff958f2be2a4261e130b414acfd 




`make check`


Benjamin Bannier

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message