You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Gastón Kleiman <ga...@mesosphere.io> on 2017/06/28 23:25:37 UTC

Review Request 60525: Fixed the default filter used by the allocator.

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

Review request for mesos, Alexander Rukletsov, Benjamin Mahler, Greg Mann, and Vinod Kone.


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


Repository: mesos


Description
-------

If a framework accepts/refuses an offer using a very long filter, the
`HierarchicalAllocator` will use the default filter instead. Meaning
that it will filter the resources for only 5 seconds. This can happen
when a framework sets `Filter::refuse_seconds` to a number of seconds
larger than what fits in `Duration`.

This patch makes the allocator use the largest possible filter duration
in this case.


Diffs
-----

  src/master/allocator/mesos/hierarchical.cpp eb01d8e6b1108866ebc049f9f4a46157823a3541 


Diff: https://reviews.apache.org/r/60525/diff/1/


Testing
-------

`make check`


Thanks,

Gastón Kleiman


Re: Review Request 60525: Fixed the default filter used by the allocator.

Posted by Gastón Kleiman <ga...@mesosphere.io>.

> On July 10, 2017, 7:52 a.m., Alexander Rukletsov wrote:
> > src/master/allocator/mesos/hierarchical.cpp
> > Lines 1048-1049 (original), 1048-1050 (patched)
> > <https://reviews.apache.org/r/60525/diff/3/?file=1771867#file1771867line1048>
> >
> >     We usually use leading spaces instead of trailing spaces, but I see that you follow the pattern here. Maybe clean the whole file in a separate patch?

https://reviews.apache.org/r/60815/


- Gastón


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


On July 12, 2017, 9:41 p.m., Gastón Kleiman wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60525/
> -----------------------------------------------------------
> 
> (Updated July 12, 2017, 9:41 p.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov, Benjamin Mahler, Greg Mann, and Vinod Kone.
> 
> 
> Bugs: MESOS-7660
>     https://issues.apache.org/jira/browse/MESOS-7660
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> If a framework accepts/refuses an offer using a very long filter, the
> `HierarchicalAllocator` will use the default filter instead. Meaning
> that it will filter the resources for only 5 seconds. This can happen
> when a framework sets `Filter::refuse_seconds` to a number of seconds
> larger than what fits in `Duration`.
> 
> This patch makes the allocator use the largest possible filter duration
> in this case.
> 
> 
> Diffs
> -----
> 
>   src/master/allocator/mesos/hierarchical.cpp f021c34ef11aac42026ba39c5a1b775794982035 
> 
> 
> Diff: https://reviews.apache.org/r/60525/diff/4/
> 
> 
> Testing
> -------
> 
> `make check`
> 
> 
> Thanks,
> 
> Gastón Kleiman
> 
>


Re: Review Request 60525: Fixed the default filter used by the allocator.

Posted by Alexander Rukletsov <ru...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60525/#review180013
-----------------------------------------------------------


Fix it, then Ship it!




The change makes sense to me: if the user intent is to set up the longest possible duration, the allocator should comply.


src/master/allocator/mesos/hierarchical.cpp
Lines 1048-1049 (original), 1048-1050 (patched)
<https://reviews.apache.org/r/60525/#comment255020>

    We usually use leading spaces instead of trailing spaces, but I see that you follow the pattern here. Maybe clean the whole file in a separate patch?



src/master/allocator/mesos/hierarchical.cpp
Lines 1056 (patched)
<https://reviews.apache.org/r/60525/#comment255019>

    Missing blank line?


- Alexander Rukletsov


On July 8, 2017, 12:03 a.m., Gastón Kleiman wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60525/
> -----------------------------------------------------------
> 
> (Updated July 8, 2017, 12:03 a.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov, Benjamin Mahler, Greg Mann, and Vinod Kone.
> 
> 
> Bugs: MESOS-7660
>     https://issues.apache.org/jira/browse/MESOS-7660
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> If a framework accepts/refuses an offer using a very long filter, the
> `HierarchicalAllocator` will use the default filter instead. Meaning
> that it will filter the resources for only 5 seconds. This can happen
> when a framework sets `Filter::refuse_seconds` to a number of seconds
> larger than what fits in `Duration`.
> 
> This patch makes the allocator use the largest possible filter duration
> in this case.
> 
> 
> Diffs
> -----
> 
>   src/master/allocator/mesos/hierarchical.cpp eb01d8e6b1108866ebc049f9f4a46157823a3541 
> 
> 
> Diff: https://reviews.apache.org/r/60525/diff/3/
> 
> 
> Testing
> -------
> 
> `make check`
> 
> 
> Thanks,
> 
> Gastón Kleiman
> 
>


Re: Review Request 60525: Fixed the default filter used by the allocator.

Posted by Gastón Kleiman <ga...@mesosphere.io>.

> On Aug. 11, 2017, 7:47 p.m., Greg Mann wrote:
> > include/mesos/mesos.proto
> > Line 2257 (original), 2258-2262 (patched)
> > <https://reviews.apache.org/r/60525/diff/6/?file=1787910#file1787910line2258>
> >
> >     Is there a suitable place in the documentation for us to mention this?
> >     
> >     Also, could you add an update for the changelog which calls out this change?

I added something to `docs/scheduler-http-api.md`, most other places that mention Filters tell users to look at the protos.


> On Aug. 11, 2017, 7:47 p.m., Greg Mann wrote:
> > src/master/allocator/mesos/hierarchical.cpp
> > Line 1019 (original), 1019 (patched)
> > <https://reviews.apache.org/r/60525/diff/6/?file=1787912#file1787912line1019>
> >
> >     s/timeout = timeout =/timeout =/

:scream: ;-)


> On Aug. 11, 2017, 7:47 p.m., Greg Mann wrote:
> > src/master/allocator/mesos/hierarchical.cpp
> > Line 1170 (original), 1180 (patched)
> > <https://reviews.apache.org/r/60525/diff/6/?file=1787912#file1787912line1180>
> >
> >     Ditto

Ohhh no, not again!


- Gastón


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


On Aug. 12, 2017, 1:07 a.m., Gastón Kleiman wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60525/
> -----------------------------------------------------------
> 
> (Updated Aug. 12, 2017, 1:07 a.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov, Benjamin Mahler, Greg Mann, and Vinod Kone.
> 
> 
> Bugs: MESOS-7660
>     https://issues.apache.org/jira/browse/MESOS-7660
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> If a framework accepts/refuses an offer using a very long filter, the
> `HierarchicalAllocator` will use the default filter instead. Meaning
> that it will filter the resources for only 5 seconds. This can happen
> when a framework sets `Filter::refuse_seconds` to a number of seconds
> larger than what fits in `Duration`.
> 
> This patch makes the hierarchical allocator cap the filter duration to
> at most 365 days.
> 
> 
> Diffs
> -----
> 
>   docs/scheduler-http-api.md 4a5d77b88ae7cf0a0d8d39fe2579eb68bf33059a 
>   include/mesos/mesos.proto 50a5caf2623fff7d371753cbc6e842779fbf9769 
>   include/mesos/v1/mesos.proto 9d47a8a3a2f10fa493b4db35a73f33e6ee1ac727 
>   src/master/allocator/mesos/hierarchical.cpp f021c34ef11aac42026ba39c5a1b775794982035 
> 
> 
> Diff: https://reviews.apache.org/r/60525/diff/7/
> 
> 
> Testing
> -------
> 
> `make check`
> 
> 
> Thanks,
> 
> Gastón Kleiman
> 
>


Re: Review Request 60525: Fixed the default filter used by the allocator.

Posted by Greg Mann <gr...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60525/#review182730
-----------------------------------------------------------




include/mesos/mesos.proto
Line 2257 (original), 2258-2262 (patched)
<https://reviews.apache.org/r/60525/#comment258724>

    Is there a suitable place in the documentation for us to mention this?
    
    Also, could you add an update for the changelog which calls out this change?



src/master/allocator/mesos/hierarchical.cpp
Line 1019 (original), 1019 (patched)
<https://reviews.apache.org/r/60525/#comment258727>

    s/timeout = timeout =/timeout =/



src/master/allocator/mesos/hierarchical.cpp
Lines 1022 (patched)
<https://reviews.apache.org/r/60525/#comment258728>

    s/filters.get()./filters->/
    
    here and elsewhere



src/master/allocator/mesos/hierarchical.cpp
Line 1021 (original), 1026 (patched)
<https://reviews.apache.org/r/60525/#comment258733>

    Can you just do
    
    ```
    timeout = Days(365);
    ```



src/master/allocator/mesos/hierarchical.cpp
Line 1170 (original), 1180 (patched)
<https://reviews.apache.org/r/60525/#comment258737>

    Ditto



src/master/allocator/mesos/hierarchical.cpp
Lines 1187 (patched)
<https://reviews.apache.org/r/60525/#comment258738>

    Ditto



src/master/allocator/mesos/hierarchical.cpp
Lines 1190 (patched)
<https://reviews.apache.org/r/60525/#comment258740>

    Could you make this language consistent here and below? This line uses "refused resources offer filter", while the next one uses "refused resources filter".


- Greg Mann


On July 26, 2017, 11:30 p.m., Gastón Kleiman wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60525/
> -----------------------------------------------------------
> 
> (Updated July 26, 2017, 11:30 p.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov, Benjamin Mahler, Greg Mann, and Vinod Kone.
> 
> 
> Bugs: MESOS-7660
>     https://issues.apache.org/jira/browse/MESOS-7660
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> If a framework accepts/refuses an offer using a very long filter, the
> `HierarchicalAllocator` will use the default filter instead. Meaning
> that it will filter the resources for only 5 seconds. This can happen
> when a framework sets `Filter::refuse_seconds` to a number of seconds
> larger than what fits in `Duration`.
> 
> This patch makes the hierarchical allocator cap the filter duration to
> at most 365 days.
> 
> 
> Diffs
> -----
> 
>   include/mesos/mesos.proto f31f5bdc2ace2b261885b252e7c01ceb9b76c461 
>   include/mesos/v1/mesos.proto 66386a84bc21989d1c1237e629d5d04662a368fa 
>   src/master/allocator/mesos/hierarchical.cpp f021c34ef11aac42026ba39c5a1b775794982035 
> 
> 
> Diff: https://reviews.apache.org/r/60525/diff/6/
> 
> 
> Testing
> -------
> 
> `make check`
> 
> 
> Thanks,
> 
> Gastón Kleiman
> 
>


Re: Review Request 60525: Fixed the default filter used by the allocator.

Posted by Gastón Kleiman <ga...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60525/
-----------------------------------------------------------

(Updated Aug. 14, 2017, 5:44 p.m.)


Review request for mesos, Alexander Rukletsov, Benjamin Mahler, Greg Mann, and Vinod Kone.


Changes
-------

Moved the changelog changes to a different patch, improved the documentation.


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


Repository: mesos


Description
-------

If a framework accepts/refuses an offer using a very long filter, the
`HierarchicalAllocator` will use the default filter instead. Meaning
that it will filter the resources for only 5 seconds. This can happen
when a framework sets `Filter::refuse_seconds` to a number of seconds
larger than what fits in `Duration`.

This patch makes the hierarchical allocator cap the filter duration to
at most 365 days.


Diffs (updated)
-----

  docs/scheduler-http-api.md 4a5d77b88ae7cf0a0d8d39fe2579eb68bf33059a 
  include/mesos/mesos.proto 50a5caf2623fff7d371753cbc6e842779fbf9769 
  include/mesos/v1/mesos.proto 9d47a8a3a2f10fa493b4db35a73f33e6ee1ac727 
  src/master/allocator/mesos/hierarchical.cpp f021c34ef11aac42026ba39c5a1b775794982035 


Diff: https://reviews.apache.org/r/60525/diff/9/

Changes: https://reviews.apache.org/r/60525/diff/8-9/


Testing
-------

`make check`


Thanks,

Gastón Kleiman


Re: Review Request 60525: Fixed the default filter used by the allocator.

Posted by Greg Mann <gr...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60525/#review182874
-----------------------------------------------------------


Fix it, then Ship it!





CHANGELOG
Line 35 (original), 35 (patched)
<https://reviews.apache.org/r/60525/#comment258818>

    Nit: this change doesn't belong in this patch :)



docs/scheduler-http-api.md
Line 168 (original), 168 (patched)
<https://reviews.apache.org/r/60525/#comment258817>

    Let's tweak this line a bit to accommodate your new additions.
    
    How about moving the following portion:
    "Also, any of the offer's resources not used in the `ACCEPT` call (e.g., to launch a task or task group) are considered declined and might be reoffered to other frameworks."
    
    and merging it with your next sentence, "The unused resources ..."


- Greg Mann


On Aug. 12, 2017, 1:07 a.m., Gastón Kleiman wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60525/
> -----------------------------------------------------------
> 
> (Updated Aug. 12, 2017, 1:07 a.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov, Benjamin Mahler, Greg Mann, and Vinod Kone.
> 
> 
> Bugs: MESOS-7660
>     https://issues.apache.org/jira/browse/MESOS-7660
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> If a framework accepts/refuses an offer using a very long filter, the
> `HierarchicalAllocator` will use the default filter instead. Meaning
> that it will filter the resources for only 5 seconds. This can happen
> when a framework sets `Filter::refuse_seconds` to a number of seconds
> larger than what fits in `Duration`.
> 
> This patch makes the hierarchical allocator cap the filter duration to
> at most 365 days.
> 
> 
> Diffs
> -----
> 
>   CHANGELOG abb0e3bea95648b91605cec37b21f079d2b15b41 
>   docs/scheduler-http-api.md 4a5d77b88ae7cf0a0d8d39fe2579eb68bf33059a 
>   include/mesos/mesos.proto 50a5caf2623fff7d371753cbc6e842779fbf9769 
>   include/mesos/v1/mesos.proto 9d47a8a3a2f10fa493b4db35a73f33e6ee1ac727 
>   src/master/allocator/mesos/hierarchical.cpp f021c34ef11aac42026ba39c5a1b775794982035 
> 
> 
> Diff: https://reviews.apache.org/r/60525/diff/8/
> 
> 
> Testing
> -------
> 
> `make check`
> 
> 
> Thanks,
> 
> Gastón Kleiman
> 
>


Re: Review Request 60525: Fixed the default filter used by the allocator.

Posted by Gastón Kleiman <ga...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60525/
-----------------------------------------------------------

(Updated Aug. 12, 2017, 1:07 a.m.)


Review request for mesos, Alexander Rukletsov, Benjamin Mahler, Greg Mann, and Vinod Kone.


Changes
-------

Fixed all the things!


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


Repository: mesos


Description
-------

If a framework accepts/refuses an offer using a very long filter, the
`HierarchicalAllocator` will use the default filter instead. Meaning
that it will filter the resources for only 5 seconds. This can happen
when a framework sets `Filter::refuse_seconds` to a number of seconds
larger than what fits in `Duration`.

This patch makes the hierarchical allocator cap the filter duration to
at most 365 days.


Diffs (updated)
-----

  docs/scheduler-http-api.md 4a5d77b88ae7cf0a0d8d39fe2579eb68bf33059a 
  include/mesos/mesos.proto 50a5caf2623fff7d371753cbc6e842779fbf9769 
  include/mesos/v1/mesos.proto 9d47a8a3a2f10fa493b4db35a73f33e6ee1ac727 
  src/master/allocator/mesos/hierarchical.cpp f021c34ef11aac42026ba39c5a1b775794982035 


Diff: https://reviews.apache.org/r/60525/diff/7/

Changes: https://reviews.apache.org/r/60525/diff/6-7/


Testing
-------

`make check`


Thanks,

Gastón Kleiman


Re: Review Request 60525: Fixed the default filter used by the allocator.

Posted by Gastón Kleiman <ga...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60525/
-----------------------------------------------------------

(Updated July 26, 2017, 11:30 p.m.)


Review request for mesos, Alexander Rukletsov, Benjamin Mahler, Greg Mann, and Vinod Kone.


Changes
-------

I had some offline discussions with Greg, BenM, and Vinod. We agreed to cap the filter duration to at most 365 days.


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


Repository: mesos


Description (updated)
-------

If a framework accepts/refuses an offer using a very long filter, the
`HierarchicalAllocator` will use the default filter instead. Meaning
that it will filter the resources for only 5 seconds. This can happen
when a framework sets `Filter::refuse_seconds` to a number of seconds
larger than what fits in `Duration`.

This patch makes the hierarchical allocator cap the filter duration to
at most 365 days.


Diffs (updated)
-----

  include/mesos/mesos.proto 41e42b4996235cbee26f580f4a7aa2daed166b7f 
  include/mesos/v1/mesos.proto 9de282f85b8d0ba91fa3de85acd5d0f4082a47d8 
  src/master/allocator/mesos/hierarchical.cpp f021c34ef11aac42026ba39c5a1b775794982035 


Diff: https://reviews.apache.org/r/60525/diff/5/

Changes: https://reviews.apache.org/r/60525/diff/4-5/


Testing
-------

`make check`


Thanks,

Gastón Kleiman


Re: Review Request 60525: Fixed the default filter used by the allocator.

Posted by Mesos Reviewbot Windows <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60525/#review180358
-----------------------------------------------------------



Bad patch!

Reviews applied: [60525, 60721, 60524]

Failed command: python support/apply-reviews.py -n -r 60524

Error:
Traceback (most recent call last):
  File "support/apply-reviews.py", line 417, in <module>
    main()
  File "support/apply-reviews.py", line 412, in main
    reviewboard(options)
  File "support/apply-reviews.py", line 402, in reviewboard
    apply_review(options)
  File "support/apply-reviews.py", line 160, in apply_review
    commit_patch(options)
  File "support/apply-reviews.py", line 268, in commit_patch
    shell(cmd, options['dry_run'])
  File "support/apply-reviews.py", line 144, in shell
    error_code = subprocess.call(command, stderr=subprocess.STDOUT, shell=True)
  File "C:\Python27\lib\subprocess.py", line 168, in call
    return Popen(*popenargs, **kwargs).wait()
  File "C:\Python27\lib\subprocess.py", line 390, in __init__
    errread, errwrite)
  File "C:\Python27\lib\subprocess.py", line 610, in _execute_child
    args = '{} /c "{}"'.format (comspec, args)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xf3' in position 25: ordinal not in range(128)

Full log: http://mesos-winbot.westus.cloudapp.azure.com/logs/141/console

- Mesos Reviewbot Windows


On July 12, 2017, 9:41 p.m., Gastón Kleiman wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60525/
> -----------------------------------------------------------
> 
> (Updated July 12, 2017, 9:41 p.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov, Benjamin Mahler, Greg Mann, and Vinod Kone.
> 
> 
> Bugs: MESOS-7660
>     https://issues.apache.org/jira/browse/MESOS-7660
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> If a framework accepts/refuses an offer using a very long filter, the
> `HierarchicalAllocator` will use the default filter instead. Meaning
> that it will filter the resources for only 5 seconds. This can happen
> when a framework sets `Filter::refuse_seconds` to a number of seconds
> larger than what fits in `Duration`.
> 
> This patch makes the allocator use the largest possible filter duration
> in this case.
> 
> 
> Diffs
> -----
> 
>   src/master/allocator/mesos/hierarchical.cpp f021c34ef11aac42026ba39c5a1b775794982035 
> 
> 
> Diff: https://reviews.apache.org/r/60525/diff/4/
> 
> 
> Testing
> -------
> 
> `make check`
> 
> 
> Thanks,
> 
> Gastón Kleiman
> 
>


Re: Review Request 60525: Fixed the default filter used by the allocator.

Posted by Gastón Kleiman <ga...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60525/
-----------------------------------------------------------

(Updated July 12, 2017, 9:41 p.m.)


Review request for mesos, Alexander Rukletsov, Benjamin Mahler, Greg Mann, and Vinod Kone.


Changes
-------

Added a blank line, fixed whitespace.


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


Repository: mesos


Description
-------

If a framework accepts/refuses an offer using a very long filter, the
`HierarchicalAllocator` will use the default filter instead. Meaning
that it will filter the resources for only 5 seconds. This can happen
when a framework sets `Filter::refuse_seconds` to a number of seconds
larger than what fits in `Duration`.

This patch makes the allocator use the largest possible filter duration
in this case.


Diffs (updated)
-----

  src/master/allocator/mesos/hierarchical.cpp f021c34ef11aac42026ba39c5a1b775794982035 


Diff: https://reviews.apache.org/r/60525/diff/4/

Changes: https://reviews.apache.org/r/60525/diff/3-4/


Testing
-------

`make check`


Thanks,

Gastón Kleiman


Re: Review Request 60525: Fixed the default filter used by the allocator.

Posted by Gastón Kleiman <ga...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60525/
-----------------------------------------------------------

(Updated July 8, 2017, 12:03 a.m.)


Review request for mesos, Alexander Rukletsov, Benjamin Mahler, Greg Mann, and Vinod Kone.


Changes
-------

Addressed feedback.


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


Repository: mesos


Description
-------

If a framework accepts/refuses an offer using a very long filter, the
`HierarchicalAllocator` will use the default filter instead. Meaning
that it will filter the resources for only 5 seconds. This can happen
when a framework sets `Filter::refuse_seconds` to a number of seconds
larger than what fits in `Duration`.

This patch makes the allocator use the largest possible filter duration
in this case.


Diffs (updated)
-----

  src/master/allocator/mesos/hierarchical.cpp eb01d8e6b1108866ebc049f9f4a46157823a3541 


Diff: https://reviews.apache.org/r/60525/diff/3/

Changes: https://reviews.apache.org/r/60525/diff/2-3/


Testing
-------

`make check`


Thanks,

Gastón Kleiman


Re: Review Request 60525: Fixed the default filter used by the allocator.

Posted by Gastón Kleiman <ga...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60525/
-----------------------------------------------------------

(Updated July 7, 2017, 11:47 p.m.)


Review request for mesos, Alexander Rukletsov, Benjamin Mahler, Greg Mann, and Vinod Kone.


Changes
-------

Addressed feedback.


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


Repository: mesos


Description
-------

If a framework accepts/refuses an offer using a very long filter, the
`HierarchicalAllocator` will use the default filter instead. Meaning
that it will filter the resources for only 5 seconds. This can happen
when a framework sets `Filter::refuse_seconds` to a number of seconds
larger than what fits in `Duration`.

This patch makes the allocator use the largest possible filter duration
in this case.


Diffs (updated)
-----

  src/master/allocator/mesos/hierarchical.cpp eb01d8e6b1108866ebc049f9f4a46157823a3541 


Diff: https://reviews.apache.org/r/60525/diff/2/

Changes: https://reviews.apache.org/r/60525/diff/1-2/


Testing
-------

`make check`


Thanks,

Gastón Kleiman


Re: Review Request 60525: Fixed the default filter used by the allocator.

Posted by Greg Mann <gr...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60525/#review179938
-----------------------------------------------------------



As we discussed, let's check with benM, alexR about whether or not this new behavior is appropriate. Looks good to me, but I'd like to confirm with them.


src/master/allocator/mesos/hierarchical.cpp
Line 1044 (original), 1044 (patched)
<https://reviews.apache.org/r/60525/#comment254876>

    ;;



src/master/allocator/mesos/hierarchical.cpp
Lines 1046-1052 (patched)
<https://reviews.apache.org/r/60525/#comment254880>

    Consider nesting this within the `seconds.isError` check, here and below.


- Greg Mann


On June 28, 2017, 11:25 p.m., Gastón Kleiman wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60525/
> -----------------------------------------------------------
> 
> (Updated June 28, 2017, 11:25 p.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov, Benjamin Mahler, Greg Mann, and Vinod Kone.
> 
> 
> Bugs: MESOS-7660
>     https://issues.apache.org/jira/browse/MESOS-7660
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> If a framework accepts/refuses an offer using a very long filter, the
> `HierarchicalAllocator` will use the default filter instead. Meaning
> that it will filter the resources for only 5 seconds. This can happen
> when a framework sets `Filter::refuse_seconds` to a number of seconds
> larger than what fits in `Duration`.
> 
> This patch makes the allocator use the largest possible filter duration
> in this case.
> 
> 
> Diffs
> -----
> 
>   src/master/allocator/mesos/hierarchical.cpp eb01d8e6b1108866ebc049f9f4a46157823a3541 
> 
> 
> Diff: https://reviews.apache.org/r/60525/diff/1/
> 
> 
> Testing
> -------
> 
> `make check`
> 
> 
> Thanks,
> 
> Gastón Kleiman
> 
>