Commit Graph

13841 Commits

Author SHA1 Message Date
Danielle Tomlinson cca5f41360 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 6d36b52412 run gofmt 2019-01-08 11:15:38 -05:00
Mahmood Ali 0dfa93a3c1 appease linter 2019-01-08 10:58:49 -05:00
Michael Schurter 92f9cda5f4
Merge pull request #5035 from hashicorp/test-client
test: re-eanble periodic fingerprint test
2019-01-08 07:37:39 -08:00
Michael Schurter 5925424c7c 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 2cf49f9121 e2e: add task events tests 2019-01-08 07:20:53 -08:00
Chris Baker 220e9e838f refactored config validation into a new method, modified Meta.Client
tests appropriately
2019-01-08 15:07:36 +00:00
Michael Schurter 324e989327
Merge pull request #5034 from hashicorp/test-fix-races
Test fix races
2019-01-08 07:04:09 -08:00
Mahmood Ali 04f787d3fa remove unused go-lxc vendored library 2019-01-08 09:28:21 -05:00
Mahmood Ali 62a7f951c0 remove lxc references 2019-01-08 09:28:20 -05:00
Mahmood Ali 426c981c34 Remove some dead code 2019-01-08 09:11:48 -05:00
Mahmood Ali 64f80343fc drivers: re-export ResourceUsage structs
Re-export the ResourceUsage structs in drivers package to avoid drivers
directly depending on the internal client/structs package directly.

I attempted moving the structs to drivers, but that caused some import
cycles that was a bit hard to disentagle.  Alternatively, I added an
alias here that's sufficient for our purposes of avoiding external
drivers depend on internal packages, while allowing us to restructure
packages in future without breaking source compatibility.
2019-01-08 09:11:47 -05:00
Mahmood Ali 916a40bb9e move cstructs.DeviceNetwork to drivers pkg 2019-01-08 09:11:47 -05:00
Mahmood Ali 9369b123de use drivers.FSIsolation 2019-01-08 09:11:47 -05:00
Mahmood Ali c10a8fd7fe remove deprecated allocrunner 2019-01-08 09:11:47 -05:00
Mahmood Ali f475a56087 remove always false parameter
Simplify allocDir.Build() function to avoid depending on client/structs,
and remove a parameter that's always set to `false`.

The motivation here is to avoid a dependency cycle between
drivers/cstructs and alloc_dir.
2019-01-08 09:11:47 -05:00
Danielle Tomlinson b1da899af2
Merge pull request #5161 from hashicorp/dani/update-net-ctx
deps: Update x/net/context
2019-01-08 15:09:40 +01:00
Danielle Tomlinson 97c7bd5b80
Merge pull request #5042 from hashicorp/dani/f-shutdowns
plugins: Shutdown internal plugins
2019-01-08 15:09:25 +01:00
Danielle Tomlinson a9b9ad34dc drivers: Implement InternalPluginDriver interface
This implements the InternalPluginDriver interface in each driver, and
calls the cancellation fn for their respective eventers.

This fixes a per task goroutine leak during test suite execution.
2019-01-08 13:49:31 +01:00
Danielle Tomlinson 8df20f49f7 drivers: Add internal interface for Shutdown
This allows us to correctly terminate internal state during runs of the
nomad test suite, e.g closing eventer contexts correctly.
2019-01-08 13:48:49 +01:00
Danielle Tomlinson 734574bc25 deps: Update x/net/context
This allows std context to be used in place of an x/net/context and
unblocks updating to the latest version of go-plugin.
2019-01-08 13:45:10 +01:00
Chris Baker 91449d6809 Merge branch 'master' of github.com:hashicorp/nomad into f-1157-validate-node-meta-variables 2019-01-08 02:17:35 +00:00
Chris Baker bf00f93d87 moved interp key regex out to a helper function 2019-01-08 00:11:47 +00:00
Michael Schurter 1984805f86
Update CHANGELOG.md
Co-Authored-By: cgbaker <cgbaker@hashicorp.com>
2019-01-07 18:59:26 -05:00
Alex Dadgar edf132758d
Merge pull request #5152 from hashicorp/f-recover
Task runner recovers from external plugin exiting
2019-01-07 15:27:33 -08:00
Alex Dadgar 0106f23aaa Review comments 2019-01-07 14:50:28 -08:00
Preetha afd7c3cfc6
Merge pull request #5023 from nrvale0/tf-autojoin-fix
fix for user-specified auto-join tags
2019-01-07 16:49:48 -06:00
Alex Dadgar 79cfe26021 vet 2019-01-07 14:49:41 -08:00
Alex Dadgar 8a35d7b1dd Test recovery 2019-01-07 14:49:41 -08:00
Alex Dadgar f40f8ce02e Mock driver has recovery, stats 2019-01-07 14:49:40 -08:00
Alex Dadgar fb5dc9058e regenerate protos 2019-01-07 14:49:40 -08:00
Alex Dadgar 3f24e4d6ca comments 2019-01-07 14:49:40 -08:00
Alex Dadgar 44dca19012 Fix hooks 2019-01-07 14:49:40 -08:00
Alex Dadgar c9825a9c36 recover 2019-01-07 14:49:40 -08:00
Alex Dadgar 6c6e035dba add docker logger to separate main 2019-01-07 14:49:40 -08:00
Alex Dadgar c3f05f2476 Don't log event error on driver shutdown 2019-01-07 14:49:40 -08:00
Alex Dadgar 39542b4cf0 rkt fingerprint logs once 2019-01-07 14:49:40 -08:00
Alex Dadgar a6b36df4de remove nil logger 2019-01-07 14:48:01 -08:00
Michael Schurter d686ad51fb
Merge pull request #5043 from hashicorp/b-taskenv-conflicts
taskenv: have maps take precedence over primitives
2019-01-07 12:34:48 -08:00
Chris Baker f99e18aaf4 gofmt to make check happy 2019-01-07 18:01:59 +00:00
Chris Baker 6d279f57ad updated CHANGELOG to note backward incompatibility in node metadata validation 2019-01-07 17:32:45 +00:00
Chris Baker a61afad5bb added validation on client metadata keys 2019-01-07 17:16:38 +00:00
Danielle Tomlinson 023223c782
Merge pull request #5148 from hashicorp/dani/f-e2e-consul
e2e: Add consultemplate test
2019-01-07 17:54:20 +01:00
Danielle Tomlinson d195680ec1 e2e: Add consultemplate test
This adds a basic test for consul template, that verifies the behaviour
of consul-template with task blocking and restarting of tasks
2019-01-07 17:53:55 +01:00
Preetha ec39dd2383
Merge pull request #5156 from hashicorp/f-standard-driver-health-messages
Standardize driver health description messages for all drivers
2019-01-07 09:49:28 -06:00
Mahmood Ali 58fb6812db tests: busybox only depends on arch
Busybox is compiled for linux only.  Making the file used in executor
tests even for non-linux targets, as having the file present has no
side-effects.
2019-01-07 08:36:32 -05:00
Mahmood Ali 0ba7b0c132 tests: helper function for checking docker presense 2019-01-07 08:27:06 -05:00
Mahmood Ali 796d625ab6 Skip tests requiring Docker deamon if not found. 2019-01-07 07:59:13 -05:00
Preetha Appan 2fb2de3cef
Standardize driver health description messages for all drivers 2019-01-06 22:06:38 -06:00
Preetha f5b71ee5c9
Merge pull request #5155 from hashicorp/b-remove-rkt-logging
remove unnecessary logging in rkt driver fingerprint method
2019-01-06 21:37:58 -06:00