Mahmood Ali
23c07b9afe
tests: update stop/kill tests with new pattern
...
Update rawexec and rkt stop/kill tests with the patterns introduced in
7a49e9b68e519050a0c2ef0b67c33503bfbc51be. This implementation should be
more resilient to discrepancy between task stopping and task being marked as exited.
2018-12-11 09:35:26 -05:00
Mahmood Ali
bdc53b1d8e
driver/rkt: mount plugin devices
2018-12-06 15:46:35 -05:00
Mahmood Ali
8df9de6fd5
driver/rkt: use rkt environment
...
The rkt command itself needs an environment with PATH set to find iptables.
2018-12-04 14:00:45 -05:00
Mahmood Ali
06a5cadf35
drivers/rkt: use image isolation for rkt
2018-12-04 11:40:10 -05:00
Mahmood Ali
178365848e
tests: don't assert in WaitForResult
...
WaitForResult expects body to fail and retries few times before giving
up. Assertions inside the testfn body causes it to terminate abruptly
without retrying.
2018-12-04 11:40:10 -05:00
Danielle Tomlinson
393b76ed7f
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
2db5ae38d8
client: Rename drivers/shared/env => client/taskenv
2018-11-30 12:18:39 +01:00
Danielle Tomlinson
fdfe93aa25
fixup: executorplugin: fix rkt build
2018-11-30 10:47:08 +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
Preetha Appan
f89dbcd9cc
modify fingerprint interface to use typed attribute struct
2018-11-28 10:01:03 -06:00
Michael Schurter
e565c63eed
gofmt -s -w drivers/rkt/driver_test.go
2018-11-27 17:24:23 -08:00
Chris Baker
3dd6ba514a
drivers/rkt: updated test to include new AllocID field in TaskConfig
2018-11-26 21:37:58 +00: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
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
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
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
Michael Schurter
83db3e6a50
rkt: standardize names/code
2018-11-01 15:53:07 -07:00
Michael Schurter
2a38f575c0
rkt: fix race, register by default, fix fingerprint
2018-10-30 17:37:00 -07:00
Michael Schurter
9fa53565ad
drivers: remove stutter from exported driver names
...
Also fix a comment on the logger that got copy/pasted around.
2018-10-30 14:05:31 -07:00
Nick Ethier
3fcf8ba7e6
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
bda3b1d3b3
rename NomadConfig to ClientAgentConfig
2018-10-29 21:34:34 -04:00
Nick Ethier
9916b9e0ce
drivers: update SetConfig to handle driver client config
2018-10-18 23:32:17 -04:00
Nick Ethier
823a6c8d6c
update rkt and exec setconfig funcs
2018-10-16 23:00:26 -04:00
Alex Dadgar
88c1885044
Do not use cty in drivers
2018-10-16 17:17:07 -07:00
Michael Schurter
838ddf4d4a
fix linter errors
2018-10-16 16:56:57 -07:00
Preetha Appan
d634157158
Address review comments around logging task properly
2018-10-16 16:56:56 -07:00
Preetha Appan
3280727c4e
Address review comments
2018-10-16 16:56:56 -07:00
Preetha Appan
02b1f26d34
Switch back to using map[string]string for port map
2018-10-16 16:56:56 -07:00
Preetha Appan
9b3e82a4e7
make port map a slice of maps to match existing rkt driver
2018-10-16 16:56:56 -07:00
Preetha Appan
4f4777d6a6
Review comments
2018-10-16 16:56:56 -07:00
Preetha Appan
edad5e9e6d
Stats collection test
2018-10-16 16:56:56 -07:00
Preetha Appan
678072ecd1
RKT driver plugin and unit tests
2018-10-16 16:56:56 -07:00
Nick Ethier
15e8477c4e
rkt: start rkt driver plugin
2018-10-16 16:56:56 -07:00