Commit Graph

25 Commits

Author SHA1 Message Date
Alex Dadgar
437f03d877 recover 2019-01-07 14:49:40 -08:00
Alex Dadgar
0cdf6634a5 base fixes 2018-12-18 16:48:00 -08:00
Alex Dadgar
d4fd73d536 protos 2018-12-18 16:48:00 -08:00
Preetha Appan
829bf74aa8 modify fingerprint interface to use typed attribute struct 2018-11-28 10:01:03 -06:00
Mahmood Ali
df694eb3be Regenerate proto files with protoc-gen-go@v1.2.0 2018-11-14 09:01:26 -05: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
Alex Dadgar
a8e95502fe tests 2018-11-07 10:43:15 -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
e7bf482eaa plugins: SetConfig shouldn't panic on nil driver configs 2018-10-30 17:14:27 -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
95d381cff7 rename NomadConfig to ClientAgentConfig 2018-10-29 21:34:34 -04:00
Nick Ethier
7f69bcd4cd added driver specific client config struct to plugin configuration 2018-10-18 23:31:01 -04:00
Nick Ethier
3244a4cc57 plumb NomadConfig into plugins 2018-10-16 22:47:22 -04:00
Alex Dadgar
a10d3964d0 Do not use cty in drivers 2018-10-16 17:17:07 -07:00
Michael Schurter
2b249eee14 plugins: msgpack codec should use cty tags 2018-10-16 16:56:56 -07:00
Nick Ethier
e2bf0a388e clientv2: base driver plugin (#4671)
Driver plugin framework to facilitate development of driver plugins.

Implementing plugins only need to implement the DriverPlugin interface.
The framework proxies this interface to the go-plugin GRPC interface generated
from the driver.proto spec.

A testing harness is provided to allow implementing drivers to test the full
lifecycle of the driver plugin. An example use:

func TestMyDriver(t *testing.T) {
    harness := NewDriverHarness(t, &MyDiverPlugin{})
    // The harness implements the DriverPlugin interface and can be used as such
    taskHandle, err := harness.StartTask(...)
}
2018-10-16 16:53:31 -07:00
Alex Dadgar
a0b01d16c6 Example device plugin and helpers
This PR introduces:
* An example device plugin that exposes files as devices for testing.
* Helpers for serving a device plugin
* A launcher binary that allows interacting with a device plugin without
needing a Nomad client.
2018-08-28 13:59:57 -07:00
Alex Dadgar
e11a510bd8 initial device go-plugin 2018-08-16 16:49:09 -07:00
Alex Dadgar
2de5989e37 vet 2018-08-13 11:10:33 -07:00
Alex Dadgar
1736d93430 Review comments 2018-08-13 11:01:44 -07:00
Alex Dadgar
cfc6992e4a Initial go-plugin 2018-08-12 15:58:39 -07:00
Alex Dadgar
6cd2c19b9b move protos 2018-08-10 11:16:55 -07:00
Alex Dadgar
827dbabcc2 Fix protos 2018-08-09 13:29:05 -07:00
Alex Dadgar
49e27c0807 SetConfig 2018-08-07 16:16:23 -07:00
Alex Dadgar
48d71eb0fe Base and device plugin and hclspec parser 2018-08-07 13:03:21 -07:00