You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Guangya Liu <gy...@gmail.com> on 2016/01/12 15:55:08 UTC
Re: Review Request 42113: WIP: Handle unreserve logic for dynamic
reservation (1/2).
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/42113/
-----------------------------------------------------------
(Updated 一月 12, 2016, 2:55 p.m.)
Review request for mesos and Klaus Ma.
Summary (updated)
-----------------
WIP: Handle unreserve logic for dynamic reservation (1/2).
Repository: mesos
Description (updated)
-------
Handle unreserve logic for dynamic reservation with allocation slack.
This patch is halding the case when using updateAllocation to unreserve
some resources.
Diffs (updated)
-----
include/mesos/resources.hpp cc8fef9470d779078aa408ed03e747e5a492deaa
include/mesos/v1/resources.hpp f4892977f8d7b0439db6e9cf7921334f606a496c
src/cli/execute.cpp a2b610f32da3deb9d3df99c225d22a425e03cdba
src/common/resources.cpp 6afd2dfd81adecf7bdb3e523bc840efb62b79ef4
src/master/allocator/mesos/hierarchical.cpp df8bccaf2b8cfc0cb5ca18d4867371ae7a84c12f
src/master/master.cpp 2d9b7f9540574aa3ef9e5af3b2b8922dffeebac8
src/slave/slave.cpp 90d0fecd2d83fd174134870a577ac59d79c0006f
src/tests/hierarchical_allocator_tests.cpp e044f832c2c16e53e663c6ced5452649bb0dcb59
src/tests/resources_tests.cpp e4a3435adc14f3b6b278b32348a6991543d5a320
src/v1/resources.cpp 8de6672ba9b34947db81c74b8e03e8965e8af5fc
Diff: https://reviews.apache.org/r/42113/diff/
Testing
-------
make
make check
Thanks,
Guangya Liu
Re: Review Request 42113: Handle unreserve logic for dynamic
reservation (2/3).
Posted by Guangya Liu <gy...@gmail.com>.
> On 一月 14, 2016, 6:17 a.m., Klaus Ma wrote:
> > src/master/allocator/mesos/hierarchical.cpp, lines 707-710
> > <https://reviews.apache.org/r/42113/diff/4/?file=1195640#file1195640line707>
> >
> > Should be
> >
> > if (freeAllocationSlack.empty())
> > break;
> >
> > Resources freeResources = freeAllocationSlack.get(name);
> >
> > if (freeResources.contains(unreservedResources)) {
> > slaves[slaveId].total -= unreservedResources;
> > freeAllocationSlack -= unreservedResources;
> > } else {
> > slaves[slaveId].total -= freeResources;
> > freeAllocationSlack -= freeResources;
> > }
The current logic is updating the `slave total` and always update `freeAllocationSlack` in every cycle.
- Guangya
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/42113/#review114419
-----------------------------------------------------------
On 一月 14, 2016, 12:46 p.m., Guangya Liu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42113/
> -----------------------------------------------------------
>
> (Updated 一月 14, 2016, 12:46 p.m.)
>
>
> Review request for mesos, Ben Mahler, Artem Harutyunyan, Joris Van Remoortere, Joseph Wu, Klaus Ma, and Jian Qiu.
>
>
> Bugs: MESOS-4145
> https://issues.apache.org/jira/browse/MESOS-4145
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Handle unreserve logic for dynamic reservation with allocation slack.
>
> This patch is halding the case when using updateAllocation to unreserve
> some resources.
>
>
> Diffs
> -----
>
> src/master/allocator/mesos/hierarchical.cpp d541bfa3f4190865c65d35c9d1ffdb8a3f194056
> src/tests/hierarchical_allocator_tests.cpp e044f832c2c16e53e663c6ced5452649bb0dcb59
>
> Diff: https://reviews.apache.org/r/42113/diff/
>
>
> Testing
> -------
>
> make
> make check
>
>
> Thanks,
>
> Guangya Liu
>
>
Re: Review Request 42113: Handle unreserve logic for dynamic
reservation (2/3).
Posted by Klaus Ma <kl...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/42113/#review114419
-----------------------------------------------------------
src/master/allocator/mesos/hierarchical.cpp (line 692)
<https://reviews.apache.org/r/42113/#comment175254>
`freeAllocationSlack` is unused in the following codes? Why it's here.
src/master/allocator/mesos/hierarchical.cpp (lines 707 - 710)
<https://reviews.apache.org/r/42113/#comment175259>
Should be
if (freeAllocationSlack.empty())
break;
Resources freeResources = freeAllocationSlack.get(name);
if (freeResources.contains(unreservedResources)) {
slaves[slaveId].total -= unreservedResources;
freeAllocationSlack -= unreservedResources;
} else {
slaves[slaveId].total -= freeResources;
freeAllocationSlack -= freeResources;
}
src/master/allocator/mesos/hierarchical.cpp (line 708)
<https://reviews.apache.org/r/42113/#comment175255>
There should be `freeAllocationSlack` which is not allocated for now.
- Klaus Ma
On Jan. 13, 2016, 9:01 p.m., Guangya Liu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42113/
> -----------------------------------------------------------
>
> (Updated Jan. 13, 2016, 9:01 p.m.)
>
>
> Review request for mesos, Ben Mahler, Artem Harutyunyan, Joris Van Remoortere, Joseph Wu, Klaus Ma, and Jian Qiu.
>
>
> Bugs: MESOS-4145
> https://issues.apache.org/jira/browse/MESOS-4145
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Handle unreserve logic for dynamic reservation with allocation slack.
>
> This patch is halding the case when using updateAllocation to unreserve
> some resources.
>
>
> Diffs
> -----
>
> src/master/allocator/mesos/hierarchical.cpp d541bfa3f4190865c65d35c9d1ffdb8a3f194056
> src/tests/hierarchical_allocator_tests.cpp e044f832c2c16e53e663c6ced5452649bb0dcb59
>
> Diff: https://reviews.apache.org/r/42113/diff/
>
>
> Testing
> -------
>
> make
> make check
>
>
> Thanks,
>
> Guangya Liu
>
>
Re: Review Request 42113: Added test cases for updateAllocation.
Posted by Guangya Liu <gy...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/42113/
-----------------------------------------------------------
(Updated 三月 11, 2016, 9:11 a.m.)
Review request for mesos, Ben Mahler, Artem Harutyunyan, Joris Van Remoortere, Joseph Wu, Klaus Ma, and Jian Qiu.
Bugs: MESOS-4145
https://issues.apache.org/jira/browse/MESOS-4145
Repository: mesos
Description
-------
Added test cases for updateAllocation.
Diffs (updated)
-----
src/tests/hierarchical_allocator_tests.cpp 459e02576f6d05abbbcc83ae5cabac5c66e93f05
Diff: https://reviews.apache.org/r/42113/diff/
Testing
-------
make
make check
Thanks,
Guangya Liu
Re: Review Request 42113: Added test cases for updateAllocation.
Posted by Guangya Liu <gy...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/42113/
-----------------------------------------------------------
(Updated 一月 23, 2016, 5:48 a.m.)
Review request for mesos, Ben Mahler, Artem Harutyunyan, Joris Van Remoortere, Joseph Wu, Klaus Ma, and Jian Qiu.
Summary (updated)
-----------------
Added test cases for updateAllocation.
Bugs: MESOS-4145
https://issues.apache.org/jira/browse/MESOS-4145
Repository: mesos
Description (updated)
-------
Added test cases for updateAllocation.
Diffs (updated)
-----
src/tests/hierarchical_allocator_tests.cpp b1cb955b7eb1213c7ba4a9c5181545bb49154f06
Diff: https://reviews.apache.org/r/42113/diff/
Testing
-------
make
make check
Thanks,
Guangya Liu
Re: Review Request 42113: Handle unreserve logic for dynamic
reservation (2/3).
Posted by Guangya Liu <gy...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/42113/
-----------------------------------------------------------
(Updated 一月 20, 2016, 6:41 a.m.)
Review request for mesos, Ben Mahler, Artem Harutyunyan, Joris Van Remoortere, Joseph Wu, Klaus Ma, and Jian Qiu.
Bugs: MESOS-4145
https://issues.apache.org/jira/browse/MESOS-4145
Repository: mesos
Description (updated)
-------
Handle unreserve logic for dynamic reservation with allocation slack.
This patch is halding the case when using `updateAllocation` to unreserve
some resources.
Diffs
-----
src/master/allocator/mesos/hierarchical.cpp 72e69a0f42dd724713f2a7a75f1b92ef16eb5569
src/tests/hierarchical_allocator_tests.cpp 9362dd306497ba01e0f387c3862456cdcac6f863
Diff: https://reviews.apache.org/r/42113/diff/
Testing
-------
make
make check
Thanks,
Guangya Liu
Re: Review Request 42113: Handle unreserve logic for dynamic
reservation (2/3).
Posted by Guangya Liu <gy...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/42113/
-----------------------------------------------------------
(Updated 一月 16, 2016, 7:48 a.m.)
Review request for mesos, Ben Mahler, Artem Harutyunyan, Joris Van Remoortere, Joseph Wu, Klaus Ma, and Jian Qiu.
Bugs: MESOS-4145
https://issues.apache.org/jira/browse/MESOS-4145
Repository: mesos
Description (updated)
-------
Handle unreserve logic for dynamic reservation (2/3).
Diffs (updated)
-----
src/master/allocator/mesos/hierarchical.cpp 72e69a0f42dd724713f2a7a75f1b92ef16eb5569
src/tests/hierarchical_allocator_tests.cpp 9362dd306497ba01e0f387c3862456cdcac6f863
Diff: https://reviews.apache.org/r/42113/diff/
Testing
-------
make
make check
Thanks,
Guangya Liu
Re: Review Request 42113: Handle unreserve logic for dynamic
reservation (2/3).
Posted by Guangya Liu <gy...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/42113/
-----------------------------------------------------------
(Updated 一月 14, 2016, 2:25 p.m.)
Review request for mesos, Ben Mahler, Artem Harutyunyan, Joris Van Remoortere, Joseph Wu, Klaus Ma, and Jian Qiu.
Bugs: MESOS-4145
https://issues.apache.org/jira/browse/MESOS-4145
Repository: mesos
Description
-------
Handle unreserve logic for dynamic reservation with allocation slack.
This patch is halding the case when using updateAllocation to unreserve
some resources.
Diffs (updated)
-----
src/master/allocator/mesos/hierarchical.cpp d541bfa3f4190865c65d35c9d1ffdb8a3f194056
src/tests/hierarchical_allocator_tests.cpp e044f832c2c16e53e663c6ced5452649bb0dcb59
Diff: https://reviews.apache.org/r/42113/diff/
Testing
-------
make
make check
Thanks,
Guangya Liu
Re: Review Request 42113: Handle unreserve logic for dynamic
reservation (2/3).
Posted by Klaus Ma <kl...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/42113/#review114474
-----------------------------------------------------------
src/master/allocator/mesos/hierarchical.cpp (line 724)
<https://reviews.apache.org/r/42113/#comment175324>
Should be `freeAllocationSlack.get(name)`
- Klaus Ma
On Jan. 14, 2016, 8:46 p.m., Guangya Liu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42113/
> -----------------------------------------------------------
>
> (Updated Jan. 14, 2016, 8:46 p.m.)
>
>
> Review request for mesos, Ben Mahler, Artem Harutyunyan, Joris Van Remoortere, Joseph Wu, Klaus Ma, and Jian Qiu.
>
>
> Bugs: MESOS-4145
> https://issues.apache.org/jira/browse/MESOS-4145
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Handle unreserve logic for dynamic reservation with allocation slack.
>
> This patch is halding the case when using updateAllocation to unreserve
> some resources.
>
>
> Diffs
> -----
>
> src/master/allocator/mesos/hierarchical.cpp d541bfa3f4190865c65d35c9d1ffdb8a3f194056
> src/tests/hierarchical_allocator_tests.cpp e044f832c2c16e53e663c6ced5452649bb0dcb59
>
> Diff: https://reviews.apache.org/r/42113/diff/
>
>
> Testing
> -------
>
> make
> make check
>
>
> Thanks,
>
> Guangya Liu
>
>
Re: Review Request 42113: Handle unreserve logic for dynamic
reservation (2/3).
Posted by Guangya Liu <gy...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/42113/
-----------------------------------------------------------
(Updated 一月 14, 2016, 12:46 p.m.)
Review request for mesos, Ben Mahler, Artem Harutyunyan, Joris Van Remoortere, Joseph Wu, Klaus Ma, and Jian Qiu.
Bugs: MESOS-4145
https://issues.apache.org/jira/browse/MESOS-4145
Repository: mesos
Description
-------
Handle unreserve logic for dynamic reservation with allocation slack.
This patch is halding the case when using updateAllocation to unreserve
some resources.
Diffs (updated)
-----
src/master/allocator/mesos/hierarchical.cpp d541bfa3f4190865c65d35c9d1ffdb8a3f194056
src/tests/hierarchical_allocator_tests.cpp e044f832c2c16e53e663c6ced5452649bb0dcb59
Diff: https://reviews.apache.org/r/42113/diff/
Testing
-------
make
make check
Thanks,
Guangya Liu
Re: Review Request 42113: Handle unreserve logic for dynamic
reservation (2/3).
Posted by Guangya Liu <gy...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/42113/
-----------------------------------------------------------
(Updated 一月 13, 2016, 1:01 p.m.)
Review request for mesos, Ben Mahler, Artem Harutyunyan, Joris Van Remoortere, Joseph Wu, Klaus Ma, and Jian Qiu.
Summary (updated)
-----------------
Handle unreserve logic for dynamic reservation (2/3).
Bugs: MESOS-4145
https://issues.apache.org/jira/browse/MESOS-4145
Repository: mesos
Description
-------
Handle unreserve logic for dynamic reservation with allocation slack.
This patch is halding the case when using updateAllocation to unreserve
some resources.
Diffs (updated)
-----
src/master/allocator/mesos/hierarchical.cpp d541bfa3f4190865c65d35c9d1ffdb8a3f194056
src/tests/hierarchical_allocator_tests.cpp e044f832c2c16e53e663c6ced5452649bb0dcb59
Diff: https://reviews.apache.org/r/42113/diff/
Testing
-------
make
make check
Thanks,
Guangya Liu
Re: Review Request 42113: WIP: Handle unreserve logic for dynamic
reservation (2/3).
Posted by Guangya Liu <gy...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/42113/
-----------------------------------------------------------
(Updated 一月 13, 2016, 9:03 a.m.)
Review request for mesos and Klaus Ma.
Summary (updated)
-----------------
WIP: Handle unreserve logic for dynamic reservation (2/3).
Repository: mesos
Description
-------
Handle unreserve logic for dynamic reservation with allocation slack.
This patch is halding the case when using updateAllocation to unreserve
some resources.
Diffs (updated)
-----
src/master/allocator/mesos/hierarchical.cpp df8bccaf2b8cfc0cb5ca18d4867371ae7a84c12f
src/tests/hierarchical_allocator_tests.cpp e044f832c2c16e53e663c6ced5452649bb0dcb59
Diff: https://reviews.apache.org/r/42113/diff/
Testing
-------
make
make check
Thanks,
Guangya Liu