Alex Dadgar
a7ca737fb6
review comments
2018-11-07 11:31:52 -08:00
Alex Dadgar
f0c7a8159b
tests
2018-11-07 10:43:15 -08:00
Alex Dadgar
204ca8230c
Device manager
...
Introduce a device manager that manages the lifecycle of device plugins
on the client. It fingerprints, collects stats, and forwards Reserve
requests to the correct plugin. The manager, also handles device plugins
failing and validates their output.
2018-11-07 10:43:15 -08:00
Michael Schurter
a4e6a92d18
client: update alloc status when terminating
...
Defensively update alloc status whenever killing all tasks.
2018-11-05 15:11:10 -08:00
Michael Schurter
66bf3db455
client: block on context as well as waitCh
...
For lifecycle operations such as Restart and Kill, the client should not
expect driver plugins to be well behaved and close their waitCh on
context cancelation. Always wait on the passed in context as well as the
waitCh.
2018-11-05 12:32:05 -08:00
Michael Schurter
b994f51990
client: fix tr lifecycle logic and shutdown delay
...
ShutdownDelay must be honored whenever the task is killed or restarted.
Services were not being deregistered prior to restarting.
2018-11-05 12:32:05 -08:00
Michael Schurter
2d3479147a
client: fix ar and tr tests
2018-11-05 12:32:05 -08:00
Michael Schurter
d29d09023e
client: do not run terminal allocs
2018-11-05 12:32:05 -08:00
Michael Schurter
2bbd88888c
client: first pass at implementing task restoring
...
Task restoring works but dead tasks may be restarted
2018-11-05 12:32:05 -08:00
Nick Ethier
b0ddc03409
Merge pull request #4765 from jippi/increase-line-scan-limit
...
fix: increase log rotator line scan limit
2018-10-29 18:46:30 -07:00
Nick Ethier
3fcf8ba7e6
Merge pull request #4795 from hashicorp/f-plugin-config
...
Pass client configuration to plugins through loader
2018-10-29 18:42:27 -07:00
Nick Ethier
bda3b1d3b3
rename NomadConfig to ClientAgentConfig
2018-10-29 21:34:34 -04:00
Michael Schurter
6f2cffb196
Merge pull request #4803 from hashicorp/b-leader-fixes
...
AR Fixes: task leader handling, restoring, state updating, AR.Destroy deadlocks
2018-10-29 17:38:59 -05:00
Michael Schurter
d71a1b4547
tests: more fixes due to api changes
2018-10-29 15:25:22 -07:00
Preetha Appan
b85cc38f3d
Stat path to binary to handle raw exec driver interpolated binary path
2018-10-26 17:24:05 -05:00
Preetha Appan
55ac8d3d12
Fix test linting
2018-10-26 10:30:12 -05:00
Michael Schurter
b7a9d61a38
ar: initialize allocwatcher on restore
...
Fixes a panic. Left a comment on how the behavior could be improved, but
this is what releases <0.9.0 did.
2018-10-19 09:45:45 -07:00
Michael Schurter
e060174130
ar: fix leader handling, state restoring, and destroying unrun ARs
...
* Migrated all of the old leader task tests and got them passing
* Refactor and consolidate task killing code in AR to always kill leader
tasks first
* Fixed lots of issues with state restoring
* Fixed deadlock in AR.Destroy if AR.Run had never been called
* Added a new in memory statedb for testing
2018-10-19 09:45:45 -07:00
Nick Ethier
58b430edae
added driver specific client config struct to plugin configuration
2018-10-18 23:31:01 -04:00
Michael Schurter
cefbf00bf0
ar: refactor task killing into 1 method
...
Update comments and address some PR comments from #4775
2018-10-17 10:06:59 -07:00
Michael Schurter
21d78be961
tests: explicitly cleanup after clients
2018-10-17 10:06:59 -07:00
Michael Schurter
222f6b5741
ar: fix task leader, update, and stop handling
2018-10-17 10:06:59 -07:00
Michael Schurter
1badbb2fc4
tr: cleanup hook logs
2018-10-17 09:42:32 -07:00
Nick Ethier
65adb80ebf
plumb NomadConfig into plugins
2018-10-16 22:47:22 -04:00
Nick Ethier
d94b631b6b
drivers/exec: add exec implementation
2018-10-16 22:45:28 -04:00
Michael Schurter
0baaba8b09
templates: fix tests
2018-10-16 16:56:57 -07:00
Michael Schurter
838ddf4d4a
fix linter errors
2018-10-16 16:56:57 -07:00
Michael Schurter
e27c82ea4d
client: remove unused handleproxy
2018-10-16 16:56:56 -07:00
Michael Schurter
4ea5217d72
tr: remove unused DriverHandle interface
...
was causing typed nil interface panics and served no purpose
2018-10-16 16:56:56 -07:00
Michael Schurter
528c426c53
Port client portion of #4392 to new taskrunner
...
PR #4392 was merged to master *after* allocrunnerv2 was branched, so the
client-specific portions must be ported from master to arv2.
2018-10-16 16:56:56 -07:00
Michael Schurter
f12501d4c3
tr: implement dispatch payload hook
...
Now passing the TaskDir struct to prestart hooks instead of just the
root task dir itself as dispatch needs local/.
2018-10-16 16:56:56 -07:00
Nick Ethier
d9f0cbf4a9
client: log retry during driver fingerprint redispense
2018-10-16 16:56:56 -07:00
Nick Ethier
c7ac1186c9
client: add test for driverfailure during fingerprinting
2018-10-16 16:56:56 -07:00
Nick Ethier
8cf669b5aa
taskrunner: return error on waitCh
2018-10-16 16:56:56 -07:00
Nick Ethier
047fad2953
client: simplify driver plugin logic from review comments
2018-10-16 16:56:56 -07:00
Nick Ethier
9686e1b258
client: fix broked tests from refactoring
2018-10-16 16:56:56 -07:00
Nick Ethier
3183b33d24
client: review comments and fixup/skip tests
2018-10-16 16:56:56 -07:00
Nick Ethier
f192c3752a
client: refactor post allocrunnerv2 finalization
2018-10-16 16:56:56 -07:00
Nick Ethier
4a4c7dbbfc
client: begin driver plugin integration
...
client: fingerprint driver plugins
2018-10-16 16:56:56 -07:00
Alex Dadgar
7946a14aa8
Fix lints
2018-10-16 16:56:56 -07:00
Alex Dadgar
89dafaaea9
compile on windows
2018-10-16 16:56:56 -07:00
Alex Dadgar
ad4fac526c
more test fixes
2018-10-16 16:56:56 -07:00
Alex Dadgar
45e41cca03
allocrunnerv2 -> allocrunner
2018-10-16 16:56:56 -07:00
Alex Dadgar
9baa7402ef
fix test compiling
2018-10-16 16:56:55 -07:00
Alex Dadgar
7d9c069f09
skip building deprecated files
2018-10-16 16:56:55 -07:00
Alex Dadgar
6c9d9d5173
move files around
2018-10-16 16:56:55 -07:00
Michael Schurter
5f696608a6
tests: fix missing logger caused by bad merge
2018-10-16 16:56:55 -07:00
Michael Schurter
048510b13e
tr: properly comment handle fields
2018-10-16 16:56:55 -07:00
Michael Schurter
9e49ed3464
ar: AllocState should not mutate ar.state
...
If ar.state.TaskStates has not been set, set it on the copy of ar.state.
That keeps ar.state manipulations in one location and allows AllocState
to only acquire read-locks.
2018-10-16 16:56:55 -07:00
Michael Schurter
f279b1d1b1
tests: test logs endpoint against pending task
...
Although the really exciting change is making WaitForRunning return the
allocations that it started. This should cut down test boilerplate
significantly.
2018-10-16 16:56:55 -07:00