Alex Dadgar
148a9504e7
color
2018-03-21 20:27:32 -07:00
Alex Dadgar
d39b13ed58
Deprecated commands
2018-03-21 20:27:32 -07:00
Alex Dadgar
25dbc77aa8
aliases
2018-03-21 20:27:32 -07:00
Alex Dadgar
295008dd90
rename files
2018-03-21 20:27:32 -07:00
Alex Dadgar
683e271069
common commands
2018-03-21 20:27:32 -07:00
Alex Dadgar
c7fc6571d8
use subcommands
2018-03-21 20:27:32 -07:00
Alex Dadgar
9b73881a00
Drain cli, api, http
2018-03-21 20:27:32 -07:00
Michael Schurter
40db0af310
Merge pull request #4010 from hashicorp/f-drain-rebased2
...
Drain v2: add controlled draining
2018-03-21 17:12:52 -07:00
Michael Schurter
e10883ca2b
eligbile -> eligible
2018-03-21 16:55:22 -07:00
Michael Schurter
3496bcf766
docs: improve DrainRequest.MarkEligible comment
2018-03-21 16:55:22 -07:00
Michael Schurter
07fe87918a
test: index no longer guaranteed on job list
...
Also switch to require and add t.Helper to appropriate funcs.
2018-03-21 16:55:22 -07:00
Michael Schurter
b58a22c2e9
remove spurious TODOs and FIXMEs
2018-03-21 16:55:22 -07:00
Michael Schurter
ec09ea61be
test: must initialize jobResults with new func
2018-03-21 16:51:45 -07:00
Michael Schurter
636693830f
test: disable node drainer during tests
...
Node drainer would throw off the index checks
2018-03-21 16:51:45 -07:00
Michael Schurter
e8673b14ef
test: disable drain during fsm test
...
drainer was unsetting drain before fsm could read written value
2018-03-21 16:51:45 -07:00
Michael Schurter
b8b1922b9b
test: fix by using mock.BatchJob
2018-03-21 16:51:45 -07:00
Michael Schurter
50a94d73c9
test: try to prevent flakiness on travis
2018-03-21 16:51:45 -07:00
Michael Schurter
80885623c1
test: don't call t.Fatal from within a goroutine
2018-03-21 16:51:45 -07:00
Michael Schurter
17161ec5f9
tests: use mock.BatchJob to fix tests
2018-03-21 16:51:45 -07:00
Michael Schurter
9b88749ced
mock: add BatchJob() helper
2018-03-21 16:51:45 -07:00
Michael Schurter
1537061ebc
alloc_runner: watch health for deployed batch jobs
2018-03-21 16:51:45 -07:00
Michael Schurter
2bb18741b0
api: fix tests to expect default migrate strategy
2018-03-21 16:51:45 -07:00
Michael Schurter
aab1fb7672
Fix linting errors
2018-03-21 16:51:45 -07:00
Michael Schurter
4efbc349a4
rpcapi: remove; unused
2018-03-21 16:51:45 -07:00
Alex Dadgar
98935b82e0
fix race in drain integration tests
2018-03-21 16:51:45 -07:00
Michael Schurter
08c9116f2d
Refactor assertOps into a helper func
2018-03-21 16:51:45 -07:00
Michael Schurter
e003b0534b
Remove debug prints
2018-03-21 16:51:45 -07:00
Michael Schurter
8ef7863bed
Deregister garbage collected jobs
2018-03-21 16:51:45 -07:00
Michael Schurter
74dc8fd460
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
8217ebf11e
drainer: RegisterJob -> RegisterJobs
...
Test job watcher
2018-03-21 16:51:45 -07:00
Michael Schurter
0a1f1d2c56
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
Michael Schurter
e669e8213a
Improve drain log messages
...
Also delay "node complete" after the node has been marked complete to
capture a few more alloc events. There are other ways to implement this
that could trade off correctness for responsiveness as technically a
node is considered drained when all of its allocs have been marked to
stop and not when they've actually stopped (which may not happen for a
long time).
2018-03-21 16:51:45 -07:00
Michael Schurter
11d0eae5ed
Monitor node drains until completion in CLI
...
allow -detach like other commands
2018-03-21 16:51:45 -07:00
Michael Schurter
6347baec55
Add DesiredTransition.ShouldMigrate to api pkg
2018-03-21 16:51:45 -07:00
Michael Schurter
fb6c821526
Fix node eligibility test
2018-03-21 16:51:45 -07:00
Alex Dadgar
270699bab2
fix comment
2018-03-21 16:51:45 -07:00
Alex Dadgar
5324e56e1c
sharding
2018-03-21 16:51:44 -07:00
Alex Dadgar
ad2f211712
Batch drain update
2018-03-21 16:51:44 -07:00
Alex Dadgar
45e7e88558
Fix deadline handling
2018-03-21 16:51:44 -07:00
Michael Schurter
efb6601129
Switch to drainerv2 impl
2018-03-21 16:51:44 -07:00
Alex Dadgar
d15371405f
Toggle Drain allows resetting eligibility
...
This PR allows marking a node as eligible for scheduling while toggling
drain. By default the `nomad node drain -disable` commmand will mark it
as eligible but the drainer will maintain in-eligibility.
2018-03-21 16:51:44 -07:00
Alex Dadgar
5b36af9860
code review
2018-03-21 16:51:44 -07:00
Alex Dadgar
bd701979b8
spelling fixes
2018-03-21 16:51:44 -07:00
Alex Dadgar
4b4e234516
Comments
2018-03-21 16:51:44 -07:00
Alex Dadgar
fb40e8babe
handle empty node case
2018-03-21 16:51:44 -07:00
Alex Dadgar
c0354223c2
integration test and basic fixes
2018-03-21 16:51:44 -07:00
Alex Dadgar
cec2c5a726
Drainer
2018-03-21 16:51:44 -07:00
Alex Dadgar
0e51b20657
job watcher
2018-03-21 16:51:44 -07:00
Alex Dadgar
d45532d038
Node's being untracked or having updated deadlines, updates the deadliner
2018-03-21 16:51:44 -07:00
Alex Dadgar
da368105e6
node watcher
2018-03-21 16:51:44 -07:00