Commit Graph

10 Commits

Author SHA1 Message Date
Alex Dadgar
bc42873e07 Change types of weights on spread/affinity 2019-01-30 12:20:38 -08:00
Danielle Tomlinson
3d0a45f6e5 scheduler: Add is_set/is_not_set constraints
This adds constraints for asserting that a given attribute or value
exists, or does not exist. This acts as a companion to =, or !=
operators, e.g:

```hcl
constraint {
        attribute = "${attrs.type}"
        operator  = "!="
        value     = "database"
}

constraint {
        attribute = "${attrs.type}"
        operator  = "is_set"
}
```
2018-11-15 11:00:32 -08:00
Preetha Appan
3a2d5f0178 blank line 2018-11-12 15:50:14 -06:00
Preetha Appan
9f7dfb17a5 Fix logic bug in tracking sum of matched affinity weights
We need to track the sum of matching weights per device, but only
change the final return value if its the highest scoring choice
2018-11-12 15:06:45 -06:00
Preetha Appan
eda98fb070 Normalize scores correctly 2018-11-08 17:01:58 -06:00
Preetha Appan
66670c0f02 Fixes device scheduling unit tests
Also changes the logic for score when there is more than one task
requesting a device. Since inter task affinities are already normalized,
we take the average of the scores across tasks.
2018-11-08 10:31:19 -06:00
Alex Dadgar
a36b682cf4 review comments 2018-11-07 10:33:22 -08:00
Alex Dadgar
dcbf9bdbab Split device accounter and allocator 2018-11-07 10:32:03 -08:00
Alex Dadgar
7ab3ce4bde affinities 2018-11-07 10:32:03 -08:00
Alex Dadgar
77ad27de60 assign devices 2018-11-07 10:32:03 -08:00