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




src/master/master.cpp (lines 6943 - 6944)
<https://reviews.apache.org/r/56530/#comment237678>

    It seems like if we recover resources here, there is nothing preventing the 
allocator from offering the exact same resources again immediately. In that 
case allocation progress could be blocked indefinitely as the allocator 
prepares an offer which the master immediately filters.
    
    Another possibility might be to directly filter frameworks in the allocator 
loop like we already do for GPUs, 
https://github.com/apache/mesos/blob/7012ee28a5a91f4e6427bc134a99feb9536cb4e0/src/master/allocator/mesos/hierarchical.cpp#L1525-L1531.
 For that we'd need to store agent capabilities in 
`HierarchicalAllocatorProcess::Slave` to perform the filtering.
    
    The downside of that approach is of course that all of this handling would 
be specifically patched into the hierarchical allocator making writing proper 
custom allocators even harder, but I cannot see another way to perform 
filtering in a deadlock-safe way. Do you have an idea?


- Benjamin Bannier


On Feb. 15, 2017, 7:44 a.m., Jay Guo wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/56530/
> -----------------------------------------------------------
> 
> (Updated Feb. 15, 2017, 7:44 a.m.)
> 
> 
> Review request for mesos, Benjamin Bannier, Benjamin Mahler, Guangya Liu, and 
> Michael Park.
> 
> 
> Bugs: MESOS-6940
>     https://issues.apache.org/jira/browse/MESOS-6940
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> In a mixed cluster, when an old agent (not MULTI_ROLE capable)
> registers with new master (MULTI_ROLE capable), it cannot correctly
> handle tasks from a MULTI_ROLE framework. Therefore, we should
> disallow offers from these agents being sent to MULTI_ROLE frameworks.
> 
> 
> Diffs
> -----
> 
>   src/master/master.cpp dff320acd1a13995d51cc0c303edea0cdfaa336d 
>   src/tests/master_tests.cpp c8ef9d6bd9f4f8d631ac87d5e5f8dbe679a70fd1 
> 
> Diff: https://reviews.apache.org/r/56530/diff/
> 
> 
> Testing
> -------
> 
> ./bin/mesos-tests.sh 
> --gtest_filter="MasterTest.MultiRoleFrameworkDoesNotReceiveOfferFromOldAgent" 
> --gtest_break_on_failure --gtest_repeat=-1
> 
> 
> Thanks,
> 
> Jay Guo
> 
>

Reply via email to