Commit Graph

13812 Commits

Author SHA1 Message Date
Nick Ethier
97a73e0116 Merge pull request #5018 from hashicorp/f-executor-stats
executor: streaming stats api
2019-01-14 15:02:35 -05:00
Michael Schurter
903779769d Update client/allocrunner/taskrunner/stats_hook.go
Co-Authored-By: nickethier <ncethier@gmail.com>
2019-01-14 12:31:27 -05:00
Nick Ethier
091cdbcb12 tr: stop stats collection on Exited hook 2019-01-14 12:30:14 -05:00
Nick Ethier
d086bb2d20 qemu: missing gofmt 2019-01-13 16:06:56 -05:00
Michael Schurter
60acfc8289 Update drivers/qemu/driver_test.go
use t.Logf instead of fmt.Printf

Co-Authored-By: nickethier <ncethier@gmail.com>
2019-01-12 21:33:55 -05:00
Nick Ethier
fc84e8f2bc tr: add retry /w backoff to stats_hook failure 2019-01-12 12:18:24 -05:00
Nick Ethier
72a4685534 drivers: plumb grpc client logger 2019-01-12 12:18:23 -05:00
Nick Ethier
9904463da2 executor: fix failing stats related test 2019-01-12 12:18:23 -05:00
Nick Ethier
f6af1d4d04 docker: add test for stats collection 2019-01-12 12:18:22 -05:00
Nick Ethier
fbf9a4c772 executor: implement streaming stats API
plugins/driver: update driver interface to support streaming stats

client/tr: use streaming stats api

TODO:
 * how to handle errors and closed channel during stats streaming
 * prevent tight loop if Stats(ctx) returns an error

drivers: update drivers TaskStats RPC to handle streaming results

executor: better error handling in stats rpc

docker: better control and error handling of stats rpc

driver: allow stats to return a recoverable error
2019-01-12 12:18:22 -05:00
Preetha
f10c6259cb Merge pull request #5164 from hashicorp/b-client-addalloc-errhandle
Handle client initialization errors when adding/restoring allocs
2019-01-12 10:40:41 -06:00
Preetha Appan
19777b870b linting fixes 2019-01-12 10:38:20 -06:00
Preetha Appan
c66f2abefd Make unit test for allocrunner failure much nicer 2019-01-12 10:38:20 -06:00
Preetha Appan
a1a7a02e48 Add unit test to simulate alloc runner creation failure 2019-01-12 10:38:20 -06:00
Preetha Appan
032ec425c2 Only set deployment health if not already set 2019-01-12 10:38:20 -06:00
Michael Schurter
a20ae598c7 Apply suggestions from code review
Co-Authored-By: preetapan <preetha@hashicorp.com>
2019-01-12 10:38:20 -06:00
Preetha Appan
72dead7448 REfactor statedb factory config to set it directly in client config 2019-01-12 10:38:20 -06:00
Preetha Appan
5d7472fe82 Remove invalid allocs 2019-01-12 10:38:20 -06:00
Preetha Appan
80919bf713 Modified destroy failure handling to rely on allocrunner's destroy method
Added a unit test with custom statedb implementation that errors, to
use to verify destroy errors
2019-01-12 10:37:12 -06:00
Preetha Appan
29894883a2 Add back code to mark alloc as failed when restore fails
Also modify restore such that any handled errors don't propagate
back to the client
2019-01-12 10:37:12 -06:00
Preetha Appan
80d92481ca Revert code that made an alloc update when restore fails
Restore currently shuts down the client so the alloc update cant
always make it to the server
2019-01-12 10:37:12 -06:00
Preetha Appan
cf9c398296 Handle client initialization errors when adding allocs or restoring allocs
We mark the alloc as failed and track failed allocs so that we don't send
updates after the first time
2019-01-12 10:37:12 -06:00
Danielle Tomlinson
03bf0bb65a Merge pull request #5025 from hashicorp/dani/allocLockCleanup
client: Cleanup allocrunner access
2019-01-11 23:35:02 +01:00
Preetha
c32ea36031 Merge pull request #5181 from hashicorp/b-spread-weight
Make spread weight a pointer with default value if unset
2019-01-11 13:17:00 -06:00
Danielle Tomlinson
dccf2a0de9 client: Cleanup allocrunner access 2019-01-11 18:39:18 +01:00
Preetha Appan
7cdaf6e37d Make spread weight a pointer with default value if unset 2019-01-11 10:31:21 -06:00
Mahmood Ali
8c9f22a5e4 Merge pull request #5175 from hashicorp/c-re-enable-tests
Re-enable client and java skipped tests
2019-01-11 10:08:16 -05:00
Preetha
180362f472 Merge pull request #5179 from hashicorp/b-fix-deprecated-resources
Remove unnecessary usage of alloc.Resource
2019-01-10 17:31:00 -06:00
Preetha
4af4e616a3 Merge pull request #5144 from hashicorp/f-spread-docs
Docs for spread stanza
2019-01-10 16:38:39 -06:00
Preetha Appan
fc9c87c032 Remove unnecessary usage of alloc.Resource 2019-01-10 16:36:47 -06:00
Preetha
6d4a853566 Merge pull request #5178 from hashicorp/blalor-patch-1
Oxford comma in variable interpolation summary
2019-01-10 16:11:18 -06:00
Preetha Appan
e12dd2f4d5 Address review comments 2019-01-10 15:46:03 -06:00
Brian Lalor
1cd7458202 Oxford comma in variable interpolation summary
This improves the readability of this section.
2019-01-10 16:15:41 -05:00
Mahmood Ali
cfb68457bc tests: WaitForRunning checks for pending only
WaitForRunning risks a race condition where the allocation succeeds and
completes before WaitForRunning is called (or while it is running).

Here, I made the behavior match the function documentation.

I considered making it stricter, but callers need to account for
allocation terminating immediately after WaitForRunning terminates
anyway.
2019-01-10 15:36:57 -05:00
Mahmood Ali
215a137e4a Merge pull request #5176 from hashicorp/r-rm-validation-tests
tests: remove tests for unsupported features
2019-01-10 12:41:48 -05:00
Preetha Appan
7ef1669363 Spread json docs 2019-01-10 11:10:04 -06:00
Preetha Appan
6b4c79c90f Initial spread docs 2019-01-10 11:10:04 -06:00
Mahmood Ali
d9ff8d01ff tests: remove tests for unsupported features
With switching to driver plugins, driver validation is quite tricky and
we need to do some design thinking before supporting it against.
2019-01-10 10:21:48 -05:00
Mahmood Ali
a99b7655cc drivers/java: use libcontainer executor on java linux 2019-01-10 10:10:40 -05:00
Mahmood Ali
4240d6ac18 tests: ignore _JAVA_OPTIONS line
ignore _JAVA_OPTIONS line in `java -version`, as it's relevant.
2019-01-10 10:10:40 -05:00
Mahmood Ali
1b7b70f47e tests: enable and fix tests requiring mock driver 2019-01-10 10:10:11 -05:00
Chris Baker
e7510596fb Merge pull request #5158 from hashicorp/f-1157-validate-node-meta-variables
added validation on client metadata keys
2019-01-09 16:37:57 -05:00
Alex Dadgar
c7fc39d38d Merge pull request #5168 from hashicorp/b-kill-race
Improve Kill handling on task runner
2019-01-09 12:05:10 -08:00
Alex Dadgar
d916c0dd12 add more comments 2019-01-09 12:04:22 -08:00
Michael Schurter
e44d51f4d0 Spelling fix
Co-Authored-By: dadgar <alex@hashicorp.com>
2019-01-09 11:42:40 -08:00
Chris Baker
b12e24ec99 Merge branch 'master' of github.com:hashicorp/nomad into f-1157-validate-node-meta-variables 2019-01-09 18:56:49 +00:00
Chris Baker
8a7c09aaab increased config validation coverage for dev mode 2019-01-09 18:56:40 +00:00
Michael Schurter
a646833aa3 Merge pull request #5045 from hashicorp/b-drivermanager-tests-drain
drain: fix node drain monitoring
2019-01-09 10:23:28 -08:00
Mahmood Ali
f056ef5fa8 Merge pull request #5166 from hashicorp/b-docker-tests-mac
tests: run docker tests in macOS out of box
2019-01-09 13:07:37 -05:00
Mahmood Ali
d0efb37b80 Merge pull request #5162 from hashicorp/f-extract-lxc
Extract LXC from nomad
2019-01-09 13:07:05 -05:00