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
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
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
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
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
45e41cca03
allocrunnerv2 -> allocrunner
2018-10-16 16:56:56 -07:00
Alex Dadgar
6c9d9d5173
move files around
2018-10-16 16:56:55 -07:00
Michael Schurter
820af27171
wrap boltdb in a write deduplicator
...
Saves a tiny bit of cpu and some IO. Sadly doesn't prevent all IO on
duplicate writes as the transactions are still created and committed.
$ go test -bench=. -benchmem
goos: linux
goarch: amd64
pkg: github.com/hashicorp/nomad/helper/boltdd
BenchmarkWriteDeduplication_On-4 500 4059591 ns/op 23736 B/op 56 allocs/op
BenchmarkWriteDeduplication_Off-4 300 4115319 ns/op 25942 B/op 55 allocs/op
2018-10-16 16:53:30 -07:00
Michael Schurter
5383d20505
removing old restoration path before api change
2018-10-16 16:53:30 -07:00
Michael Schurter
39b3f3a85b
call handle.Network() instead of storing it
2018-10-16 16:53:30 -07:00
Michael Schurter
a4b4d7b266
consul service hook
...
Deregistration works but difficult to test due to terminal updates not
being fully implemented in the new client/ar/tr.
2018-10-16 16:53:29 -07:00
Michael Schurter
9a63d6103d
tr: add validate task hook
2018-10-16 16:53:29 -07:00
Alex Dadgar
e401c660e7
Implement lifecycle hooks on the task runner
2018-10-16 16:53:29 -07:00
Michael Schurter
eae54e2954
artifact task hook
2018-10-16 16:53:29 -07:00
Alex Dadgar
ca28afa3b2
small fixes
2018-09-15 16:42:38 -07:00
Andrei Burd
444ee45aff
Parametrized/periodic jobs per child tagged metric emmision
2018-06-21 10:40:56 +03:00
Alex Dadgar
300b1a7a15
Tests only use testlog package logger
2018-06-13 15:40:56 -07:00
Alex Dadgar
9bab9edf27
test fixes
2018-06-12 17:45:39 -07:00
Alex Dadgar
f5ff509fa5
Refactor - wip
2018-06-12 10:23:45 -07:00