mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Peach <jpe...@apache.org>
Subject Re: Review Request 58305: Add some parameter validation to ReRegisterSlaveMessage.
Date Thu, 20 Apr 2017 00:03:49 GMT


> On April 19, 2017, 11:06 p.m., Neil Conway wrote:
> > src/master/validation.cpp
> > Line 835 (original), 928 (patched)
> > <https://reviews.apache.org/r/58305/diff/8/?file=1695103#file1695103line931>
> >
> >     I wonder if we should move this `internal::validateResources` call down to `validation::validate`
below. Then we'll be calling `validateResources` for the `ExecutorInfo.resources` in both
cases. I think this would also let us remove the `error = Resources::validate(executor.resources());`
call on line 271, no?

Applying this overload of `validateResources` breaks `UpgradeTest.ReregisterOldAgentWithMultiRoleMaster`:
```
W0419 17:06:51.073256 17647 master.cpp:5574] Dropping re-registration of agent at slave(1)@17.228.224.108:32931
because it sent invalid state: Invalid executor resources: The resources are not allocated
to a role
```


- James


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


On April 19, 2017, 10:49 p.m., James Peach wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58305/
> -----------------------------------------------------------
> 
> (Updated April 19, 2017, 10:49 p.m.)
> 
> 
> Review request for mesos, Mesos Reviewbot and Neil Conway.
> 
> 
> Bugs: MESOS-7372
>     https://issues.apache.org/jira/browse/MESOS-7372
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> The ReRegisterSlaveMessage message sends a number of fields which have
> internal consistency requirements. Add some simple validation checks
> to ensure that we have a minimally consistent re-registration request
> before proceeding.
> 
> 
> Diffs
> -----
> 
>   src/master/master.cpp 52de2f91bdacf46f913c27382ad50b4f278ad297 
>   src/master/validation.hpp d96287de73ddb30ae2ed841c1b910b0ac6cfa74e 
>   src/master/validation.cpp 3f70875484bbd856ac79a7d6070ac313d69782fa 
>   src/tests/master_validation_tests.cpp 555380870ae115004312cfbe9f145faa92049030 
> 
> 
> Diff: https://reviews.apache.org/r/58305/diff/8/
> 
> 
> Testing
> -------
> 
> Make check (Fedora 25). Internal fuzzing.
> 
> 
> Thanks,
> 
> James Peach
> 
>


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