> On Jan. 31, 2017, 6:32 p.m., Michael Park wrote: > > src/master/validation.cpp, lines 1674-1700 > > <https://reviews.apache.org/r/55970/diff/1/?file=1616023#file1616023line1674> > > > > It's not clear to me why we need to unallocate the resources. > > > > Presumably the resources in `Offer::Operation`, and the resources in > > `usedResources` should have the same `AllocationInfo` set? Is this not the > > case?
There are two cases: (1) Allocated operation (framework accept) (2) Unallocated operation (http endpoint) Case 1 would be handled without changes but case 2 is not handled, so my approach is to unallocate both to perform the contains check, since we're only interested in the case where the volume is already in use. I'll add a comment to clarify this. - Benjamin ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/55970/#review163687 ----------------------------------------------------------- On Jan. 26, 2017, 1:08 a.m., Benjamin Mahler wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/55970/ > ----------------------------------------------------------- > > (Updated Jan. 26, 2017, 1:08 a.m.) > > > Review request for mesos, Benjamin Bannier, Jay Guo, Guangya Liu, and Michael > Park. > > > Repository: mesos > > > Description > ------- > > With the addition of MULTI_ROLE framework support, allocated > resources in the master have `Resource.AllocationInfo` set. This > means that the master's http endpoints that apply operations or > perform checks between unallocated and allocated resources must > be updated to continue to function correctly. > > > Diffs > ----- > > src/master/http.cpp a44621f39cb059e654a56f57f75b38947f3a4230 > src/master/quota_handler.cpp 6e6e7375219d34e6e8d011a025b5f5d70b87383b > src/master/validation.cpp 5f134b781901f2de6a90fa6a10d42cc7629c27a0 > > Diff: https://reviews.apache.org/r/55970/diff/ > > > Testing > ------- > > The existing tests pass at the end of this review chain. > > > Thanks, > > Benjamin Mahler > >
