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
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
Nick Ethier
9d8d3e158a
docker: properly launch docker logger process
2018-11-19 22:59:12 -05:00
Michael Schurter
43b359914b
client: interpolate driver configurations
...
Also add missing SetDriverNetwork calls.
2018-11-15 16:25:57 -08:00
Mahmood Ali
df694eb3be
Regenerate proto files with protoc-gen-go@v1.2.0
2018-11-14 09:01:26 -05:00
Mahmood Ali
851b275afc
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
6d0cd01a6a
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
9d6a362b94
Use materialized duration fields for driver config
2018-11-13 10:21:40 -05:00
Mahmood Ali
9254bdb92e
Avoid downloading image if present locally
2018-11-13 10:21:40 -05:00
Mahmood Ali
6b8c6836a9
Prioritize checking consumer context cancellation
...
Tests expect that as soon as eventer shuts down immediately on context
cancellations; but golang does not guarantee priority when multiple
pending channels are ready in a select statement.
2018-11-13 10:21:40 -05:00
Mahmood Ali
8ccb80bcea
pull alpine image needed for test
...
The test requires the image to be present locally, so importing it as
part of setup.
2018-11-13 10:21:40 -05:00
Mahmood Ali
416b5240f4
Handle time.Duration in mock
...
Mock driver config uses `time.Duration` fields but we initialize them
inconsistently, as time.Duration sometimes and as duration strings other
times. Previously, `mapstructure` handles it and does the right thing.
This is no longer the case with MsgPack. I could not find a good way to
bring back old behavior without too much complexity. `MsgPack` extended
types weren't ideal here as we lose type information (e.g. int64 vs
string), and the input is a generic map and not a MsgPack serialization
of duration.
As such, I went with the simple solution of declaring the config field
as duration string, and panicing if the test doesn't pass a valid
string.
I found this to cause the smallest change in tests, but we can
alternatively force all to be int64 instead.
2018-11-13 10:21:40 -05:00
Mahmood Ali
cc52606a07
distinguish java driver tests from others
2018-11-13 10:21:40 -05:00
Mahmood Ali
a24fd59d4b
Fix java driver tests
2018-11-13 10:21:40 -05:00
Mahmood Ali
66fc70fe50
Merge pull request #4845 from hashicorp/r-exec-refactor
...
Update exec driver to match rawexec
2018-11-12 20:59:32 -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
Danielle Tomlinson
1a17741e86
rawexec: Only use cgroups when running as root.
...
If Nomad is not running as root, we should not try to use cgroups for pid
freezing.
This originally was implemented pre-driver-support in
https://github.com/hashicorp/nomad/blob/v0.8.6/client/driver/raw_exec.go#L120-L130
2018-11-10 06:45:11 -08:00
Mahmood Ali
82b1764531
handle nil resources limits
...
Config may not express resource constraints on the job!
2018-11-09 15:52:44 -05:00
Mahmood Ali
26fc1b140f
shorter health descriptions
2018-11-08 10:00:49 -08:00
Mahmood Ali
60166374d9
Add a helper functions for checking unix root
2018-11-08 10:00:49 -08:00