mesos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Rukletsov" <a...@mesosphere.io>
Subject Re: Review Request 28514: Updated WhitelistWatcher behaviour and introduced initial whitelist.
Date Fri, 26 Dec 2014 16:56:58 GMT


> On Dec. 23, 2014, 4:56 p.m., Niklas Nielsen wrote:
> > src/watcher/whitelist_watcher.cpp, lines 60-61
> > <https://reviews.apache.org/r/28514/diff/2/?file=780056#file780056line60>
> >
> >     Can you explain _why_ you only need to call the subscriber with an empty whitelist
when an initial list was provided (not only the fact that it's happening). Does that mean
that if the user doesn't specify a list, the subscriber won't be notified? I have a hard time
understanding how this fixed the gmock issue and remains correct.

The expected logic (codified in tests and leading to gmock issues) is to notify the subscriber
once and only if a change to the previous state occurs. If we do not want to use whitelist
("*" is passed) and the initial whitelist was not provided (`intialWhitelist == None()`),
the subscriber should not be notified, because no change to the previous state occurs. However,
if the initial whitelist is, for example, set to empty (`intialWhitelist == {}`) for security
reasons, then passing "*" should trigger notification.

Regarding you question, if the user does not specify a list (`intialWhitelist` defaults to
`None()`), the subscriber won't be notified only if "*" is passed.

Does it makes sense?


- Alexander


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


On Dec. 2, 2014, 11:10 a.m., Alexander Rukletsov wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/28514/
> -----------------------------------------------------------
> 
> (Updated Dec. 2, 2014, 11:10 a.m.)
> 
> 
> Review request for mesos, Cody Maloney, Niklas Nielsen, and Vinod Kone.
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> The subscriber may now provide an initial whitelist and will be notified only when the
parsed whitelist differs from the initial one. The subscriber is not explicitly notified that
there is no whitelist unless they have provided a valid initial whitelist before. This change
suppresses gmock warnings for uninteresting mock function calls.
> 
> 
> Diffs
> -----
> 
>   src/watcher/whitelist_watcher.hpp 5838854 
>   src/watcher/whitelist_watcher.cpp 32713bb 
> 
> Diff: https://reviews.apache.org/r/28514/diff/
> 
> 
> Testing
> -------
> 
> make check (Mac OS 10.9.4, Ubuntu 14.04)
> checked test log for gmock warnings.
> 
> 
> Thanks,
> 
> Alexander Rukletsov
> 
>


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