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, 20 Sep 2017 14:24:37 GMT

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

(Updated Sept. 20, 2017, 4:24 p.m.)

Review request for mesos, Jie Yu and Jan Schlicht.


Addressed Jie's comments, mainly

* Always send out updated total. This simplifies the agent code a lot and has minimal effects
as with the created the master would ignore redundant
agent updates. This change requires adjusting a few oversubscription tests that were only
expecting a single update.
* Improved logging in a few places.

Repository: mesos

Description (updated)

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

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

This patch also adjusts a number of tests to no expect two

Diffs (updated)

  src/resource_provider/message.hpp 3c7c3f2baeb726e04edd6ffbb9784699d7afe521 
  src/slave/slave.hpp aea1e948209c7c8945665915bc2f6d8eb47814ef 
  src/slave/slave.cpp 01020a624bdd67ee6371f607d897ad71a2cdcc82 
  src/tests/oversubscription_tests.cpp 02b10d6689dd6f01510cd2d5db2bb76b4b190eca 
  src/tests/slave_tests.cpp e9bcfefd52e1e99a7a5877b2e7c30af958ca1723 



Testing (updated)

Tested on a number of platforms on internal CI.


Benjamin Bannier

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