Mahmood Ali
d342a24ba0
Only preempt for network when there is a network
...
When examining preemption for networks, only consider allocs that have
networks.
Fixes https://github.com/hashicorp/nomad/issues/5793
2019-06-07 18:55:55 -04:00
Preetha Appan
4743561396
Refactor scheduler package to enable preemption for batch/service jobs
2019-04-10 20:24:01 -05:00
Mahmood Ali
d19245fa7b
appease linter
2019-01-08 10:58:49 -05:00
Preetha Appan
e7162e8bd8
Early continue after meeting needed count
...
Also adds another optimization that filters out un-needed allocations
as a final filtering step
2018-12-11 10:12:18 -06:00
Preetha Appan
3921793030
Score combinations of allocs from multiple devices for preemption
2018-12-07 18:35:47 -06:00
Preetha Appan
4afd512f45
use structured logging everywhere consistently
2018-12-03 08:31:41 -06:00
Preetha Appan
e023b367fa
addresses some code clarity review comments
2018-11-27 11:02:06 -06:00
Mahmood Ali
e7257fe5be
Simplify map count update logic
...
Co-Authored-By: preetapan <preetha@hashicorp.com >
2018-11-27 10:03:11 -06:00
Mahmood Ali
026f976761
code review suggestion
...
Co-Authored-By: preetapan <preetha@hashicorp.com >
2018-11-27 09:59:57 -06:00
Preetha Appan
e8088e404b
Fix formatting
2018-11-16 20:45:52 -06:00
Preetha Appan
7f2826097d
Fix preemption logic bug, need to group allocations by device first.
...
This ensures that the set of allocations chosen for preemption all share
the same device where ID is <vendor/type/device>
2018-11-16 20:32:10 -06:00
Preetha Appan
9dfc27915c
Initial implementation of device preemption
2018-11-15 11:09:26 -06:00
Preetha Appan
ea5d8cb625
update preemption tests to use new node resource structs
...
also includes a fix to remove unnecessary subtraction of network mbits
2018-11-02 17:59:53 -05:00
Preetha Appan
97cf4e1d7a
Address more minor code review feedback
2018-11-02 16:26:34 -05:00
Preetha Appan
1380acbf56
dereference safely
2018-11-02 15:58:59 -05:00
Preetha Appan
8235919158
Fix static port preemption to be device aware
2018-11-02 13:07:24 -05:00
Preetha Appan
0015095b57
Handle static port preemption when there are multiple devices
...
Also added test case
2018-11-02 09:09:50 -05:00
Preetha Appan
06ad182026
Plumb alloc resource cache in a few more places.
...
also removed now unused method
2018-11-01 16:44:43 -05:00
Preetha Appan
3ad7b3fb5b
More review comments
2018-11-01 16:36:11 -05:00
Preetha Appan
993b6a272a
Cleaner way to exit early, and fixed a couple more places reading from alloc.Resources
2018-11-01 16:15:58 -05:00
Preetha Appan
22d156f5a0
review comments
2018-11-01 12:01:59 -05:00
Preetha Appan
17344a7f3a
Introduce interface with multiple implementations for resource distance
2018-10-30 11:06:32 -05:00
Preetha Appan
35635ba39a
refactor preemption code to use method recievers and setters for common fields
2018-10-30 11:06:32 -05:00
Preetha Appan
a960cced8c
comments
2018-10-30 11:06:32 -05:00
Preetha Appan
9f35923db0
fix end to end scheduler test to use new resource structs correctly
2018-10-30 11:06:32 -05:00
Preetha Appan
24b393483a
Modify preemption code to use new style of resource structs
2018-10-30 11:06:32 -05:00
Preetha Appan
fd6bff2332
Fix linting and better comments
2018-10-30 11:06:32 -05:00
Preetha Appan
715d869499
Implement preemption for system jobs.
...
This commit implements an allocation selection algorithm for finding
allocations to preempt. It currently special cases network resource asks
from others (cpu/memory/disk/iops).
2018-10-30 11:06:32 -05:00