Re: Review Request 38110: Quota: Checked sanity of quota set requests.

2015-11-16 Thread Alexander Rukletsov


> On Nov. 15, 2015, 3:50 p.m., Joris Van Remoortere wrote:
> > src/master/quota_handler.cpp, lines 112-114
> > 
> >
> > Is this really necessary? If so let's add a comment.

I think yes since we do not rely on disconnected or inactive agents. Do you 
have a different opinion?


- Alexander


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


On Nov. 14, 2015, 3:44 p.m., Alexander Rukletsov wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/38110/
> ---
> 
> (Updated Nov. 14, 2015, 3:44 p.m.)
> 
> 
> Review request for mesos, Bernd Mathiske, Joerg Schad, Joris Van Remoortere, 
> Joseph Wu, and Michael Park.
> 
> 
> Bugs: MESOS-3074
> https://issues.apache.org/jira/browse/MESOS-3074
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Performs a check whether a quota request is reasonable and can be satisfied 
> at the moment. A precise answer is impossible here, but a sanity check is 
> still helpful, because it allows us to filter knowingly unsatisfiable 
> requests.
> 
> 
> Diffs
> -
> 
>   src/master/master.hpp ead8520b7108a0f2c3a0bb11ae7b543897d111a2 
>   src/master/quota_handler.cpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/38110/diff/
> 
> 
> Testing
> ---
> 
> make check (Mac OS X 10.10.4)
> 
> 
> Thanks,
> 
> Alexander Rukletsov
> 
>



Re: Review Request 38110: Quota: Checked sanity of quota set requests.

2015-11-16 Thread Alexander Rukletsov


> On Nov. 15, 2015, 3:50 p.m., Joris Van Remoortere wrote:
> > src/master/quota_handler.cpp, lines 117-118
> > 
> >
> > This is a great comment. Can you also make it clear why we actually 
> > want to account for them?

Do you mean something like:
```
// In contrast to static
// reservations, dynamic reservations may be unreserved at any time,
// hence making resources available for quota'ed framewroks.
```


> On Nov. 15, 2015, 3:50 p.m., Joris Van Remoortere wrote:
> > src/master/quota_handler.cpp, line 119
> > 
> >
> > Then we can rename this to `nonStaticAgentResources`. It might be so 
> > clear we can remove the first line of the comment above! :-)

A very good proposal, thanks!


- Alexander


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


On Nov. 14, 2015, 3:44 p.m., Alexander Rukletsov wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/38110/
> ---
> 
> (Updated Nov. 14, 2015, 3:44 p.m.)
> 
> 
> Review request for mesos, Bernd Mathiske, Joerg Schad, Joris Van Remoortere, 
> Joseph Wu, and Michael Park.
> 
> 
> Bugs: MESOS-3074
> https://issues.apache.org/jira/browse/MESOS-3074
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Performs a check whether a quota request is reasonable and can be satisfied 
> at the moment. A precise answer is impossible here, but a sanity check is 
> still helpful, because it allows us to filter knowingly unsatisfiable 
> requests.
> 
> 
> Diffs
> -
> 
>   src/master/master.hpp ead8520b7108a0f2c3a0bb11ae7b543897d111a2 
>   src/master/quota_handler.cpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/38110/diff/
> 
> 
> Testing
> ---
> 
> make check (Mac OS X 10.10.4)
> 
> 
> Thanks,
> 
> Alexander Rukletsov
> 
>



Re: Review Request 38110: Quota: Checked sanity of quota set requests.

2015-11-15 Thread Joris Van Remoortere

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

Ship it!



src/master/master.hpp (line 879)


How about: 
```
Heuristically tries to determine whether a quota request could reasonabily 
be satisfied given the current cluster capacity. 

The goal is to determine whether a user may accidentally request an amount 
that would prevent frameworks without a quota from getting any offers. A force 
flag will allow users to bypass this check.

The heuristic test whether the total quota, including the new request, does 
not exceed the sum of non-static cluster resources.



src/master/master.hpp (line 884)


s/, what/,as well as which



src/master/master.hpp (line 887)


s/a bunch of agent nodes may terminate right after/ agents may terminate at 
any time/



src/master/master.hpp (line 890)


s/verifies the/verifies that the/



src/master/master.hpp (line 892)


Let's rename this to `CapacityHeuristic`



src/master/quota_handler.cpp (lines 97 - 101)


I think we should either re-run the check that the quota for this role 
doesn't exist, or in the calculation comment mention that this logic works 
because master->quotas is guaranteed not to contain the current role's quota 
yet.



src/master/quota_handler.cpp (lines 109 - 110)


Let's add a comment as to what this next section is, as you did with the 
previous sections.



src/master/quota_handler.cpp (line 110)


Can we rename this to something like `nonStaticClusterResources`



src/master/quota_handler.cpp (lines 112 - 114)


Is this really necessary? If so let's add a comment.



src/master/quota_handler.cpp (lines 117 - 118)


This is a great comment. Can you also make it clear why we actually want to 
account for them?



src/master/quota_handler.cpp (line 119)


Then we can rename this to `nonStaticAgentResources`. It might be so clear 
we can remove the first line of the comment above! :-)



src/master/quota_handler.cpp (lines 123 - 126)


I understand you like the early termination logic as it can reduce the cost 
of the function significantly. Can you add a comment here that this is an 
optimization / early exit of the final inequality check?



src/master/quota_handler.cpp (line 130)


hence the request does not pass the heuristic



src/master/quota_handler.cpp (line 131)


Not enough available cluster capacity to reasonably satisfy quota request. 
Consider using the force attribute



src/master/quota_handler.cpp (lines 199 - 200)


Heuristic capacity check


- Joris Van Remoortere


On Nov. 14, 2015, 3:44 p.m., Alexander Rukletsov wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/38110/
> ---
> 
> (Updated Nov. 14, 2015, 3:44 p.m.)
> 
> 
> Review request for mesos, Bernd Mathiske, Joerg Schad, Joris Van Remoortere, 
> Joseph Wu, and Michael Park.
> 
> 
> Bugs: MESOS-3074
> https://issues.apache.org/jira/browse/MESOS-3074
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Performs a check whether a quota request is reasonable and can be satisfied 
> at the moment. A precise answer is impossible here, but a sanity check is 
> still helpful, because it allows us to filter knowingly unsatisfiable 
> requests.
> 
> 
> Diffs
> -
> 
>   src/master/master.hpp ead8520b7108a0f2c3a0bb11ae7b543897d111a2 
>   src/master/quota_handler.cpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/38110/diff/
> 
> 
> Testing
> ---
> 
> make check (Mac OS X 10.10.4)
> 
> 
> Thanks,
> 
> Alexander Rukletsov
> 
>



Re: Review Request 38110: Quota: Checked sanity of quota set requests.

2015-11-14 Thread Alexander Rukletsov

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

(Updated Nov. 14, 2015, 3:44 p.m.)


Review request for mesos, Bernd Mathiske, Joerg Schad, Joris Van Remoortere, 
Joseph Wu, and Michael Park.


Changes
---

Reworked the sanity check. Please review.


Bugs: MESOS-3074
https://issues.apache.org/jira/browse/MESOS-3074


Repository: mesos


Description
---

Performs a check whether a quota request is reasonable and can be satisfied at 
the moment. A precise answer is impossible here, but a sanity check is still 
helpful, because it allows us to filter knowingly unsatisfiable requests.


Diffs (updated)
-

  src/master/master.hpp ead8520b7108a0f2c3a0bb11ae7b543897d111a2 
  src/master/quota_handler.cpp PRE-CREATION 

Diff: https://reviews.apache.org/r/38110/diff/


Testing
---

make check (Mac OS X 10.10.4)


Thanks,

Alexander Rukletsov



Re: Review Request 38110: Quota: Checked sanity of quota set requests.

2015-11-13 Thread Joris Van Remoortere

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


Will review this again after you refactor.


src/master/master.hpp (lines 879 - 898)


Let's re-write this comment according to the sanity check we discussed with 
ben mahler yesterday.
It would be great to have the equation representing what we are checking 
for as part of the comment.



src/master/master.hpp (lines 893 - 895)


some fixes in:
```
Currently, we do not account neither static nor dynamic reservations in 
role's allcoation
```
to:
```
Currently, we do not account for static or dynamic reservations in a role's 
allocation
```


- Joris Van Remoortere


On Nov. 10, 2015, 7:02 p.m., Alexander Rukletsov wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/38110/
> ---
> 
> (Updated Nov. 10, 2015, 7:02 p.m.)
> 
> 
> Review request for mesos, Bernd Mathiske, Joerg Schad, Joris Van Remoortere, 
> Joseph Wu, and Michael Park.
> 
> 
> Bugs: MESOS-3074
> https://issues.apache.org/jira/browse/MESOS-3074
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Performs a check whether a quota request is reasonable and can be satisfied 
> at the moment. A precise answer is impossible here, but a sanity check is 
> still helpful, because it allows us to filter knowingly unsatisfiable 
> requests.
> 
> 
> Diffs
> -
> 
>   src/master/master.hpp ead8520b7108a0f2c3a0bb11ae7b543897d111a2 
>   src/master/quota_handler.cpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/38110/diff/
> 
> 
> Testing
> ---
> 
> make check (Mac OS X 10.10.4)
> 
> 
> Thanks,
> 
> Alexander Rukletsov
> 
>



Re: Review Request 38110: Quota: Checked sanity of quota set requests.

2015-11-10 Thread Alexander Rukletsov

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

(Updated Nov. 10, 2015, 7:02 p.m.)


Review request for mesos, Bernd Mathiske, Joerg Schad, Joris Van Remoortere, 
Joseph Wu, and Michael Park.


Changes
---

Removed extra logging.


Bugs: MESOS-3074
https://issues.apache.org/jira/browse/MESOS-3074


Repository: mesos


Description
---

Performs a check whether a quota request is reasonable and can be satisfied at 
the moment. A precise answer is impossible here, but a sanity check is still 
helpful, because it allows us to filter knowingly unsatisfiable requests.


Diffs (updated)
-

  src/master/master.hpp ead8520b7108a0f2c3a0bb11ae7b543897d111a2 
  src/master/quota_handler.cpp PRE-CREATION 

Diff: https://reviews.apache.org/r/38110/diff/


Testing
---

make check (Mac OS X 10.10.4)


Thanks,

Alexander Rukletsov



Re: Review Request 38110: Quota: Checked sanity of quota set requests.

2015-11-10 Thread Guangya Liu


> On Nov. 3, 2015, 5:52 a.m., Guangya Liu wrote:
> > src/master/quota_handler.cpp, lines 159-186
> > 
> >
> > How to handle the following cases? Say two roles request quota: r1 and 
> > r2.
> > 
> > When r1 request quota as 5, the availableInCluster is 10 and r1 set 
> > quota succeed.
> > 
> > When r2 request quota as 7 again, the availableInCluster is still 10 as 
> > no one used resources in the cluster, so r2 set quota also succeed.
> > 
> > But now the quota for r1 and r2 is 12 which exceeds 10, is this a valid 
> > case? Thanks.
> 
> Alexander Rukletsov wrote:
> This is a sanity check, the precise bookkeeping and quota allocation is 
> done by an allocator module.

OK, got it. So we have two levels check, one is sanity check here and the other 
is precise bookkeeping in allocator. The first sanity check can get some early 
exception if there are not enough resources.


- Guangya


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


On Nov. 10, 2015, 7:02 p.m., Alexander Rukletsov wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/38110/
> ---
> 
> (Updated Nov. 10, 2015, 7:02 p.m.)
> 
> 
> Review request for mesos, Bernd Mathiske, Joerg Schad, Joris Van Remoortere, 
> Joseph Wu, and Michael Park.
> 
> 
> Bugs: MESOS-3074
> https://issues.apache.org/jira/browse/MESOS-3074
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Performs a check whether a quota request is reasonable and can be satisfied 
> at the moment. A precise answer is impossible here, but a sanity check is 
> still helpful, because it allows us to filter knowingly unsatisfiable 
> requests.
> 
> 
> Diffs
> -
> 
>   src/master/master.hpp ead8520b7108a0f2c3a0bb11ae7b543897d111a2 
>   src/master/quota_handler.cpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/38110/diff/
> 
> 
> Testing
> ---
> 
> make check (Mac OS X 10.10.4)
> 
> 
> Thanks,
> 
> Alexander Rukletsov
> 
>



Re: Review Request 38110: Quota: Checked sanity of quota set requests.

2015-11-10 Thread Alexander Rukletsov


> On Nov. 4, 2015, 2:44 p.m., Qian Zhang wrote:
> > src/master/quota_handler.cpp, line 151
> > 
> >
> > So for this TODO, in future, we want to count dynamically reserved 
> > resources in ```roleTotal```, right? But in the code below, I see the 
> > dynamically reserved resources have already been counted in 
> > ```availableOnAgent```, so if we count it here as well, will it be double 
> > counted?

You're right, there is a danger that we end up doing double accounting after we 
add dynamic reservations. I'll add a todo to avoid that. Thanks!


- Alexander


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


On Nov. 10, 2015, 10:52 a.m., Alexander Rukletsov wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/38110/
> ---
> 
> (Updated Nov. 10, 2015, 10:52 a.m.)
> 
> 
> Review request for mesos, Bernd Mathiske, Joerg Schad, Joris Van Remoortere, 
> Joseph Wu, and Michael Park.
> 
> 
> Bugs: MESOS-3074
> https://issues.apache.org/jira/browse/MESOS-3074
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Performs a check whether a quota request is reasonable and can be satisfied 
> at the moment. A precise answer is impossible here, but a sanity check is 
> still helpful, because it allows us to filter knowingly unsatisfiable 
> requests.
> 
> 
> Diffs
> -
> 
>   src/master/master.hpp ead8520b7108a0f2c3a0bb11ae7b543897d111a2 
>   src/master/quota_handler.cpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/38110/diff/
> 
> 
> Testing
> ---
> 
> make check (Mac OS X 10.10.4)
> 
> 
> Thanks,
> 
> Alexander Rukletsov
> 
>



Re: Review Request 38110: Quota: Checked sanity of quota set requests.

2015-11-10 Thread Alexander Rukletsov

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

(Updated Nov. 10, 2015, 10:52 a.m.)


Review request for mesos, Bernd Mathiske, Joerg Schad, Joris Van Remoortere, 
Joseph Wu, and Michael Park.


Changes
---

Updated comments and minor naming issues.


Bugs: MESOS-3074
https://issues.apache.org/jira/browse/MESOS-3074


Repository: mesos


Description
---

Performs a check whether a quota request is reasonable and can be satisfied at 
the moment. A precise answer is impossible here, but a sanity check is still 
helpful, because it allows us to filter knowingly unsatisfiable requests.


Diffs (updated)
-

  src/master/master.hpp ead8520b7108a0f2c3a0bb11ae7b543897d111a2 
  src/master/quota_handler.cpp PRE-CREATION 

Diff: https://reviews.apache.org/r/38110/diff/


Testing
---

make check (Mac OS X 10.10.4)


Thanks,

Alexander Rukletsov



Re: Review Request 38110: Quota: Checked sanity of quota set requests.

2015-11-09 Thread Alexander Rukletsov


> On Nov. 4, 2015, 2:44 p.m., Qian Zhang wrote:
> > src/master/quota_handler.cpp, line 164
> > 
> >
> > Do we want to filter out the slave which is not active (slave->active 
> > == false)?

I think it makes sense to include this check, though it makes things slightly 
more pessimistic.


- Alexander


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


On Nov. 5, 2015, 7:29 p.m., Alexander Rukletsov wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/38110/
> ---
> 
> (Updated Nov. 5, 2015, 7:29 p.m.)
> 
> 
> Review request for mesos, Bernd Mathiske, Joerg Schad, Joris Van Remoortere, 
> Joseph Wu, and Michael Park.
> 
> 
> Bugs: MESOS-3074
> https://issues.apache.org/jira/browse/MESOS-3074
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Performs a check whether a quota request is reasonable and can be satisfied 
> at the moment. A precise answer is impossible here, but a sanity check is 
> still helpful, because it allows us to filter knowingly unsatisfiable 
> requests.
> 
> 
> Diffs
> -
> 
>   src/master/master.hpp 3aa7017287506938d77bbfb1e06f510101009ee3 
>   src/master/quota_handler.cpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/38110/diff/
> 
> 
> Testing
> ---
> 
> make check (Mac OS X 10.10.4)
> 
> 
> Thanks,
> 
> Alexander Rukletsov
> 
>



Re: Review Request 38110: Quota: Checked sanity of quota set requests.

2015-11-09 Thread Alexander Rukletsov


> On Nov. 5, 2015, 10:48 p.m., Joseph Wu wrote:
> > src/master/quota_handler.cpp, lines 166-168
> > 
> >
> > I checked the codepaths for `Operation::RESERVE` and apparently there's 
> > nothing preventing you from reserving revocable resources.  (Unless I'm not 
> > seeing it.)
> > 
> > I think we shouldn't allow this.  If we did, we may end up double 
> > counting (or worse) the same resources.  For example, if the 
> > `ResourceEstimator` always returned the total CPU on the agent, we would 
> > see that agent as having 2x CPU (half revocable).

Yep, it's possible, but I wouldn't do it either. Maybe a `TODO` is not the 
right tag for this comment. I'll consider killing it.


- Alexander


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


On Nov. 5, 2015, 7:29 p.m., Alexander Rukletsov wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/38110/
> ---
> 
> (Updated Nov. 5, 2015, 7:29 p.m.)
> 
> 
> Review request for mesos, Bernd Mathiske, Joerg Schad, Joris Van Remoortere, 
> Joseph Wu, and Michael Park.
> 
> 
> Bugs: MESOS-3074
> https://issues.apache.org/jira/browse/MESOS-3074
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Performs a check whether a quota request is reasonable and can be satisfied 
> at the moment. A precise answer is impossible here, but a sanity check is 
> still helpful, because it allows us to filter knowingly unsatisfiable 
> requests.
> 
> 
> Diffs
> -
> 
>   src/master/master.hpp 3aa7017287506938d77bbfb1e06f510101009ee3 
>   src/master/quota_handler.cpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/38110/diff/
> 
> 
> Testing
> ---
> 
> make check (Mac OS X 10.10.4)
> 
> 
> Thanks,
> 
> Alexander Rukletsov
> 
>



Re: Review Request 38110: Quota: Checked sanity of quota set requests.

2015-11-09 Thread Alexander Rukletsov


> On Nov. 3, 2015, 5:52 a.m., Guangya Liu wrote:
> > src/master/quota_handler.cpp, lines 159-186
> > 
> >
> > How to handle the following cases? Say two roles request quota: r1 and 
> > r2.
> > 
> > When r1 request quota as 5, the availableInCluster is 10 and r1 set 
> > quota succeed.
> > 
> > When r2 request quota as 7 again, the availableInCluster is still 10 as 
> > no one used resources in the cluster, so r2 set quota also succeed.
> > 
> > But now the quota for r1 and r2 is 12 which exceeds 10, is this a valid 
> > case? Thanks.

This is a sanity check, the precise bookkeeping and quota allocation is done by 
an allocator module.


- Alexander


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


On Nov. 5, 2015, 7:29 p.m., Alexander Rukletsov wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/38110/
> ---
> 
> (Updated Nov. 5, 2015, 7:29 p.m.)
> 
> 
> Review request for mesos, Bernd Mathiske, Joerg Schad, Joris Van Remoortere, 
> Joseph Wu, and Michael Park.
> 
> 
> Bugs: MESOS-3074
> https://issues.apache.org/jira/browse/MESOS-3074
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Performs a check whether a quota request is reasonable and can be satisfied 
> at the moment. A precise answer is impossible here, but a sanity check is 
> still helpful, because it allows us to filter knowingly unsatisfiable 
> requests.
> 
> 
> Diffs
> -
> 
>   src/master/master.hpp 3aa7017287506938d77bbfb1e06f510101009ee3 
>   src/master/quota_handler.cpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/38110/diff/
> 
> 
> Testing
> ---
> 
> make check (Mac OS X 10.10.4)
> 
> 
> Thanks,
> 
> Alexander Rukletsov
> 
>



Re: Review Request 38110: Quota: Checked sanity of quota set requests.

2015-11-09 Thread Alexander Rukletsov

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

(Updated Nov. 9, 2015, 5:37 p.m.)


Review request for mesos, Bernd Mathiske, Joerg Schad, Joris Van Remoortere, 
Joseph Wu, and Michael Park.


Changes
---

Comments; rebased.


Bugs: MESOS-3074
https://issues.apache.org/jira/browse/MESOS-3074


Repository: mesos


Description
---

Performs a check whether a quota request is reasonable and can be satisfied at 
the moment. A precise answer is impossible here, but a sanity check is still 
helpful, because it allows us to filter knowingly unsatisfiable requests.


Diffs (updated)
-

  src/master/master.hpp ead8520b7108a0f2c3a0bb11ae7b543897d111a2 
  src/master/quota_handler.cpp PRE-CREATION 

Diff: https://reviews.apache.org/r/38110/diff/


Testing
---

make check (Mac OS X 10.10.4)


Thanks,

Alexander Rukletsov



Re: Review Request 38110: Quota: Checked sanity of quota set requests.

2015-11-04 Thread Qian Zhang

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



src/master/quota_handler.cpp (line 151)


So for this TODO, in future, we want to count dynamically reserved 
resources in ```roleTotal```, right? But in the code below, I see the 
dynamically reserved resources have already been counted in 
```availableOnAgent```, so if we count it here as well, will it be double 
counted?



src/master/quota_handler.cpp (line 161)


Do we want to check if ```missingResources``` is empty first? Maybe the 
quota is already satisfied at this point.



src/master/quota_handler.cpp (line 164)


Do we want to filter out the slave which is not active (slave->active == 
false)?


- Qian Zhang


On Nov. 3, 2015, 11:46 p.m., Alexander Rukletsov wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/38110/
> ---
> 
> (Updated Nov. 3, 2015, 11:46 p.m.)
> 
> 
> Review request for mesos, Bernd Mathiske, Joerg Schad, Joris Van Remoortere, 
> and Michael Park.
> 
> 
> Bugs: MESOS-3074
> https://issues.apache.org/jira/browse/MESOS-3074
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Performs a check whether a quota request is reasonable and can be satisfied 
> at the moment. A precise answer is impossible here, but a sanity check is 
> still helpful, because it allows us to filter knowingly unsatisfiable 
> requests.
> 
> 
> Diffs
> -
> 
>   src/master/master.hpp 3aa7017287506938d77bbfb1e06f510101009ee3 
>   src/master/quota_handler.cpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/38110/diff/
> 
> 
> Testing
> ---
> 
> make check (Mac OS X 10.10.4)
> 
> 
> Thanks,
> 
> Alexander Rukletsov
> 
>



Re: Review Request 38110: Quota: Checked sanity of quota set requests.

2015-11-03 Thread Alexander Rukletsov

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

(Updated Nov. 3, 2015, 3:46 p.m.)


Review request for mesos, Bernd Mathiske, Joerg Schad, Joris Van Remoortere, 
and Michael Park.


Bugs: MESOS-3074
https://issues.apache.org/jira/browse/MESOS-3074


Repository: mesos


Description
---

Performs a check whether a quota request is reasonable and can be satisfied at 
the moment. A precise answer is impossible here, but a sanity check is still 
helpful, because it allows us to filter knowingly unsatisfiable requests.


Diffs
-

  src/master/master.hpp 3aa7017287506938d77bbfb1e06f510101009ee3 
  src/master/quota_handler.cpp PRE-CREATION 

Diff: https://reviews.apache.org/r/38110/diff/


Testing
---

make check (Mac OS X 10.10.4)


Thanks,

Alexander Rukletsov