Danielle Tomlinson
2db5ae38d8
client: Rename drivers/shared/env => client/taskenv
2018-11-30 12:18:39 +01:00
Danielle Tomlinson
ffc5e5d56b
executors: Unify go-plugin handshake
2018-11-30 10:59:23 +01:00
Danielle Tomlinson
fdfe93aa25
fixup: executorplugin: fix rkt build
2018-11-30 10:47:08 +01:00
Danielle Tomlinson
d26a310db0
client: Move executor plugins into own package
2018-11-30 10:46:13 +01:00
Danielle Tomlinson
d582ea1d8b
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
0544a57abe
drivers: Move client/drivers/executor to drivers/shared/executor
2018-11-30 10:46:13 +01:00
Danielle Tomlinson
1a29811169
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
b43090a267
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
da35fda145
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
1f526db414
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
Michael Schurter
1bd9a9f9dd
Merge pull request #4894 from hashicorp/f-device-hook
...
Device hook and devices affect computed node class
2018-11-28 12:10:43 -06:00
Preetha Appan
f89dbcd9cc
modify fingerprint interface to use typed attribute struct
2018-11-28 10:01:03 -06:00
Mahmood Ali
6d34d2fade
Add Driver Plugin for LXC
2018-11-27 21:40:43 -05:00
Alex Dadgar
4ee603c382
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
a1fb1f3830
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
c0bc9d069d
change to docs in the driver proto to reflect standard pattern
2018-11-27 23:52:24 +00:00
Preetha Appan
b9a22f8047
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
125869686b
Fix nil dereference in copy method
2018-11-26 15:53:15 -06:00
Chris Baker
9bd4317139
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
141092e46d
Formatting and typo fixes
2018-11-25 11:53:21 -05:00
Nick Ethier
1f3fe02e62
docker: sync access to exit result within a handle
2018-11-20 20:41:32 -05:00
Nick Ethier
aa9f45ae47
docker: fix tests
2018-11-19 22:59:18 -05:00
Nick Ethier
4be8a86ef9
plugins/driver: remove NodeResources from task Resources and use PercentTicks field for docker driver
2018-11-19 22:59:17 -05:00
Nick Ethier
ced5d5c445
docker: move recoverable error proto to shared structs
2018-11-19 22:59:16 -05:00
Nick Ethier
69049d37f5
drivers: added NodeResources to drivers.TaskConfig
2018-11-19 22:59:16 -05:00
Nick Ethier
3d7cdea19e
drivers/docker: more work porting tests from old driver plugin
2018-11-19 22:59:16 -05:00
Nick Ethier
117b9e6584
drivers: support recoverable errors in the plugin RPC layer
2018-11-19 22:59:15 -05:00
Nick Ethier
8f8698b3e1
docker: started work on porting docker driver to new plugin framework
2018-11-19 22:59:15 -05:00
Mahmood Ali
b74ccc742c
Expose Device Stats in /client/stats API endpoint
2018-11-14 14:41:19 -05:00
Mahmood Ali
c5de71a424
Allow nullable fields in StatValues
...
In state values, we need to be able to distinguish between zero values
(e.g. `false`) and unset values (e.g. `nil`).
We can alternatively use protobuf `oneOf` and nested map to ensure
consistency of fields that are set together, but the golang
representation does not represent that well and introducing a mismatch
between representations. Thus, I opted not to use it.
2018-11-14 14:41:19 -05:00
Mahmood Ali
713c9fe683
Move Stat{Object|Value} to plugins/shared/structs
...
Moving them as they may be useful for other packages/plugins besides
devices.
2018-11-14 09:01:26 -05:00
Mahmood Ali
1f4db08f42
Regenerate proto files with protoc-gen-go@v1.2.0
2018-11-14 09:01:26 -05:00
Mahmood Ali
1e92161f14
Merge pull request #4858 from hashicorp/b-fix-master-20181109
...
Fix some tests in master
2018-11-13 16:08:26 -05:00
Alex Dadgar
17e8446484
Merge pull request #4868 from hashicorp/b-plugin-ctx
...
Plugin client's handle plugin dying
2018-11-13 10:26:53 -08:00
Mahmood Ali
ac3b4571eb
Address review comments
2018-11-13 10:21:40 -05:00
Mahmood Ali
fa146d9b85
fix plugin test
2018-11-13 10:21:40 -05:00
Alex Dadgar
693f244cce
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
032f86bc78
Add a helper functions for checking unix root
2018-11-08 10:00:49 -08:00
Alex Dadgar
c4f9e22aeb
fix race
2018-11-07 12:22:07 -08:00
Alex Dadgar
b4661df231
reserve uses donectx
2018-11-07 10:43:15 -08:00
Alex Dadgar
f0c7a8159b
tests
2018-11-07 10:43:15 -08:00
Alex Dadgar
204ca8230c
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
Alex Dadgar
feb83a2be3
assign devices
2018-11-07 10:32:03 -08:00
Mahmood Ali
53543b3e32
register the java plugin
2018-11-06 12:41:39 -08:00
Michael Schurter
392d548b85
Merge pull request #4828 from hashicorp/b-restore
...
Implement client agent restarting
2018-11-05 18:50:15 -06:00
Michael Schurter
d29d09023e
client: do not run terminal allocs
2018-11-05 12:32:05 -08:00
Michael Schurter
2bbd88888c
client: first pass at implementing task restoring
...
Task restoring works but dead tasks may be restarted
2018-11-05 12:32:05 -08:00
Mahmood Ali
a17521475d
Merge pull request #4826 from hashicorp/b-driver-exec-tweaks-20181031
...
Register exec driver plugin among some fixes
2018-11-02 10:11:05 -04:00
Mahmood Ali
9a45837c4e
Register exec driver plugin among some fixes
...
Namely, remove the `enabled` configuration flag, as it's specific to
`raw_exec` driver. Also, pass resource limits to underlying call.
2018-10-31 13:55:59 -04:00
Michael Schurter
2a38f575c0
rkt: fix race, register by default, fix fingerprint
2018-10-30 17:37:00 -07:00