Mahmood Ali
2159d0f3ac
tests: fix some nomad/drainer test data races
2019-05-21 14:40:58 -04:00
Alex Dadgar
52f9cd7637
fixing tests
2018-10-04 14:26:19 -07:00
Alex Dadgar
de442226ae
Fix other instances of blocking queries
2018-09-24 13:52:39 -07:00
Alex Dadgar
ca28afa3b2
small fixes
2018-09-15 16:42:38 -07:00
Alex Dadgar
3c19d01d7a
server
2018-09-15 16:23:13 -07:00
Alex Dadgar
9a2237bdab
Drain complete
2018-05-10 17:22:06 -07:00
Alex Dadgar
8d50955054
Fix typos
2018-05-07 14:50:01 -05:00
Alex Dadgar
79844f1d01
Safety guard
2018-04-25 16:00:56 -07:00
Alex Dadgar
d45f39f24e
Fix detecting drain strategy on GC'd node
2018-04-25 16:00:56 -07:00
Michael Schurter
b1a90462a8
Merge pull request #4094 from hashicorp/b-drain-panic
...
drain: fix double-close panic on drain future
2018-04-04 10:31:14 -07:00
Alex Dadgar
af1b185ce4
Fix flaky deadline tests
2018-04-03 16:51:57 -07:00
Michael Schurter
ba6628a1b6
drain: return on first error
...
If one error is encountered it is unlikely any further attempts will
succeed, so fail fast.
2018-04-03 16:46:35 -07:00
Michael Schurter
edc4891283
drain: improve tests and fix spelling
...
* transistion -> transition
* don't t.Fatal in goroutines
* don't mutate global state
2018-04-02 16:40:47 -07:00
Michael Schurter
44a749a7cc
drain: fix double-close panic on drain future
2018-04-02 16:39:18 -07:00
Alex Dadgar
e8809f40dc
Test transistion from both infinite and a future deadline to force
2018-03-30 11:24:39 -07:00
Alex Dadgar
32a673a7e1
Fix force deadline notification
2018-03-30 09:58:29 -07:00
Alex Dadgar
e458ab9031
Merge branch 'master' into b-drain-batch
2018-03-29 17:10:34 -07:00
Alex Dadgar
7d2aae2c11
test handleTaskGroup
2018-03-29 16:38:47 -07:00
Alex Dadgar
049a9213d2
Watch batch jobs
2018-03-29 16:07:51 -07:00
Michael Schurter
91b5bb58d9
add HasHealth helper for nil checks
...
We performed the DeploymentStatus nil checks a couple different ways, so
hopefully this helper will consoldiate them and make it more clear what
the code is doing.
2018-03-29 09:29:19 -07:00
Alex Dadgar
b18f789020
Unmark drain when nodes hit their deadline and only batch/system left and add all job type integration test
2018-03-28 17:25:58 -07:00
Michael Schurter
65ddae86f8
Merge pull request #4054 from hashicorp/b-drainer-index-fix
...
drainer: reset index when new job registered
2018-03-27 16:28:25 -07:00
Michael Schurter
ec60a1d3e3
drain: improve comments
2018-03-27 14:27:09 -07:00
Michael Schurter
e5dfb7e487
drain: unittest draining node logic
2018-03-27 14:24:01 -07:00
Michael Schurter
77bddc7941
drain: stop sys jobs after drain completes
...
System allocs should be drained when a node's deadline is hit or when
all other allocs on the node have stopped/migrated.
2018-03-27 14:24:01 -07:00
Michael Schurter
fae77b874b
drainer: reset index when new job registered
2018-03-27 14:12:59 -07:00
Michael Schurter
a4f346abeb
remove spurious TODOs and FIXMEs
2018-03-21 16:55:22 -07:00
Michael Schurter
9f3086a268
test: must initialize jobResults with new func
2018-03-21 16:51:45 -07:00
Michael Schurter
cb61a4bdc7
Fix linting errors
2018-03-21 16:51:45 -07:00
Michael Schurter
c401d5a098
Refactor assertOps into a helper func
2018-03-21 16:51:45 -07:00
Michael Schurter
187b0e1a48
Remove debug prints
2018-03-21 16:51:45 -07:00
Michael Schurter
f67eca48ac
Deregister garbage collected jobs
2018-03-21 16:51:45 -07:00
Michael Schurter
922842546c
JobNs -> NamespacedID
...
Also drop the New func as it's easy to swap the order of arguments since
they're both strings.
2018-03-21 16:51:45 -07:00
Michael Schurter
8dc7d9fb6a
drainer: RegisterJob -> RegisterJobs
...
Test job watcher
2018-03-21 16:51:45 -07:00
Michael Schurter
3116897099
Fix deadline heap triggering
...
Chan must be buffered to avoid skipping triggering altogether
Also made timing in a test a bit more lenient
2018-03-21 16:51:45 -07:00
Alex Dadgar
fb4badf1bc
sharding
2018-03-21 16:51:44 -07:00
Alex Dadgar
2d91b9dfba
Batch drain update
2018-03-21 16:51:44 -07:00
Michael Schurter
9898edfa90
Switch to drainerv2 impl
2018-03-21 16:51:44 -07:00
Alex Dadgar
33ca319080
System test runs on mac
2018-03-21 16:51:44 -07:00
Alex Dadgar
f8d4a3a9e6
Fix file names
2018-03-21 16:51:44 -07:00
Michael Schurter
32a7649359
refactor main drainloop into 2 more methods
2018-03-21 16:51:44 -07:00
Michael Schurter
5e52f84bb7
drainer: refactor newStopAllocs, applyMigrations
2018-03-21 16:51:44 -07:00
Michael Schurter
62960ed7bd
client: don't monitor health of non-service jobs
...
Also fix system job draining; won't work without deadline fixes
2018-03-21 16:51:44 -07:00
Alex Dadgar
a37329189a
Improve DeadlineTime helper
2018-03-21 16:51:44 -07:00
Michael Schurter
ab0de41884
drainer: factor job & node watchers out of drainer.go
2018-03-21 16:51:44 -07:00
Michael Schurter
5922aef623
Restart every time SetEnabled(true) is called
2018-03-21 16:51:44 -07:00
Michael Schurter
8b41e9b2e1
drainer: drainer should shutdown with server
2018-03-21 16:51:44 -07:00
Michael Schurter
0a17076ad2
refactor drainer into a subpkg
2018-03-21 16:51:44 -07:00