Nick Ethier
467930f650
executor: use grpc instead of netrpc as plugin protocol
...
* Added protobuf spec for executor
* Seperated executor structs into their own package
2018-12-05 11:03:56 -05:00
Danielle Tomlinson
cd8c5c55bd
Merge pull request #4925 from hashicorp/f-driver-plugins-dani
...
Third Party Driver Plugins Support
2018-12-03 20:48:19 +01:00
Mahmood Ali
813f0a2282
libcontainer to manage /dev and /proc ( #4945 )
...
libcontainer already manages `/dev`, overriding task_dir - so let's use it for `/proc` as well and remove deadcode.
2018-12-03 10:41:01 -05: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
da48a7eab3
client: Move fingerprint structs to pkg
...
This removes a cyclical dependency when importing client/structs from
dependencies of the plugin_loader, specifically, drivers. Due to
client/config also depending on the plugin_loader.
It also better reflects the ownership of fingerprint structs, as they
are fairly internal to the fingerprint manager.
2018-12-01 17:10:39 +01:00
Danielle Tomlinson
b8b4ce2fa6
Merge pull request #4936 from hashicorp/f-legacy-refactor
...
Refactor and repackage client/driver
2018-11-30 13:38:06 +01:00
Mahmood Ali
ef424132d0
Merge pull request #4926 from hashicorp/f-docker-image-ref
...
Use user provided image name to launch container
2018-11-30 07:27:39 -05:00
Mahmood Ali
5c354ad8fa
Merge pull request #4924 from hashicorp/f-docker-mounts
...
Support bind and tmpfs docker mounts
2018-11-30 07:27:17 -05:00
Danielle Tomlinson
03db4cf82d
client: Rename drivers/shared/env => client/taskenv
2018-11-30 12:18:39 +01:00
Danielle Tomlinson
756325bcbd
client: Merge driver/shared/structs and client/structs
2018-11-30 10:56:45 +01:00
Danielle Tomlinson
5262e42d62
fixup: executorplugin: fix rkt build
2018-11-30 10:47:08 +01:00
Danielle Tomlinson
bacd6175f5
client: Migrate DriverStats optout to drivers/shared/structs
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
Preetha Appan
22ddb4d18d
Fix lxc test panic
2018-11-28 13:56:17 -06:00
Preetha Appan
76f27a111d
Fix failing lxc test
2018-11-28 11:05:35 -06:00
Preetha Appan
27fb643f5e
Fix LXC driver fingerprint to use typedattributes
2018-11-28 10:09:10 -06:00
Preetha Appan
d36ba880a3
Fix docker driver to use new fingerprint typed attributes
2018-11-28 10:01:03 -06:00
Preetha Appan
829bf74aa8
modify fingerprint interface to use typed attribute struct
2018-11-28 10:01:03 -06:00
Mahmood Ali
aa28f71bbe
address review comments
2018-11-27 21:40:43 -05:00
Mahmood Ali
b546247626
Add Driver Plugin for LXC
2018-11-27 21:40:43 -05:00
Michael Schurter
60aadc853b
gofmt -s -w drivers/rkt/driver_test.go
2018-11-27 17:24:23 -08:00
Mahmood Ali
2310600d91
Use user provided image name to launch container
...
This allows the container to be tagged with a user friendly image name
(e.g. `redis:3.2`) rather than the image ID (e.g.
`sha256:87856cc39862cec77541d68382e4867d7ccb29a85a17221446c857ddaebca916`).
Useful for human debugging, as well as some debugging and image scanning
tools.
This risks two bad changes:
1. Discrepancy in image resolution between docker and Nomad's image
loader.
* I checked the image creation paths in Nomad, and noticed that we
either pulled the image or inspect the image with the user provided
name.
2. A race in image tagging where the tag is modified between image
loading and container creation.
* I, personally, don't think this case is cause for concern, as it is
analogous to the task running a bit later. As long as the image is
still present, creating the container should be good.
2018-11-27 16:12:15 -05:00
Mahmood Ali
fb5ffe62de
add support for tmpfs
2018-11-27 07:20:17 -05:00
Mahmood Ali
9c89ea4e08
Support docker bind mounts
2018-11-27 07:20:17 -05:00
Chris Baker
4b6faec9bc
drivers/rkt: updated test to include new AllocID field in TaskConfig
2018-11-26 21:37:58 +00: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
Mahmood Ali
2aa034e174
Merge pull request #4908 from hashicorp/f-docker-opts-storageopt
...
Add support for docker storage options
2018-11-20 21:08:27 -05:00
Nick Ethier
fc53f5f635
docker: sync access to exit result within a handle
2018-11-20 20:41:32 -05:00
Michael Schurter
ace09b3a84
Apply suggestions from code review
...
Co-Authored-By: nickethier <ncethier@gmail.com >
2018-11-20 20:33:31 -05:00
Mahmood Ali
2c7bea7190
Add support for storage opt
2018-11-20 16:11:02 -05:00
Nick Ethier
2393f6a008
docker: unexport new coordinator func
2018-11-19 23:07:07 -05:00
Nick Ethier
fab76c6c0b
docker: add default blocks for driver plugin config schema
2018-11-19 22:59:18 -05:00
Nick Ethier
249dbfffd2
docker: move config RPCs to config.go
2018-11-19 22:59:18 -05:00
Nick Ethier
8ae8932783
docker: fix tests
2018-11-19 22:59:18 -05:00
Nick Ethier
0462c8a7f8
docker: remove container pointer from task handle
2018-11-19 22:59:18 -05:00
Nick Ethier
d7631e3b23
docker: move volume driver options to seperate block
2018-11-19 22:59:18 -05:00
Nick Ethier
577d4a2ea8
docker: group common config into blocks
2018-11-19 22:59:17 -05:00
Michael Schurter
455e75492c
Apply suggestions from code review
...
Co-Authored-By: nickethier <ncethier@gmail.com >
2018-11-19 22:59:17 -05:00
Nick Ethier
3468880f50
docker: remove global pull coordinator
2018-11-19 22:59:17 -05:00
Nick Ethier
7d09ae57cc
docker: remove call to global metrics instance
2018-11-19 22:59:17 -05:00
Nick Ethier
0c62b9adf4
docker: moved fingerprint code to it's own file
2018-11-19 22:59:17 -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
396f6ab1fb
docker: implement recover task logic
2018-11-19 22:59:16 -05:00
Nick Ethier
902eb9475c
docker: finished porting tests
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
98b295d617
docker: started work on porting docker driver to new plugin framework
2018-11-19 22:59:15 -05:00