Danielle Tomlinson
113205318c
plugins: Add support for serving driver plugins
2018-12-01 17:30:54 +01:00
Danielle Tomlinson
1c98fdf935
plugins: Move driver testing support to subpackage
...
this allows us to drop a cyclical import, but is subobptimal as it
requires BaseDriver tests to move. This falls firmly into the realm of
being a hack. Alternatives welcome.
2018-12-01 17:29:39 +01:00
Danielle Tomlinson
03db4cf82d
client: Rename drivers/shared/env => client/taskenv
2018-11-30 12:18:39 +01:00
Danielle Tomlinson
17d14d7f52
executors: Unify go-plugin handshake
2018-11-30 10:59:23 +01:00
Danielle Tomlinson
5262e42d62
fixup: executorplugin: fix rkt build
2018-11-30 10:47:08 +01:00
Danielle Tomlinson
75d333fe02
client: Move executor plugins into own package
2018-11-30 10:46:13 +01:00
Danielle Tomlinson
23197ec6b4
drivers: Create drivers/shared/structs
...
This creates a drivers/shared/structs package and moves the buffer size
checks into it.
2018-11-30 10:46:13 +01:00
Danielle Tomlinson
d2136e0aa7
drivers: Move client/drivers/executor to drivers/shared/executor
2018-11-30 10:46:13 +01:00
Danielle Tomlinson
6756ffd052
drivers: Move client/drivers/env to drivers/shared/env
...
As part of deprecating legacy drivers, we're moving the env package to a
new drivers/shared tree, as it is used by the modern docker and rkt
driver packages, and is useful for 3rd party plugins.
2018-11-30 10:46:13 +01:00
Chris Baker
6f2502e803
Merge pull request #4932 from hashicorp/b-1172-rkt-env-vars
...
change to testing utilities to fix rkt tests
2018-11-29 09:18:10 -05:00
Chris Baker
72ca56dabe
testing: in MkAllocDir, do not update TaskConfig with All() from the task builder, just with Env() (because it pollutes environment variables with node attributes and fails the rkt tests)
2018-11-28 22:19:48 +00:00
Preetha
be65442002
Merge pull request #4919 from hashicorp/f-fingerprint-attribute-type
...
Modify fingerprint interface to use typed attribute struct
2018-11-28 14:18:28 -06:00
Preetha Appan
829bf74aa8
modify fingerprint interface to use typed attribute struct
2018-11-28 10:01:03 -06:00
Alex Dadgar
429c5bb885
Device hook and devices affect computed node class
...
This PR introduces a device hook that retrieves the device mount
information for an allocation. It also updates the computed node class
computation to take into account devices.
TODO Fix the task runner unit test. The environment variable is being
lost even though it is being properly set in the prestart hook.
2018-11-27 17:25:33 -08:00
Chris Baker
e3108507c5
Merge pull request #4891 from hashicorp/b-1150-rkt-volume-names
...
drivers/rkt: fix invalid volumes
2018-11-27 18:55:00 -05:00
Chris Baker
f84045098c
change to docs in the driver proto to reflect standard pattern
2018-11-27 23:52:24 +00:00
Preetha Appan
0af9e85812
Fix panic in test setup when task does not have resources
...
This affects exec/rawexec drivers
2018-11-26 21:42:45 -06:00
Preetha Appan
22ac0498ca
Fix nil dereference in copy method
2018-11-26 15:53:15 -06:00
Chris Baker
790fe0b1db
modified TaskConfig to include AllocID
...
use this for volume names in drivers/rkt to address #1150
2018-11-26 18:54:26 +00:00
Mahmood Ali
ef52080b0a
Formatting and typo fixes
2018-11-25 11:53:21 -05:00
Nick Ethier
fc53f5f635
docker: sync access to exit result within a handle
2018-11-20 20:41:32 -05:00
Nick Ethier
8ae8932783
docker: fix tests
2018-11-19 22:59:18 -05:00
Nick Ethier
3601e4241d
plugins/driver: remove NodeResources from task Resources and use PercentTicks field for docker driver
2018-11-19 22:59:17 -05:00
Nick Ethier
37ed75502e
docker: move recoverable error proto to shared structs
2018-11-19 22:59:16 -05:00
Nick Ethier
9c154d7135
drivers: added NodeResources to drivers.TaskConfig
2018-11-19 22:59:16 -05:00
Nick Ethier
5c777a37de
drivers/docker: more work porting tests from old driver plugin
2018-11-19 22:59:16 -05:00
Nick Ethier
c2d94dc86a
drivers: support recoverable errors in the plugin RPC layer
2018-11-19 22:59:15 -05:00
Nick Ethier
98b295d617
docker: started work on porting docker driver to new plugin framework
2018-11-19 22:59:15 -05:00
Mahmood Ali
df694eb3be
Regenerate proto files with protoc-gen-go@v1.2.0
2018-11-14 09:01:26 -05:00
Alex Dadgar
6d0cd01a6a
Merge pull request #4868 from hashicorp/b-plugin-ctx
...
Plugin client's handle plugin dying
2018-11-13 10:26:53 -08:00
Alex Dadgar
9d42f4d039
Plugin client's handle plugin dying
...
This PR plumbs the plugins done ctx through the base and driver plugin
clients (device already had it). Further, it adds generic handling of
gRPC stream errors.
2018-11-12 17:09:27 -08:00
Mahmood Ali
60166374d9
Add a helper functions for checking unix root
2018-11-08 10:00:49 -08:00
Alex Dadgar
57f40c7e3e
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
9b82025608
client: do not run terminal allocs
2018-11-05 12:32:05 -08:00
Michael Schurter
fdbe446ea6
client: first pass at implementing task restoring
...
Task restoring works but dead tasks may be restarted
2018-11-05 12:32:05 -08:00
Michael Schurter
fd2fcd7cb6
drivers: only log non-cancellation errors
2018-10-30 17:13:35 -07:00
Nick Ethier
da7563b8c3
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
394cbc81b6
plugins/drivers: nil gaurd driver config when building executor config
2018-10-29 21:43:19 -04:00
Nick Ethier
95d381cff7
rename NomadConfig to ClientAgentConfig
2018-10-29 21:34:34 -04:00
Michael Schurter
41b40b9296
plugins/drivers: fix panic when copying a nil TaskHandle
2018-10-19 09:45:45 -07:00
Nick Ethier
7f69bcd4cd
added driver specific client config struct to plugin configuration
2018-10-18 23:31:01 -04:00
Nick Ethier
87748fe423
update rkt and exec setconfig funcs
2018-10-16 23:00:26 -04:00
Nick Ethier
832a214bac
drivers/exec: better fingerprinting and detection on non linux
2018-10-16 22:45:33 -04:00
Nick Ethier
7f5046849e
drivers/exec: add exec implementation
2018-10-16 22:45:28 -04:00
Michael Schurter
2361c1904b
tests: get tests building if not yet passing
2018-10-16 16:56:57 -07:00
Preetha Appan
3c6d6b9377
Review comments
2018-10-16 16:56:56 -07:00
Preetha Appan
0ebc3bdd2f
RKT driver plugin and unit tests
2018-10-16 16:56:56 -07:00
Nick Ethier
2e055fe18a
client: add test for driverfailure during fingerprinting
2018-10-16 16:56:56 -07:00
Preetha Appan
53381035db
Get raw exec tests compiling and passing again
2018-10-16 16:56:56 -07:00
Nick Ethier
b016b2b5b0
plugin/driver: add Copy funcs
2018-10-16 16:56:56 -07:00