You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Benjamin Mahler <bm...@apache.org> on 2018/02/23 22:43:54 UTC
Review Request 65784: Added validation of QuotaRequest.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/65784/
-----------------------------------------------------------
Review request for mesos, Michael Park and Meng Zhu.
Repository: mesos
Description
-------
This obviates the need for the old-style validation of quotaInfo,
but leaves the latter in order to keep the v0 code path untouched.
A TODO has been added to remove the old validation and replace it
with the one in this patch.
Diffs
-----
src/master/quota.hpp 7f43996d9aa3d3f462a6ed750733a55d4ef770c8
src/master/quota.cpp 58bab6a678bac9e41a7994ba0b7cc1ed069a8a18
Diff: https://reviews.apache.org/r/65784/diff/1/
Testing
-------
make check (test added in subsequent patch)
Thanks,
Benjamin Mahler
Re: Review Request 65784: Added validation of QuotaRequest.
Posted by Meng Zhu <mz...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/65784/#review199392
-----------------------------------------------------------
Ship it!
Ship It!
- Meng Zhu
On Feb. 23, 2018, 2:43 p.m., Benjamin Mahler wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/65784/
> -----------------------------------------------------------
>
> (Updated Feb. 23, 2018, 2:43 p.m.)
>
>
> Review request for mesos, Michael Park and Meng Zhu.
>
>
> Repository: mesos
>
>
> Description
> -------
>
> This obviates the need for the old-style validation of quotaInfo,
> but leaves the latter in order to keep the v0 code path untouched.
> A TODO has been added to remove the old validation and replace it
> with the one in this patch.
>
>
> Diffs
> -----
>
> src/master/quota.hpp 7f43996d9aa3d3f462a6ed750733a55d4ef770c8
> src/master/quota.cpp 58bab6a678bac9e41a7994ba0b7cc1ed069a8a18
>
>
> Diff: https://reviews.apache.org/r/65784/diff/1/
>
>
> Testing
> -------
>
> make check (test added in subsequent patch)
>
>
> Thanks,
>
> Benjamin Mahler
>
>
Re: Review Request 65784: Added validation of QuotaRequest.
Posted by Meng Zhu <mz...@mesosphere.io>.
> On May 1, 2018, 4:40 p.m., Meng Zhu wrote:
> > src/master/quota.cpp
> > Lines 199-200 (patched)
> > <https://reviews.apache.org/r/65784/diff/1/?file=1964005#file1964005line199>
> >
> > Add `AllocationInfo` and `SharedInfo` check as well?
Now we can use `isScalarQuantity()` for this
https://github.com/apache/mesos/blob/master/include/mesos/resources.hpp#L330
Though we should probably start to think about introducing a notion of "quantity".
- Meng
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/65784/#review202244
-----------------------------------------------------------
On Feb. 23, 2018, 2:43 p.m., Benjamin Mahler wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/65784/
> -----------------------------------------------------------
>
> (Updated Feb. 23, 2018, 2:43 p.m.)
>
>
> Review request for mesos, Michael Park and Meng Zhu.
>
>
> Repository: mesos
>
>
> Description
> -------
>
> This obviates the need for the old-style validation of quotaInfo,
> but leaves the latter in order to keep the v0 code path untouched.
> A TODO has been added to remove the old validation and replace it
> with the one in this patch.
>
>
> Diffs
> -----
>
> src/master/quota.hpp 7f43996d9aa3d3f462a6ed750733a55d4ef770c8
> src/master/quota.cpp 58bab6a678bac9e41a7994ba0b7cc1ed069a8a18
>
>
> Diff: https://reviews.apache.org/r/65784/diff/1/
>
>
> Testing
> -------
>
> make check (test added in subsequent patch)
>
>
> Thanks,
>
> Benjamin Mahler
>
>
Re: Review Request 65784: Added validation of QuotaRequest.
Posted by Benjamin Mahler <bm...@apache.org>.
> On May 1, 2018, 11:40 p.m., Meng Zhu wrote:
> > src/master/quota.cpp
> > Lines 199-200 (patched)
> > <https://reviews.apache.org/r/65784/diff/1/?file=1964005#file1964005line199>
> >
> > Add `AllocationInfo` and `SharedInfo` check as well?
>
> Meng Zhu wrote:
> Now we can use `isScalarQuantity()` for this
>
> https://github.com/apache/mesos/blob/master/include/mesos/resources.hpp#L330
>
> Though we should probably start to think about introducing a notion of "quantity".
Added the additional checks, we can't use isScalarQuantity as it requires a `Resources` (which will drop empty resources like an empty ports range).
- Benjamin
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/65784/#review202244
-----------------------------------------------------------
On Feb. 23, 2018, 10:43 p.m., Benjamin Mahler wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/65784/
> -----------------------------------------------------------
>
> (Updated Feb. 23, 2018, 10:43 p.m.)
>
>
> Review request for mesos, Michael Park and Meng Zhu.
>
>
> Repository: mesos
>
>
> Description
> -------
>
> This obviates the need for the old-style validation of quotaInfo,
> but leaves the latter in order to keep the v0 code path untouched.
> A TODO has been added to remove the old validation and replace it
> with the one in this patch.
>
>
> Diffs
> -----
>
> src/master/quota.hpp 7f43996d9aa3d3f462a6ed750733a55d4ef770c8
> src/master/quota.cpp 58bab6a678bac9e41a7994ba0b7cc1ed069a8a18
>
>
> Diff: https://reviews.apache.org/r/65784/diff/1/
>
>
> Testing
> -------
>
> make check (test added in subsequent patch)
>
>
> Thanks,
>
> Benjamin Mahler
>
>
Re: Review Request 65784: Added validation of QuotaRequest.
Posted by Meng Zhu <mz...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/65784/#review202244
-----------------------------------------------------------
Fix it, then Ship it!
src/master/quota.cpp
Lines 199-200 (patched)
<https://reviews.apache.org/r/65784/#comment283993>
Add `AllocationInfo` and `SharedInfo` check as well?
- Meng Zhu
On Feb. 23, 2018, 2:43 p.m., Benjamin Mahler wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/65784/
> -----------------------------------------------------------
>
> (Updated Feb. 23, 2018, 2:43 p.m.)
>
>
> Review request for mesos, Michael Park and Meng Zhu.
>
>
> Repository: mesos
>
>
> Description
> -------
>
> This obviates the need for the old-style validation of quotaInfo,
> but leaves the latter in order to keep the v0 code path untouched.
> A TODO has been added to remove the old validation and replace it
> with the one in this patch.
>
>
> Diffs
> -----
>
> src/master/quota.hpp 7f43996d9aa3d3f462a6ed750733a55d4ef770c8
> src/master/quota.cpp 58bab6a678bac9e41a7994ba0b7cc1ed069a8a18
>
>
> Diff: https://reviews.apache.org/r/65784/diff/1/
>
>
> Testing
> -------
>
> make check (test added in subsequent patch)
>
>
> Thanks,
>
> Benjamin Mahler
>
>