Commit Graph

13781 Commits

Author SHA1 Message Date
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
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
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
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
Mahmood Ali
d1fbd735f3 Merge pull request #5157 from hashicorp/r-drivers-no-cstructs
drivers: avoid referencing client/structs package
2019-01-09 13:06:46 -05:00
Michael Schurter
c22de10039 Merge pull request #5167 from hashicorp/e2e-task-events
Add another task events e2e test and fix test helper
2019-01-09 08:10:22 -08:00
Mahmood Ali
2349a01274 Merge pull request #5163 from hashicorp/r-minor-changes-20180108
Fix a panic on node.Deregister fail
2019-01-09 09:56:00 -05:00
Mahmood Ali
7840ab51e2 fix more cases of logging arity errors 2019-01-09 09:22:47 -05:00
Mahmood Ali
76d40947d7 Merge pull request #5159 from hashicorp/r-macos-tests
Fix Travis MacOS job
2019-01-09 08:22:30 -05:00
Alex Dadgar
a5ba15591a Improve Kill handling on task runner
This PR improves how killing a task is handled. Before the kill function
directly orchestrated the killing and was only valid while the task was
running. The new behavior is to mark the desired state and wait for the
task runner to converge to that state.
2019-01-08 16:42:26 -08:00
Mahmood Ali
7cca4b0d11 cli: support hitting pre-0.9 nomad agents
node.NodeResources is nil when operating against pre-0.9.
2019-01-08 19:32:26 -05:00
Danielle Tomlinson
745d1c7665 Merge pull request #4991 from hashicorp/dani/b-fix-leaked-procs
vendor: Update go-plugin
2019-01-09 00:54:52 +01:00
Michael Schurter
fb12451ecf e2e: test task events for a failed sibling task 2019-01-08 14:39:37 -08:00
Michael Schurter
c9dc5e4999 e2e: wait for at least N nodes to be ready
Before it was *exactly* N nodes which limited test portability between
clusters.
2019-01-08 14:39:37 -08:00
Chris Baker
1dc25090a5 move if dev check into config validation, to support dev-mod
validation in the future
2019-01-08 22:21:48 +00:00
Chris Baker
c506b56f96 Merge pull request #4888 from hashicorp/f-docs-clarification-on-config-folders
config dir clarification
2019-01-08 17:18:14 -05:00
Mahmood Ali
39fa004f75 tests: run docker tests in macOS out of box
Use `/tmp` as temporary directory for docker driver tests, so tests can
run out of the box without any intervention.

macOS sets tempdir as `/var`, which Docker does not whitelist as a path
that can be bind-mounted.
2019-01-08 14:35:40 -05:00
Mahmood Ali
855e3684e3 fixup! remove unused field 2019-01-08 12:58:12 -05:00
Mahmood Ali
f8f285248d Merge pull request #5154 from hashicorp/f-revert-exec-devs
drivers/exec: restrict devices exposed to tasks
2019-01-08 12:43:06 -05:00
Mahmood Ali
8a96bf84a1 tests: fix a test job constaints failing in macOS
Allow scheduling mock job when running on MacOS (or Windows) hosts.
2019-01-08 12:37:42 -05:00
Michael Schurter
4a70644df0 drain: fix node drain monitoring
The whole approach to monitoring drains has ordering issues and lacks
state to output useful error messages.

AFAICT to get the tests passing reliably I needed to change the behavior
of monitoring.

Parts of these tests are skipped in CI, and they should be rewritten as
e2e tests.
2019-01-08 09:35:16 -08:00
Michael Schurter
6c561efdf8 Merge pull request #5151 from hashicorp/b-task-events
Emit Killing task events and add e2e tests
2019-01-08 09:33:04 -08:00
Mahmood Ali
739bd9d33c Fix panic on failure
Error expects an odd number of arguments, and panics otherwise.
2019-01-08 12:19:44 -05:00
Mahmood Ali
b0a3f6b491 remove unused field 2019-01-08 12:19:44 -05:00
Mahmood Ali
060588da31 executor: add a comment detailing isolation 2019-01-08 12:10:26 -05:00
Danielle Tomlinson
a2535ed580 vendor: Update go-plugin
This fixes a bug related to shutting down of GRPC plugin interfaces
(more info: https://github.com/hashicorp/go-plugin/pull/88)

This does not yet fix all test cases for subprocess leaking, but is a
useful independant change.
2019-01-08 17:43:20 +01:00
Mahmood Ali
7b3ff40d22 run gofmt 2019-01-08 11:15:38 -05:00
Mahmood Ali
d19245fa7b appease linter 2019-01-08 10:58:49 -05:00
Michael Schurter
ef2c835434 Merge pull request #5035 from hashicorp/test-client
test: re-eanble periodic fingerprint test
2019-01-08 07:37:39 -08:00
Michael Schurter
1ae8261139 client: emit Killing/Killed task events
We were just emitting Killed/Terminated events before. In v0.8 we
emitted Killing/Killed, but lacked Terminated when explicitly stopping
a task. This change makes it so Terminated is always included, whether
explicitly stopping a task or it exiting on its own.

New output:

2019-01-04T14:58:51-08:00  Killed            Task successfully killed
2019-01-04T14:58:51-08:00  Terminated        Exit Code: 130, Signal: 2
2019-01-04T14:58:51-08:00  Killing           Sent interrupt
2019-01-04T14:58:51-08:00  Leader Task Dead  Leader Task in Group dead
2019-01-04T14:58:49-08:00  Started           Task started by client
2019-01-04T14:58:49-08:00  Task Setup        Building Task Directory
2019-01-04T14:58:49-08:00  Received          Task received by client

Old (v0.8.6) output:

2019-01-04T22:14:54Z  Killed            Task successfully killed
2019-01-04T22:14:54Z  Killing           Sent interrupt. Waiting 5s before force killing
2019-01-04T22:14:54Z  Leader Task Dead  Leader Task in Group dead
2019-01-04T22:14:53Z  Started           Task started by client
2019-01-04T22:14:53Z  Task Setup        Building Task Directory
2019-01-04T22:14:53Z  Received          Task received by client
2019-01-08 07:20:54 -08:00
Michael Schurter
6c01ae4ae2 e2e: add task events tests 2019-01-08 07:20:53 -08:00
Chris Baker
cdcc1db700 refactored config validation into a new method, modified Meta.Client
tests appropriately
2019-01-08 15:07:36 +00:00
Michael Schurter
838c8fcc75 Merge pull request #5034 from hashicorp/test-fix-races
Test fix races
2019-01-08 07:04:09 -08:00
Mahmood Ali
01fd085575 remove unused go-lxc vendored library 2019-01-08 09:28:21 -05:00
Mahmood Ali
b51ecacd23 remove lxc references 2019-01-08 09:28:20 -05:00