Preetha Appan
0d90ba392e
Fix lxc test panic
2018-11-28 13:56:17 -06:00
Preetha Appan
924f1b69e9
Fix failing lxc test
2018-11-28 11:05:35 -06:00
Preetha Appan
bf58c65ef7
Fix LXC driver fingerprint to use typedattributes
2018-11-28 10:09:10 -06:00
Preetha Appan
9f4439243b
Fix docker driver to use new fingerprint typed attributes
2018-11-28 10:01:03 -06:00
Preetha Appan
f89dbcd9cc
modify fingerprint interface to use typed attribute struct
2018-11-28 10:01:03 -06:00
Mahmood Ali
9af8deabbf
address review comments
2018-11-27 21:40:43 -05:00
Mahmood Ali
6d34d2fade
Add Driver Plugin for LXC
2018-11-27 21:40:43 -05: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
Mahmood Ali
141092e46d
Formatting and typo fixes
2018-11-25 11:53:21 -05:00
Mahmood Ali
c61d99b525
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
1f3fe02e62
docker: sync access to exit result within a handle
2018-11-20 20:41:32 -05:00
Michael Schurter
2275153875
Apply suggestions from code review
...
Co-Authored-By: nickethier <ncethier@gmail.com>
2018-11-20 20:33:31 -05:00
Mahmood Ali
e9e415f186
Add support for storage opt
2018-11-20 16:11:02 -05:00
Nick Ethier
3ccd359735
docker: unexport new coordinator func
2018-11-19 23:07:07 -05:00
Nick Ethier
8b9b2b476e
docker: add default blocks for driver plugin config schema
2018-11-19 22:59:18 -05:00
Nick Ethier
2667f48a5d
docker: move config RPCs to config.go
2018-11-19 22:59:18 -05:00
Nick Ethier
aa9f45ae47
docker: fix tests
2018-11-19 22:59:18 -05:00
Nick Ethier
0f03e8f520
docker: remove container pointer from task handle
2018-11-19 22:59:18 -05:00
Nick Ethier
ce4b867d21
docker: move volume driver options to seperate block
2018-11-19 22:59:18 -05:00
Nick Ethier
fca2df3c79
docker: group common config into blocks
2018-11-19 22:59:17 -05:00
Michael Schurter
813341dd59
Apply suggestions from code review
...
Co-Authored-By: nickethier <ncethier@gmail.com>
2018-11-19 22:59:17 -05:00
Nick Ethier
b7bd36db30
docker: remove global pull coordinator
2018-11-19 22:59:17 -05:00
Nick Ethier
f0a86859a0
docker: remove call to global metrics instance
2018-11-19 22:59:17 -05:00
Nick Ethier
8ef73e63ce
docker: moved fingerprint code to it's own file
2018-11-19 22:59:17 -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
585e468085
docker: implement recover task logic
2018-11-19 22:59:16 -05:00
Nick Ethier
ee51cb6a93
docker: finished porting tests
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
8f8698b3e1
docker: started work on porting docker driver to new plugin framework
2018-11-19 22:59:15 -05:00
Nick Ethier
9e64ce7d73
docker: properly launch docker logger process
2018-11-19 22:59:12 -05:00
Michael Schurter
f8cdd561f0
client: interpolate driver configurations
...
Also add missing SetDriverNetwork calls.
2018-11-15 16:25:57 -08: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
356c194acc
Use materialized duration fields for driver config
2018-11-13 10:21:40 -05:00
Mahmood Ali
470d20cdf3
Avoid downloading image if present locally
2018-11-13 10:21:40 -05:00
Mahmood Ali
7690f389a0
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
e9067e52b4
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
8923ea4663
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
fb56dd699d
distinguish java driver tests from others
2018-11-13 10:21:40 -05:00
Mahmood Ali
343df28165
Fix java driver tests
2018-11-13 10:21:40 -05:00
Mahmood Ali
e506ebbc24
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
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
Danielle Tomlinson
880e5015f2
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
9c76a7d9b8
handle nil resources limits
...
Config may not express resource constraints on the job!
2018-11-09 15:52:44 -05:00
Mahmood Ali
1ed53ca478
shorter health descriptions
2018-11-08 10:00:49 -08:00
Mahmood Ali
032f86bc78
Add a helper functions for checking unix root
2018-11-08 10:00:49 -08:00