> On Jan. 29, 2017, 8:02 a.m., Michael Park wrote:
> > src/common/resources.cpp, lines 1257-1261
> > <https://reviews.apache.org/r/55828/diff/1/?file=1613177#file1613177line1257>
> >
> >     We talked about how this condition probably isn't necessary since we 
> > set the `AllocationInfo` in
> >     `Offer::Operation`s in the master (and redundantly in the allocator).
> >     
> >     Please let me know how that turned out!

I can remove this one since we do the injection at the call-sites. For now I'll 
leave in the second case but put a TODO to consider call-sites performing the 
stripping of allocation info when necessary.


> On Jan. 29, 2017, 8:02 a.m., Michael Park wrote:
> > src/common/resources.cpp, line 1339
> > <https://reviews.apache.org/r/55828/diff/1/?file=1613177#file1613177line1339>
> >
> >     Shouldn't we print `unreserved` as opposed to `adjustedReservation` 
> > here?

If we were to print the pre-adjusted resource the error seems weird because it 
will never contain the resource. I think we'll move towards removing adjustment 
entirely from `Resources::apply()` and having call-site adjust (either inject 
or strip). I put a TODO for this.


- Benjamin


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


On Jan. 23, 2017, 10:47 p.m., Benjamin Mahler wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/55828/
> -----------------------------------------------------------
> 
> (Updated Jan. 23, 2017, 10:47 p.m.)
> 
> 
> Review request for mesos, Benjamin Bannier, Jay Guo, Guangya Liu, and Michael 
> Park.
> 
> 
> Bugs: MESOS-6967
>     https://issues.apache.org/jira/browse/MESOS-6967
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Previously, `Resource` did not contain `AllocationInfo`. So for
> backwards compatibility with old schedulers and tooling, we must
> allow operations to contain `Resource`s without an allocation role.
> The two interesting cases for adjusting the operation's resource are:
> 
> (1) The operation `Resource` does not contain an `AllocationInfo`
>     but is being applied to an allocated `Resources`. We allow this
>     only if the operation is unambiguous, that is, the allocated
>     `Resources` are only allocated to a single role.
> 
> (2) The operation `Resource` contains an `AllocationInfo` but is
>     being applied to an unallocated `Resources`. In this case we
>     simply ignore the `AllocationInfo` of the `Resource`.
> 
> Note that we assume no `Resources` store a mix of allocated and
> unallocated resources. This is a brittle assumption that we should
> have enforcement for.
> 
> 
> Diffs
> -----
> 
>   src/common/resources.cpp be9bca2063e9f0e60c5faa0142077bea56272e45 
>   src/tests/resources_tests.cpp 8dfb1be35d9f9c6ff69139d055c6b3d3ec475e68 
>   src/tests/resources_utils.hpp 18dcca7f171102df8fe88f10785f70c5d1cf5b32 
>   src/v1/resources.cpp da4701c03020ff9c33ef995cd0af437d8827c267 
> 
> Diff: https://reviews.apache.org/r/55828/diff/
> 
> 
> Testing
> -------
> 
> Added a test.
> 
> 
> Thanks,
> 
> Benjamin Mahler
> 
>

Reply via email to