mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Bannier <bbann...@apache.org>
Subject Re: Review Request 61183: Triggered 'UpdateSlaveMessage' when 'ResourceProviderManager' updates.
Date Thu, 02 Nov 2017 01:57:06 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/61183/
-----------------------------------------------------------

(Updated Nov. 2, 2017, 2:57 a.m.)


Review request for mesos, Jie Yu and Jan Schlicht.


Changes
-------

Reopened and rebased as patch was reverted in `a3faf6cf854cd64271bff7246ace13acfa37e731`.


Repository: mesos


Description
-------

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.

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
registered.

To facilitate logging we add a stringification function for
'ResourceProviderMessage's.

This patch also adjusts a number of tests to no expect two
'UpdateSlaveMessage's.


Diffs (updated)
-----

  src/resource_provider/message.hpp 3c7c3f2baeb726e04edd6ffbb9784699d7afe521 
  src/slave/slave.hpp df1b0205124555dcb6a0efa5c237f5e77fa2bdf7 
  src/slave/slave.cpp 337083dbe60bba2d3773b785bdceeaf0b8fcd070 
  src/tests/oversubscription_tests.cpp d262bbe06787f70427f4f7820e64891c7d1b5552 
  src/tests/slave_tests.cpp aae5e6021b46793fa2b871aaa738f61c8cfb88ce 


Diff: https://reviews.apache.org/r/61183/diff/18/

Changes: https://reviews.apache.org/r/61183/diff/17-18/


Testing
-------

Tested on a number of platforms on internal CI.


Thanks,

Benjamin Bannier


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