[ 
https://issues.apache.org/jira/browse/MESOS-6142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15648939#comment-15648939
 ] 

Alexander Rukletsov edited comment on MESOS-6142 at 11/16/16 3:36 PM:
----------------------------------------------------------------------

{noformat}
Commit: 9d0ace758c8e2a444c15ef0c9395c9e4a15c553f [9d0ace7]
Author: Gastón Kleiman gas...@mesosphere.com
Date: 8 November 2016 at 21:57:29 GMT+1
Committer: Alexander Rukletsov al...@apache.org
Commit Date: 8 November 2016 at 22:30:06 GMT+1

Improved the validation of RESERVE operations.

Don't allow a reservation if the framework role
doesn't match the role of all the resources.

Review: https://reviews.apache.org/r/52642/
{noformat}
{noformat}
Commit: a1780704308838d89eac75149cf2ba71da464b46 [a178070]
Author: Gastón Kleiman <gas...@mesosphere.com>
Date: 16 November 2016 at 16:11:37 GMT+1
Committer: Alexander Rukletsov <al...@apache.org>
Commit Date: 16 November 2016 at 16:31:34 GMT+1

Added a test to ensure MESOS-6142 is fixed.

This test ensures that frameworks can't reserve resources using a role
different from the one they registered with.

Review: https://reviews.apache.org/r/53470/
{noformat}


was (Author: alexr):
{noformat}
Commit: 9d0ace758c8e2a444c15ef0c9395c9e4a15c553f [9d0ace7]
Author: Gastón Kleiman gas...@mesosphere.com
Date: 8 November 2016 at 21:57:29 GMT+1
Committer: Alexander Rukletsov al...@apache.org
Commit Date: 8 November 2016 at 22:30:06 GMT+1

Improved the validation of RESERVE operations.

Don't allow a reservation if the framework role
doesn't match the role of all the resources.

Review: https://reviews.apache.org/r/52642/
{noformat}

> Frameworks may RESERVE for an arbitrary role.
> ---------------------------------------------
>
>                 Key: MESOS-6142
>                 URL: https://issues.apache.org/jira/browse/MESOS-6142
>             Project: Mesos
>          Issue Type: Bug
>          Components: allocation, master
>    Affects Versions: 1.0.0, 1.1.0
>            Reporter: Alexander Rukletsov
>            Assignee: Gastón Kleiman
>            Priority: Critical
>              Labels: mesosphere, reservations
>             Fix For: 0.28.3, 1.1.1, 1.2.0, 1.0.3
>
>
> The master does not validate that resources from a reservation request have 
> the same role the framework is registered with. As a result, frameworks may 
> reserve resources for arbitrary roles.
> I've modified the role in [the {{ReserveThenUnreserve}} 
> test|https://github.com/apache/mesos/blob/bca600cf5602ed8227d91af9f73d689da14ad786/src/tests/reservation_tests.cpp#L117]
>  to "yoyo" and observed the following in the test's log:
> {noformat}
> I0908 18:35:43.379122 2138112 master.cpp:3362] Processing ACCEPT call for 
> offers: [ dfaf67e6-7c1c-4988-b427-c49842cb7bb7-O0 ] on agent 
> dfaf67e6-7c1c-4988-b427-c49842cb7bb7-S0 at slave(1)@10.200.181.237:60116 
> (alexr.railnet.train) for framework dfaf67e6-7c1c-4988-b427-c49842cb7bb7-0000 
> (default) at 
> scheduler-ca12a660-9f08-49de-be4e-d452aa3aa6da@10.200.181.237:60116
> I0908 18:35:43.379170 2138112 master.cpp:3022] Authorizing principal 
> 'test-principal' to reserve resources 'cpus(yoyo, test-principal):1; 
> mem(yoyo, test-principal):512'
> I0908 18:35:43.379678 2138112 master.cpp:3642] Applying RESERVE operation for 
> resources cpus(yoyo, test-principal):1; mem(yoyo, test-principal):512 from 
> framework dfaf67e6-7c1c-4988-b427-c49842cb7bb7-0000 (default) at 
> scheduler-ca12a660-9f08-49de-be4e-d452aa3aa6da@10.200.181.237:60116 to agent 
> dfaf67e6-7c1c-4988-b427-c49842cb7bb7-S0 at slave(1)@10.200.181.237:60116 
> (alexr.railnet.train)
> I0908 18:35:43.379767 2138112 master.cpp:7341] Sending checkpointed resources 
> cpus(yoyo, test-principal):1; mem(yoyo, test-principal):512 to agent 
> dfaf67e6-7c1c-4988-b427-c49842cb7bb7-S0 at slave(1)@10.200.181.237:60116 
> (alexr.railnet.train)
> I0908 18:35:43.380273 3211264 slave.cpp:2497] Updated checkpointed resources 
> from  to cpus(yoyo, test-principal):1; mem(yoyo, test-principal):512
> I0908 18:35:43.380574 2674688 hierarchical.cpp:760] Updated allocation of 
> framework dfaf67e6-7c1c-4988-b427-c49842cb7bb7-0000 on agent 
> dfaf67e6-7c1c-4988-b427-c49842cb7bb7-S0 from cpus(*):1; mem(*):512; 
> disk(*):470841; ports(*):[31000-32000] to ports(*):[31000-32000]; cpus(yoyo, 
> test-principal):1; disk(*):470841; mem(yoyo, test-principal):512 with RESERVE 
> operation
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to