> On June 19, 2019, 10:54 p.m., Benjamin Mahler wrote: > > Hm.. there's a relationship between the 'suppressedRoles' list and the > > reviveOffers() / suppressOffers() calls. > > > > For example, if I call reviveOffers(), I would then expect that > > 'suppressedRoles' will be cleared and won't be sent if a re-registration > > happens under the covers due to a disconnection, e.g. > > > > ``` > > updateFramework(f, ["role1", "role2"]); // UPDATE_FRAMEWORK is sent > > reviveOffers(); // REVIVE is sent, logically the master moves the > > suppressed roles from ["role1", "role2"] to []! > > // disconnection and re-registration happens > > // at this point, the driver should send [] as suppressed, since the > > scheduler unsuppressed all roles > > // (but it sends ["role1", "role2"] in this patch) > > ``` > > > > Similarly for suppressOffers() where all of the roles become suppressed. > > > > If we add role(s) arguments to reviveOffers() / suppressOffers() then they > > would be removing items from the suppressed set rather than clearing and > > assigning it entirely.
Good point. Now I'm wondering if the already existing behaviour of suppressOffers() + reconnection is valid. Consder a similar chain of events: - framework starts the driver - framework calls suppressOffers() - due to some reason, driver reconnects (to the same master or to the new one), all roles are active again Is this a desired behaviour, or something that existing frameworks all have to prevent on their own? (By calling suppressOffers() on reregistered(), I would guess ?..) - Andrei ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/70894/#review215983 ----------------------------------------------------------- On June 19, 2019, 6:26 p.m., Andrei Sekretenko wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/70894/ > ----------------------------------------------------------- > > (Updated June 19, 2019, 6:26 p.m.) > > > Review request for mesos and Benjamin Mahler. > > > Bugs: MESOS-9793 > https://issues.apache.org/jira/browse/MESOS-9793 > > > Repository: mesos > > > Description > ------- > > This patch adds a list of suppressed roles to the arguments of > scheduler driver's updateFramework() method to make it possible > for V0 frameworks to selectively suppress/revive offers. > > > Diffs > ----- > > include/mesos/scheduler.hpp 8c6774885ceb3b0644c32842a17fba39e2c3e472 > src/sched/sched.cpp e6cc534264e3ff4edaa703a660afb2f896388802 > > > Diff: https://reviews.apache.org/r/70894/diff/1/ > > > Testing > ------- > > make check > `./bin/mesos-tests.sh --gtest_filter="UpdateFrameworkV0*" > --gtest_break_on_failure --gtest_repeat=1000` > > +a new test from the depending patch > > > Thanks, > > Andrei Sekretenko > >