mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrei Sekretenko <asekrete...@apache.org>
Subject Re: Review Request 72874: Added offer constraints to `MesosSchedulerDriver::updateFramework()`.
Date Mon, 21 Sep 2020 10:02:34 GMT


> On Sept. 18, 2020, 10:22 p.m., Benjamin Mahler wrote:
> > include/mesos/scheduler.hpp
> > Lines 375-376 (patched)
> > <https://reviews.apache.org/r/72874/diff/1/?file=2239588#file2239588line375>
> >
> >     Functionally, what is the difference between a nullptr and a default constructed
OfferConstraints proto? Or a OfferConstraints proto with a map of roles but each one having
default constructed RoleConstraints?
> >     
> >     Just wondering if we need the nullptr here (we didn't use one fr suppressed
roles, so looks inconsistent and makes one wonder the above question).
> >     
> >     Based on just looking at the offer constraints debug endpoint, we might want
to see whether the framework is capable of setting it..?

Right question, thanks for asking! 

A map of roles with default `RoleConstriants` has an entirely differentt semantics: a default-constructed
`RoleConstraints` means that there are no constraint group for this role to match anything.

When discussing the validity criteria in the design doc, we settled on disallowing empty `RoleConstraints`,
because instead of setting empty `RoleConstraints` a framework should just explicitly suppress
the role.

On the other hand, default-constructed `OfferConstraints` is a perfectly legitimate thing:
it asks Mesos to put constraints on offers for **no roles**. 
This indeed is equivalent to not setting `offer_constraints` in the `Subscribe`/`UpdateFramework`,
and, IMO, it should be kept this way in the future.

Probably I should revisit some things we previously landed: at the very least, the protobuf
comments, but probably also some places already using `Option<OffferConstraints>`.


- Andrei


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


On Sept. 16, 2020, 9:05 p.m., Andrei Sekretenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72874/
> -----------------------------------------------------------
> 
> (Updated Sept. 16, 2020, 9:05 p.m.)
> 
> 
> Review request for mesos and Benjamin Mahler.
> 
> 
> Bugs: MESOS-10189
>     https://issues.apache.org/jira/browse/MESOS-10189
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch adds an ability to set or clear V0 framework's offer
> constraints via the C++ V0 scheduler driver.
> 
> 
> Diffs
> -----
> 
>   include/mesos/scheduler.hpp 61cc846a03d2980f18fa66df1de196edc5cb4457 
>   src/java/jni/org_apache_mesos_MesosSchedulerDriver.cpp 1817bbafc4ce65ee5e58eb787e71c6d06481a32f

>   src/python/scheduler/src/mesos/scheduler/mesos_scheduler_driver_impl.cpp 256632a9589c8573cbe0f0aeb39ee6cb1e4b3256

>   src/sched/sched.cpp 768ce7d4074a1ea50b656717e25be6c38a423368 
>   src/tests/master/update_framework_tests.cpp d6c45f60cf50739aacbb507e99a5163a6cb3d1a0

>   src/tests/scheduler_driver_tests.cpp 63d7a3ba9a98d8c343324f5ad85f0b4d0cc033be 
> 
> 
> Diff: https://reviews.apache.org/r/72874/diff/1/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Andrei Sekretenko
> 
>


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