You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Benjamin Bannier <be...@mesosphere.io> on 2018/05/28 15:11:28 UTC

Review Request 67344: Made disk allocatable on their own.

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

Review request for mesos, Benjamin Mahler, Gaston Kleiman, and Jie Yu.


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


Repository: mesos


Description
-------

This patch makes it possible to offer `disk` resources in isolation
which previously was only possible for `cpus` or `mem` resources.

While it is not possible to perform launch operations on `disk`
resources alone, frameworks could still perform most other operations
on them. With the introduction of resource providers we introduced
operations which do not take effect immediately, but only after the
master has received a status update on the operations success, so that
with the changes here frameworks can now operate on `disk` resources
independently of task launch operations.

Since resource provider resources are independent from agent-default
resources, the full agent resources are not necessarily in the same
role. Due to the way the default allocator takes roles into account,
this could in the past have lead to situations where it was impossible
to find suitable `cpus` or `mem` resources to make `disk` resources
from some other role offerable at all. This problem also disappears if
`disk` become offerable on their own.


Diffs
-----

  src/master/allocator/mesos/hierarchical.cpp b558228290e5ae6dbcc1b8a6e1fe69db9fd5874c 
  src/master/constants.hpp b31e5f027b44d371050cea9a4662a4b54127812f 
  src/tests/hierarchical_allocator_tests.cpp c97b2ba0884a7ded867c2d80e4749de54c89b5e4 
  src/tests/persistent_volume_tests.cpp 43f31b2e613666a989c205b8543ef1cde484d93c 


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


Testing
-------

`make check`


Thanks,

Benjamin Bannier


Re: Review Request 67344: Made disk allocatable on their own.

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



FAIL: Some of the unit tests failed. Please check the relevant logs.

Reviews applied: `['67344']`

Failed command: `Start-MesosCITesting`

All the build artifacts available at: http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/67344

Relevant logs:

- [mesos-tests-stdout.log](http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/67344/logs/mesos-tests-stdout.log):

```
[       OK ] Endpoint/SlaveEndpointTest.NoAuthorizer/2 (120 ms)
[----------] 9 tests from Endpoint/SlaveEndpointTest (1039 ms total)

[----------] 2 tests from ContainerizerType/DefaultContainerDNSFlagTest
[ RUN      ] ContainerizerType/DefaultContainerDNSFlagTest.ValidateFlag/0
[       OK ] ContainerizerType/DefaultContainerDNSFlagTest.ValidateFlag/0 (41 ms)
[ RUN      ] ContainerizerType/DefaultContainerDNSFlagTest.ValidateFlag/1
[       OK ] ContainerizerType/DefaultContainerDNSFlagTest.ValidateFlag/1 (47 ms)
[----------] 2 tests from ContainerizerType/DefaultContainerDNSFlagTest (89 ms total)

[----------] 1 test from IsolationFlag/CpuIsolatorTest
[ RUN      ] IsolationFlag/CpuIsolatorTest.ROOT_UserCpuUsage/0
[       OK ] IsolationFlag/CpuIsolatorTest.ROOT_UserCpuUsage/0 (826 ms)
[----------] 1 test from IsolationFlag/CpuIsolatorTest (850 ms total)

[----------] 1 test from IsolationFlag/MemoryIsolatorTest
[ RUN      ] IsolationFlag/MemoryIsolatorTest.ROOT_MemUsage/0
[       OK ] IsolationFlag/MemoryIsolatorTest.ROOT_MemUsage/0 (733 ms)
[----------] 1 test from IsolationFlag/MemoryIsolatorTest (759 ms total)

[----------] Global test environment tear-down
[==========] 980 tests from 95 test cases ran. (466328 ms total)
[  PASSED  ] 979 tests.
[  FAILED  ] 1 test, listed below:
[  FAILED  ] RoleTest.ImplicitRoleStaticReservation

 1 FAILED TEST
  YOU HAVE 220 DISABLED TESTS

```

- [mesos-tests-stderr.log](http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/67344/logs/mesos-tests-stderr.log):

```
I0529 16:15:00.307246 14216 master.cpp:10843] Updating the state of task b653d684-ad2a-4f76-a324-c3103c5d97df of framework bc0aa997-0e1c-4231-8b20-fec9a8ce3daf-0000 (latest state: TASK_KILLED, status update state: TASK_KILLED)
I0529 16:15:00.308220  8676 slave.cpp:3935] Shutting down framework bc0aa997-0e1c-4231-8b20-fec9a8ce3daf-0000
I0529 16:15:00.308220  8676 slave.cpp:6656] Shutting down executor 'b653d684-ad2a-4f76-a324-c3103c5d97df' of framework bc0aa997-0e1c-4231-8b20-fec9a8ce3daf-0000 at executor(1)@192.10.1.5:51588
I0529 16:15:00.309227  8676 slave.cpp:929] Agent I0529 16:15:00.135238 15052 exec.cpp:162] Version: 1.7.0
I0529 16:15:00.162236 15632 exec.cpp:236] Executor registered on agent bc0aa997-0e1c-4231-8b20-fec9a8ce3daf-S0
I0529 16:15:00.166225  9996 executor.cpp:178] Received SUBSCRIBED event
I0529 16:15:00.171244  9996 executor.cpp:182] Subscribed executor on windows-01.enofukwu14ruplxn0gs3yzmsgf.xx.internal.cloudapp.net
I0529 16:15:00.171244  9996 executor.cpp:178] Received LAUNCH event
I0529 16:15:00.176244  9996 executor.cpp:665] Starting task b653d684-ad2a-4f76-a324-c3103c5d97df
I0529 16:15:00.261247  9996 executor.cpp:485] Running 'D:\DCOS\mesos\src\mesos-containerizer.exe launch <POSSIBLY-SENSITIVE-DATA>'
I0529 16:15:00.280213  9996 executor.cpp:678] Forked command at 2040
I0529 16:15:00.309227 15944 exec.cpp:445] Executor asked to shutdown
I0529 16:15:00.310227 11812 executor.cpp:178] Received SHUTDOWN event
I0529 16:15:00.310227 11812 executor.cpp:781] Shutting down
I0529 16:15:00.310227 11812 executor.cpp:894] Sending SIGTERM to process tree at pid 204terminating
W0529 16:15:00.310227  8676 slave.cpp:3931] Ignoring shutdown framework bc0aa997-0e1c-4231-8b20-fec9a8ce3daf-0000 because it is terminating
I0529 16:15:00.310227 14216 master.cpp:10942] Removing task b653d684-ad2a-4f76-a324-c3103c5d97df with resources cpus(allocated: *):4; mem(allocated: *):2048; disk(allocated: *):1024; ports(allocated: *):[31000-32000] of framework bc0aa997-0e1c-4231-8b20-fec9a8ce3daf-0000 on agent bc0aa997-0e1c-4231-8b20-fec9a8ce3daf-S0 at slave(447)@192.10.1.5:51567 (windows-01.enofukwu14ruplxn0gs3yzmsgf.xx.internal.cloudapp.net)
I0529 16:15:00.313230 14216 master.cpp:1293] Agent bc0aa997-0e1c-4231-8b20-fec9a8ce3daf-S0 at slave(447)@192.10.1.5:51567 (windows-01.enofukwu14ruplxn0gs3yzmsgf.xx.internal.cloudapp.net) disconnected
I0529 16:15:00.313230 14216 master.cpp:3303] Disconnecting agent bc0aa997-0e1c-4231-8b20-fec9a8ce3daf-S0 at slave(447)@192.10.1.5:51567 (windows-01.enofukwu14ruplxn0gs3yzmsgf.xx.internal.cloudapp.net)
I0529 16:15:00.313230 14216 master.cpp:3322] Deactivating agent bc0aa997-0e1c-4231-8b20-fec9a8ce3daf-S0 at slave(447)@192.10.1.5:51567 (windows-01.enofukwu14ruplxn0gs3yzmsgf.xx.internal.cloudapp.net)
I0529 16:15:00.314246 14272 hierarchical.cpp:344] Removed framework bc0aa997-0e1c-4231-8b20-fec9a8ce3daf-0000
I0529 16:15:00.314246 10588 containerizer.cpp:2406] Destroying container 6c102d79-1678-4a3d-83f2-cff36d393769 in RUNNING state
I0529 16:15:00.314246  5764 hierarchical.cpp:766] Agent bc0aa997-0e1c-4231-8b20-fec9a8ce3daf-S0 deactivated
I0529 16:15:00.314246 10588 containerizer.cpp:3020] Transitioning the state of container 6c102d79-1678-4a3d-83f2-cff36d393769 from RUNNING to DESTROYING
I0529 16:15:00.315248 10588 launcher.cpp:156] Asked to destroy container 6c102d79-1678-4a3d-83f2-cff36d393769
I0529 16:15:00.347250  3392 containerizer.cpp:2859] Container 6c102d79-1678-4a3d-83f2-cff36d393769 has exited
I0529 16:15:00.377249  6836 master.cpp:1135] Master terminating
I0529 16:15:00.380247 14216 hierarchical.cpp:609] Removed agent bc0aa997-0e1c-4231-8b20-fec9a8ce3daf-S0
I0529 16:15:00.804260 11052 process.cpp:940] Stopped the socket accept loop
```

- Mesos Reviewbot Windows


On May 28, 2018, 8:11 a.m., Benjamin Bannier wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/67344/
> -----------------------------------------------------------
> 
> (Updated May 28, 2018, 8:11 a.m.)
> 
> 
> Review request for mesos, Benjamin Mahler, Gaston Kleiman, and Jie Yu.
> 
> 
> Bugs: MESOS-8626
>     https://issues.apache.org/jira/browse/MESOS-8626
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch makes it possible to offer `disk` resources in isolation
> which previously was only possible for `cpus` or `mem` resources.
> 
> While it is not possible to perform launch operations on `disk`
> resources alone, frameworks could still perform most other operations
> on them. With the introduction of resource providers we introduced
> operations which do not take effect immediately, but only after the
> master has received a status update on the operations success, so that
> with the changes here frameworks can now operate on `disk` resources
> independently of task launch operations.
> 
> Since resource provider resources are independent from agent-default
> resources, the full agent resources are not necessarily in the same
> role. Due to the way the default allocator takes roles into account,
> this could in the past have lead to situations where it was impossible
> to find suitable `cpus` or `mem` resources to make `disk` resources
> from some other role offerable at all. This problem also disappears if
> `disk` become offerable on their own.
> 
> 
> Diffs
> -----
> 
>   src/master/allocator/mesos/hierarchical.cpp b558228290e5ae6dbcc1b8a6e1fe69db9fd5874c 
>   src/master/constants.hpp b31e5f027b44d371050cea9a4662a4b54127812f 
>   src/tests/hierarchical_allocator_tests.cpp c97b2ba0884a7ded867c2d80e4749de54c89b5e4 
>   src/tests/persistent_volume_tests.cpp 43f31b2e613666a989c205b8543ef1cde484d93c 
> 
> 
> Diff: https://reviews.apache.org/r/67344/diff/1/
> 
> 
> Testing
> -------
> 
> `make check`
> 
> 
> Thanks,
> 
> Benjamin Bannier
> 
>


Re: Review Request 67344: WIP: Made disk allocatable on their own.

Posted by Benjamin Bannier <be...@mesosphere.io>.

> On May 31, 2018, 10:34 p.m., Benjamin Mahler wrote:
> > Gaston is also working on making the allocation "minimums" configurable, e.g.
> > 
> > ```
> > Probably want to have an AND by default to avoid MESOS-8935:
> > --allocation_minimums=cpus:0.01;mem:32
> > 
> > Currently we have effectively an OR:
> > --allocation_minimums=cpus:0.01,mem:32
> > ```
> > 
> > We would probably want this default to be an AND of resources to avoid MESOS-8935. Once we have "storage" frameworks that only want disk, we would probably allow a per-framework override of the allocation minimums, requiring those special frameworks to specify their minimums.
> > 
> > Make sense?

I updated this patch with another test case, but I believe this is now blocked by Gaston's/Greg's work. Will leave the patch as `WIP` for now.


- Benjamin


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


On June 1, 2018, 5:41 p.m., Benjamin Bannier wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/67344/
> -----------------------------------------------------------
> 
> (Updated June 1, 2018, 5:41 p.m.)
> 
> 
> Review request for mesos, Benjamin Mahler, Gaston Kleiman, Greg Mann, and Jie Yu.
> 
> 
> Bugs: MESOS-8626
>     https://issues.apache.org/jira/browse/MESOS-8626
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch makes it possible to offer `disk` resources in isolation
> which previously was only possible for `cpus` or `mem` resources.
> 
> While it is not possible to perform launch operations on `disk`
> resources alone, frameworks could still perform most other operations
> on them. With the introduction of resource providers we introduced
> operations which do not take effect immediately, but only after the
> master has received a status update on the operations success, so that
> with the changes here frameworks can now operate on `disk` resources
> independently of task launch operations.
> 
> Since resource provider resources are independent from agent-default
> resources, the full agent resources are not necessarily in the same
> role. Due to the way the default allocator takes roles into account,
> this could in the past have lead to situations where it was impossible
> to find suitable `cpus` or `mem` resources to make `disk` resources
> from some other role offerable at all. This problem also disappears if
> `disk` become offerable on their own.
> 
> 
> Diffs
> -----
> 
>   src/master/allocator/mesos/hierarchical.cpp b558228290e5ae6dbcc1b8a6e1fe69db9fd5874c 
>   src/master/constants.hpp b31e5f027b44d371050cea9a4662a4b54127812f 
>   src/tests/hierarchical_allocator_tests.cpp c97b2ba0884a7ded867c2d80e4749de54c89b5e4 
>   src/tests/master_allocator_tests.cpp e1aef8a9625a805e7ad2dfad37bfeedee82f160d 
>   src/tests/persistent_volume_tests.cpp 43f31b2e613666a989c205b8543ef1cde484d93c 
> 
> 
> Diff: https://reviews.apache.org/r/67344/diff/2/
> 
> 
> Testing
> -------
> 
> `make check`
> 
> 
> Thanks,
> 
> Benjamin Bannier
> 
>


Re: Review Request 67344: Made disk allocatable on their own.

Posted by Benjamin Mahler <bm...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/67344/#review204142
-----------------------------------------------------------



Gaston is also working on making the allocation "minimums" configurable, e.g.

```
Probably want to have an AND by default to avoid MESOS-8935:
--allocation_minimums=cpus:0.01;mem:32

Currently we have effectively an OR:
--allocation_minimums=cpus:0.01,mem:32
```

We would probably want this default to be an AND of resources to avoid MESOS-8935. Once we have "storage" frameworks that only want disk, we would probably allow a per-framework override of the allocation minimums, requiring those special frameworks to specify their minimums.

Make sense?

- Benjamin Mahler


On May 28, 2018, 3:11 p.m., Benjamin Bannier wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/67344/
> -----------------------------------------------------------
> 
> (Updated May 28, 2018, 3:11 p.m.)
> 
> 
> Review request for mesos, Benjamin Mahler, Gaston Kleiman, and Jie Yu.
> 
> 
> Bugs: MESOS-8626
>     https://issues.apache.org/jira/browse/MESOS-8626
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch makes it possible to offer `disk` resources in isolation
> which previously was only possible for `cpus` or `mem` resources.
> 
> While it is not possible to perform launch operations on `disk`
> resources alone, frameworks could still perform most other operations
> on them. With the introduction of resource providers we introduced
> operations which do not take effect immediately, but only after the
> master has received a status update on the operations success, so that
> with the changes here frameworks can now operate on `disk` resources
> independently of task launch operations.
> 
> Since resource provider resources are independent from agent-default
> resources, the full agent resources are not necessarily in the same
> role. Due to the way the default allocator takes roles into account,
> this could in the past have lead to situations where it was impossible
> to find suitable `cpus` or `mem` resources to make `disk` resources
> from some other role offerable at all. This problem also disappears if
> `disk` become offerable on their own.
> 
> 
> Diffs
> -----
> 
>   src/master/allocator/mesos/hierarchical.cpp b558228290e5ae6dbcc1b8a6e1fe69db9fd5874c 
>   src/master/constants.hpp b31e5f027b44d371050cea9a4662a4b54127812f 
>   src/tests/hierarchical_allocator_tests.cpp c97b2ba0884a7ded867c2d80e4749de54c89b5e4 
>   src/tests/persistent_volume_tests.cpp 43f31b2e613666a989c205b8543ef1cde484d93c 
> 
> 
> Diff: https://reviews.apache.org/r/67344/diff/1/
> 
> 
> Testing
> -------
> 
> `make check`
> 
> 
> Thanks,
> 
> Benjamin Bannier
> 
>


Re: Review Request 67344: WIP: Made disk allocatable on their own.

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



PASS: Mesos patch 67344 was successfully built and tested.

Reviews applied: `['67344']`

All the build artifacts available at: http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/67344

- Mesos Reviewbot Windows


On June 1, 2018, 3:41 p.m., Benjamin Bannier wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/67344/
> -----------------------------------------------------------
> 
> (Updated June 1, 2018, 3:41 p.m.)
> 
> 
> Review request for mesos, Benjamin Mahler, Gaston Kleiman, Greg Mann, and Jie Yu.
> 
> 
> Bugs: MESOS-8626
>     https://issues.apache.org/jira/browse/MESOS-8626
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch makes it possible to offer `disk` resources in isolation
> which previously was only possible for `cpus` or `mem` resources.
> 
> While it is not possible to perform launch operations on `disk`
> resources alone, frameworks could still perform most other operations
> on them. With the introduction of resource providers we introduced
> operations which do not take effect immediately, but only after the
> master has received a status update on the operations success, so that
> with the changes here frameworks can now operate on `disk` resources
> independently of task launch operations.
> 
> Since resource provider resources are independent from agent-default
> resources, the full agent resources are not necessarily in the same
> role. Due to the way the default allocator takes roles into account,
> this could in the past have lead to situations where it was impossible
> to find suitable `cpus` or `mem` resources to make `disk` resources
> from some other role offerable at all. This problem also disappears if
> `disk` become offerable on their own.
> 
> 
> Diffs
> -----
> 
>   src/master/allocator/mesos/hierarchical.cpp b558228290e5ae6dbcc1b8a6e1fe69db9fd5874c 
>   src/master/constants.hpp b31e5f027b44d371050cea9a4662a4b54127812f 
>   src/tests/hierarchical_allocator_tests.cpp c97b2ba0884a7ded867c2d80e4749de54c89b5e4 
>   src/tests/master_allocator_tests.cpp e1aef8a9625a805e7ad2dfad37bfeedee82f160d 
>   src/tests/persistent_volume_tests.cpp 43f31b2e613666a989c205b8543ef1cde484d93c 
> 
> 
> Diff: https://reviews.apache.org/r/67344/diff/2/
> 
> 
> Testing
> -------
> 
> `make check`
> 
> 
> Thanks,
> 
> Benjamin Bannier
> 
>


Re: Review Request 67344: WIP: Made disk allocatable on their own.

Posted by Benjamin Bannier <be...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/67344/
-----------------------------------------------------------

(Updated June 1, 2018, 5:41 p.m.)


Review request for mesos, Benjamin Mahler, Gaston Kleiman, Greg Mann, and Jie Yu.


Changes
-------

Added another test.


Summary (updated)
-----------------

WIP: Made disk allocatable on their own.


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


Repository: mesos


Description
-------

This patch makes it possible to offer `disk` resources in isolation
which previously was only possible for `cpus` or `mem` resources.

While it is not possible to perform launch operations on `disk`
resources alone, frameworks could still perform most other operations
on them. With the introduction of resource providers we introduced
operations which do not take effect immediately, but only after the
master has received a status update on the operations success, so that
with the changes here frameworks can now operate on `disk` resources
independently of task launch operations.

Since resource provider resources are independent from agent-default
resources, the full agent resources are not necessarily in the same
role. Due to the way the default allocator takes roles into account,
this could in the past have lead to situations where it was impossible
to find suitable `cpus` or `mem` resources to make `disk` resources
from some other role offerable at all. This problem also disappears if
`disk` become offerable on their own.


Diffs (updated)
-----

  src/master/allocator/mesos/hierarchical.cpp b558228290e5ae6dbcc1b8a6e1fe69db9fd5874c 
  src/master/constants.hpp b31e5f027b44d371050cea9a4662a4b54127812f 
  src/tests/hierarchical_allocator_tests.cpp c97b2ba0884a7ded867c2d80e4749de54c89b5e4 
  src/tests/master_allocator_tests.cpp e1aef8a9625a805e7ad2dfad37bfeedee82f160d 
  src/tests/persistent_volume_tests.cpp 43f31b2e613666a989c205b8543ef1cde484d93c 


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

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


Testing
-------

`make check`


Thanks,

Benjamin Bannier