You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Andrei Budnik <ab...@mesosphere.com> on 2017/08/15 17:59:43 UTC

Review Request 61666: Added a test to verify filtering of resource reservations on agent.

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

Review request for mesos, Alexander Rojas and Greg Mann.


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


Repository: mesos


Description
-------

This patch extends `SlaveAuthorizerTest.FilterStateEndpoint` test to
check that `/state` endpoint shows resource reservations only for
allowed principal.


Diffs
-----

  src/tests/slave_authorization_tests.cpp 536a8efda0cc1ba08285c379b01af6ec64a82117 


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


Testing
-------

make check (mac os x, fedora 25)


Thanks,

Andrei Budnik


Re: Review Request 61666: Added test to verify filtering of resource reservations & allocations.

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



Patch looks great!

Reviews applied: [60915, 61666]

Passed command: export OS='ubuntu:14.04' BUILDTOOL='autotools' COMPILER='gcc' CONFIGURATION='--verbose' ENVIRONMENT='GLOG_v=1 MESOS_VERBOSE=1'; ./support/docker-build.sh

- Mesos Reviewbot


On Aug. 15, 2017, 5:59 p.m., Andrei Budnik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61666/
> -----------------------------------------------------------
> 
> (Updated Aug. 15, 2017, 5:59 p.m.)
> 
> 
> Review request for mesos, Alexander Rojas and Greg Mann.
> 
> 
> Bugs: MESOS-7892
>     https://issues.apache.org/jira/browse/MESOS-7892
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch extends `SlaveAuthorizerTest.FilterStateEndpoint` test to
> check that agent's `/state` endpoint shows resource reservations and
> allocations based on the 'VIEW_ROLE' permissions of the principal
> doing the request.
> 
> 
> Diffs
> -----
> 
>   src/tests/slave_authorization_tests.cpp 536a8efda0cc1ba08285c379b01af6ec64a82117 
> 
> 
> Diff: https://reviews.apache.org/r/61666/diff/3/
> 
> 
> Testing
> -------
> 
> make check (mac os x, fedora 25)
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>


Re: Review Request 61666: Added test to verify filtering of resource reservations & allocations.

Posted by Andrei Budnik <ab...@mesosphere.com>.

> On Sept. 4, 2017, 12:06 p.m., Alexander Rojas wrote:
> > src/tests/slave_authorization_tests.cpp
> > Lines 185-186 (original), 236-237 (patched)
> > <https://reviews.apache.org/r/61666/diff/4/?file=1806585#file1806585line236>
> >
> >     g/sched1/schedSuperhero/
> >     g/driver1/driverSuperhero/

Fixed.


> On Sept. 4, 2017, 12:06 p.m., Alexander Rojas wrote:
> > src/tests/slave_authorization_tests.cpp
> > Lines 280-281 (patched)
> > <https://reviews.apache.org/r/61666/diff/4/?file=1806585#file1806585line280>
> >
> >     g/sched2/schedMuggle/
> >     g/driver2/driverMuggle/

Fixed.


- Andrei


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


On Aug. 15, 2017, 5:59 p.m., Andrei Budnik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61666/
> -----------------------------------------------------------
> 
> (Updated Aug. 15, 2017, 5:59 p.m.)
> 
> 
> Review request for mesos, Alexander Rojas and Greg Mann.
> 
> 
> Bugs: MESOS-7892
>     https://issues.apache.org/jira/browse/MESOS-7892
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch extends `SlaveAuthorizerTest.FilterStateEndpoint` test to
> check that agent's `/state` endpoint shows resource reservations and
> allocations based on the 'VIEW_ROLE' permissions of the principal
> doing the request.
> 
> 
> Diffs
> -----
> 
>   src/tests/slave_authorization_tests.cpp 536a8efda0cc1ba08285c379b01af6ec64a82117 
> 
> 
> Diff: https://reviews.apache.org/r/61666/diff/5/
> 
> 
> Testing
> -------
> 
> make check (mac os x, fedora 25)
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>


Re: Review Request 61666: Added test to verify filtering of resource reservations & allocations.

Posted by Alexander Rojas <al...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/61666/#review184486
-----------------------------------------------------------


Fix it, then Ship it!




Be consistent in the description, you use sometimes ` and sometimes '


src/tests/slave_authorization_tests.cpp
Lines 185-186 (original), 236-237 (patched)
<https://reviews.apache.org/r/61666/#comment260639>

    g/sched1/schedSuperhero/
    g/driver1/driverSuperhero/



src/tests/slave_authorization_tests.cpp
Lines 280-281 (patched)
<https://reviews.apache.org/r/61666/#comment260640>

    g/sched2/schedMuggle/
    g/driver2/driverMuggle/


- Alexander Rojas


On Aug. 15, 2017, 7:59 p.m., Andrei Budnik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61666/
> -----------------------------------------------------------
> 
> (Updated Aug. 15, 2017, 7:59 p.m.)
> 
> 
> Review request for mesos, Alexander Rojas and Greg Mann.
> 
> 
> Bugs: MESOS-7892
>     https://issues.apache.org/jira/browse/MESOS-7892
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch extends `SlaveAuthorizerTest.FilterStateEndpoint` test to
> check that agent's `/state` endpoint shows resource reservations and
> allocations based on the 'VIEW_ROLE' permissions of the principal
> doing the request.
> 
> 
> Diffs
> -----
> 
>   src/tests/slave_authorization_tests.cpp 536a8efda0cc1ba08285c379b01af6ec64a82117 
> 
> 
> Diff: https://reviews.apache.org/r/61666/diff/4/
> 
> 
> Testing
> -------
> 
> make check (mac os x, fedora 25)
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>


Re: Review Request 61666: Added test to verify filtering of resource reservations & allocations.

Posted by Andrei Budnik <ab...@mesosphere.com>.

> On Aug. 29, 2017, 11:55 a.m., Alexander Rojas wrote:
> > src/tests/slave_authorization_tests.cpp
> > Lines 104-105 (original), 104-105 (patched)
> > <https://reviews.apache.org/r/61666/diff/3/?file=1806144#file1806144line104>
> >
> >     Remove this, it is not relevant anymore.

I've updated the checks. So, this comment is relevant again.


> On Aug. 29, 2017, 11:55 a.m., Alexander Rojas wrote:
> > src/tests/slave_authorization_tests.cpp
> > Lines 106-109 (patched)
> > <https://reviews.apache.org/r/61666/diff/3/?file=1806144#file1806144line106>
> >
> >     Mention that two frameworks are launched with one task on each.

Done.


> On Aug. 29, 2017, 11:55 a.m., Alexander Rojas wrote:
> > src/tests/slave_authorization_tests.cpp
> > Line 168 (original), 197 (patched)
> > <https://reviews.apache.org/r/61666/diff/3/?file=1806144#file1806144line197>
> >
> >     I'm wondering if instead of _framework1_ and _framework2_, we can name it _frameworkSuperhero_ and _frameworkMuggle_. It will make everything easier to read.
> >     
> >     Same for executors and tasks.

Fixed.


> On Aug. 29, 2017, 11:55 a.m., Alexander Rojas wrote:
> > src/tests/slave_authorization_tests.cpp
> > Line 212 (original), 277 (patched)
> > <https://reviews.apache.org/r/61666/diff/3/?file=1806144#file1806144line279>
> >
> >     Perhaps a comment indicating that this task will run on executor1 of framework1

Done.


- Andrei


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


On Aug. 15, 2017, 5:59 p.m., Andrei Budnik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61666/
> -----------------------------------------------------------
> 
> (Updated Aug. 15, 2017, 5:59 p.m.)
> 
> 
> Review request for mesos, Alexander Rojas and Greg Mann.
> 
> 
> Bugs: MESOS-7892
>     https://issues.apache.org/jira/browse/MESOS-7892
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch extends `SlaveAuthorizerTest.FilterStateEndpoint` test to
> check that agent's `/state` endpoint shows resource reservations and
> allocations based on the 'VIEW_ROLE' permissions of the principal
> doing the request.
> 
> 
> Diffs
> -----
> 
>   src/tests/slave_authorization_tests.cpp 536a8efda0cc1ba08285c379b01af6ec64a82117 
> 
> 
> Diff: https://reviews.apache.org/r/61666/diff/4/
> 
> 
> Testing
> -------
> 
> make check (mac os x, fedora 25)
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>


Re: Review Request 61666: Added test to verify filtering of resource reservations & allocations.

Posted by Alexander Rojas <al...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/61666/#review184042
-----------------------------------------------------------




src/tests/slave_authorization_tests.cpp
Lines 104-105 (original), 104-105 (patched)
<https://reviews.apache.org/r/61666/#comment260043>

    Remove this, it is not relevant anymore.



src/tests/slave_authorization_tests.cpp
Lines 106-109 (patched)
<https://reviews.apache.org/r/61666/#comment260044>

    Mention that two frameworks are launched with one task on each.



src/tests/slave_authorization_tests.cpp
Line 168 (original), 197 (patched)
<https://reviews.apache.org/r/61666/#comment260046>

    I'm wondering if instead of _framework1_ and _framework2_, we can name it _frameworkSuperhero_ and _frameworkMuggle_. It will make everything easier to read.
    
    Same for executors and tasks.



src/tests/slave_authorization_tests.cpp
Line 212 (original), 277 (patched)
<https://reviews.apache.org/r/61666/#comment260045>

    Perhaps a comment indicating that this task will run on executor1 of framework1


- Alexander Rojas


On Aug. 15, 2017, 7:59 p.m., Andrei Budnik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61666/
> -----------------------------------------------------------
> 
> (Updated Aug. 15, 2017, 7:59 p.m.)
> 
> 
> Review request for mesos, Alexander Rojas and Greg Mann.
> 
> 
> Bugs: MESOS-7892
>     https://issues.apache.org/jira/browse/MESOS-7892
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch extends `SlaveAuthorizerTest.FilterStateEndpoint` test to
> check that agent's `/state` endpoint shows resource reservations and
> allocations based on the 'VIEW_ROLE' permissions of the principal
> doing the request.
> 
> 
> Diffs
> -----
> 
>   src/tests/slave_authorization_tests.cpp 536a8efda0cc1ba08285c379b01af6ec64a82117 
> 
> 
> Diff: https://reviews.apache.org/r/61666/diff/3/
> 
> 
> Testing
> -------
> 
> make check (mac os x, fedora 25)
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>


Re: Review Request 61666: Added test to verify filtering of resource reservations & allocations.

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



Patch looks great!

Reviews applied: [60915, 61666]

Passed command: export OS='ubuntu:14.04' BUILDTOOL='autotools' COMPILER='gcc' CONFIGURATION='--verbose' ENVIRONMENT='GLOG_v=1 MESOS_VERBOSE=1'; ./support/docker-build.sh

- Mesos Reviewbot


On Aug. 16, 2017, 1:59 a.m., Andrei Budnik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61666/
> -----------------------------------------------------------
> 
> (Updated Aug. 16, 2017, 1:59 a.m.)
> 
> 
> Review request for mesos, Alexander Rojas and Greg Mann.
> 
> 
> Bugs: MESOS-7892
>     https://issues.apache.org/jira/browse/MESOS-7892
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch extends `SlaveAuthorizerTest.FilterStateEndpoint` test to
> check that agent's `/state` endpoint shows resource reservations and
> allocations based on the 'VIEW_ROLE' permissions of the principal
> doing the request.
> 
> 
> Diffs
> -----
> 
>   src/tests/slave_authorization_tests.cpp 536a8efda0cc1ba08285c379b01af6ec64a82117 
> 
> 
> Diff: https://reviews.apache.org/r/61666/diff/2/
> 
> 
> Testing
> -------
> 
> make check (mac os x, fedora 25)
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>


Re: Review Request 61666: Added a test to verify filtering of resource reservations on agent.

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



Patch looks great!

Reviews applied: [60915, 61666]

Passed command: support\windows-build.bat

- Mesos Reviewbot Windows


On Aug. 15, 2017, 5:59 p.m., Andrei Budnik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61666/
> -----------------------------------------------------------
> 
> (Updated Aug. 15, 2017, 5:59 p.m.)
> 
> 
> Review request for mesos, Alexander Rojas and Greg Mann.
> 
> 
> Bugs: MESOS-7892
>     https://issues.apache.org/jira/browse/MESOS-7892
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch extends `SlaveAuthorizerTest.FilterStateEndpoint` test to
> check that `/state` endpoint shows resource reservations only for
> allowed principal.
> 
> 
> Diffs
> -----
> 
>   src/tests/slave_authorization_tests.cpp 536a8efda0cc1ba08285c379b01af6ec64a82117 
> 
> 
> Diff: https://reviews.apache.org/r/61666/diff/1/
> 
> 
> Testing
> -------
> 
> make check (mac os x, fedora 25)
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>


Re: Review Request 61666: Added test to verify filtering of resource reservations & allocations.

Posted by Andrei Budnik <ab...@mesosphere.com>.

> On Aug. 21, 2017, 10:12 a.m., Alexander Rojas wrote:
> > src/tests/slave_authorization_tests.cpp
> > Lines 106 (patched)
> > <https://reviews.apache.org/r/61666/diff/1/?file=1798000#file1798000line106>
> >
> >     _Only one default user…_

This comment was rewritten.


> On Aug. 21, 2017, 10:12 a.m., Alexander Rojas wrote:
> > src/tests/slave_authorization_tests.cpp
> > Lines 164 (patched)
> > <https://reviews.apache.org/r/61666/diff/1/?file=1798000#file1798000line164>
> >
> >     I would rather have `acl->mutable_roles()->add_value(role_name)`

Fixed.


> On Aug. 21, 2017, 10:12 a.m., Alexander Rojas wrote:
> > src/tests/slave_authorization_tests.cpp
> > Lines 195 (patched)
> > <https://reviews.apache.org/r/61666/diff/1/?file=1798000#file1798000line195>
> >
> >     can you give it a better name to this role, even _test-role_ would do, but if you look at api tests we use other things like _superhero_ or _muggle_.

I've introduced two roles *superhero* and *muggle*.
The test has been changed significantly.


- Andrei


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


On Aug. 15, 2017, 5:59 p.m., Andrei Budnik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61666/
> -----------------------------------------------------------
> 
> (Updated Aug. 15, 2017, 5:59 p.m.)
> 
> 
> Review request for mesos, Alexander Rojas and Greg Mann.
> 
> 
> Bugs: MESOS-7892
>     https://issues.apache.org/jira/browse/MESOS-7892
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch extends `SlaveAuthorizerTest.FilterStateEndpoint` test to
> check that agent's `/state` endpoint shows resource reservations and
> allocations based on the 'VIEW_ROLE' permissions of the principal
> doing the request.
> 
> 
> Diffs
> -----
> 
>   src/tests/slave_authorization_tests.cpp 536a8efda0cc1ba08285c379b01af6ec64a82117 
> 
> 
> Diff: https://reviews.apache.org/r/61666/diff/2/
> 
> 
> Testing
> -------
> 
> make check (mac os x, fedora 25)
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>


Re: Review Request 61666: Added a test to verify filtering of resource reservations on agent.

Posted by Alexander Rojas <al...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/61666/#review183321
-----------------------------------------------------------




src/tests/slave_authorization_tests.cpp
Lines 106 (patched)
<https://reviews.apache.org/r/61666/#comment259359>

    _Only one default user…_



src/tests/slave_authorization_tests.cpp
Lines 164 (patched)
<https://reviews.apache.org/r/61666/#comment259363>

    I would rather have `acl->mutable_roles()->add_value(role_name)`



src/tests/slave_authorization_tests.cpp
Lines 195 (patched)
<https://reviews.apache.org/r/61666/#comment259362>

    can you give it a better name to this role, even _test-role_ would do, but if you look at api tests we use other things like _superhero_ or _muggle_.


- Alexander Rojas


On Aug. 15, 2017, 7:59 p.m., Andrei Budnik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61666/
> -----------------------------------------------------------
> 
> (Updated Aug. 15, 2017, 7:59 p.m.)
> 
> 
> Review request for mesos, Alexander Rojas and Greg Mann.
> 
> 
> Bugs: MESOS-7892
>     https://issues.apache.org/jira/browse/MESOS-7892
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch extends `SlaveAuthorizerTest.FilterStateEndpoint` test to
> check that `/state` endpoint shows resource reservations only for
> allowed principal.
> 
> 
> Diffs
> -----
> 
>   src/tests/slave_authorization_tests.cpp 536a8efda0cc1ba08285c379b01af6ec64a82117 
> 
> 
> Diff: https://reviews.apache.org/r/61666/diff/1/
> 
> 
> Testing
> -------
> 
> make check (mac os x, fedora 25)
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>


Re: Review Request 61666: Added test to verify filtering of resource reservations & allocations.

Posted by Andrei Budnik <ab...@mesosphere.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/61666/
-----------------------------------------------------------

(Updated Sept. 4, 2017, 2:59 p.m.)


Review request for mesos, Alexander Rojas and Greg Mann.


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


Repository: mesos


Description
-------

This patch extends `SlaveAuthorizerTest.FilterStateEndpoint` test to
check that agent's `/state` endpoint shows resource reservations and
allocations based on the 'VIEW_ROLE' permissions of the principal
doing the request.


Diffs (updated)
-----

  src/tests/slave_authorization_tests.cpp 536a8efda0cc1ba08285c379b01af6ec64a82117 


Diff: https://reviews.apache.org/r/61666/diff/6/

Changes: https://reviews.apache.org/r/61666/diff/5-6/


Testing
-------

make check (mac os x, fedora 25)


Thanks,

Andrei Budnik


Re: Review Request 61666: Added test to verify filtering of resource reservations & allocations.

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



Patch looks great!

Reviews applied: [60915, 61666]

Passed command: export OS='ubuntu:14.04' BUILDTOOL='autotools' COMPILER='gcc' CONFIGURATION='--verbose' ENVIRONMENT='GLOG_v=1 MESOS_VERBOSE=1'; ./support/docker-build.sh

- Mesos Reviewbot


On Aug. 15, 2017, 5:59 p.m., Andrei Budnik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61666/
> -----------------------------------------------------------
> 
> (Updated Aug. 15, 2017, 5:59 p.m.)
> 
> 
> Review request for mesos, Alexander Rojas and Greg Mann.
> 
> 
> Bugs: MESOS-7892
>     https://issues.apache.org/jira/browse/MESOS-7892
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch extends `SlaveAuthorizerTest.FilterStateEndpoint` test to
> check that agent's `/state` endpoint shows resource reservations and
> allocations based on the 'VIEW_ROLE' permissions of the principal
> doing the request.
> 
> 
> Diffs
> -----
> 
>   src/tests/slave_authorization_tests.cpp 536a8efda0cc1ba08285c379b01af6ec64a82117 
> 
> 
> Diff: https://reviews.apache.org/r/61666/diff/4/
> 
> 
> Testing
> -------
> 
> make check (mac os x, fedora 25)
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>