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
Mahmood Ali
21d126cd68
Update exec driver to match rawexec
...
Update exec driver with latest patterns used by rawexec, and eliminate
accidental diffs.
2018-11-08 10:00:49 -08:00
Alex Dadgar
a7ca737fb6
review comments
2018-11-07 11:31:52 -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
Mahmood Ali
32283b2a66
reconcile java with latest patterns
2018-11-06 12:49:29 -08:00
Mahmood Ali
467360954a
driver/java: support non-linux targets
...
Java driver supports non-linux targets, so LinuxResources fields isn't
guaranteed to be not-nil.
2018-11-06 12:41:39 -08:00
Mahmood Ali
e64ef839b8
Reconcile with latest master patterns
2018-11-06 12:41:39 -08:00
Mahmood Ali
c3881bd8d1
add java driver tests
2018-11-06 12:41:39 -08:00
Mahmood Ali
4f525d0a17
Implement java driver
2018-11-06 12:41:39 -08:00
Michael Schurter
392d548b85
Merge pull request #4828 from hashicorp/b-restore
...
Implement client agent restarting
2018-11-05 18:50:15 -06: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
Mahmood Ali
a17521475d
Merge pull request #4826 from hashicorp/b-driver-exec-tweaks-20181031
...
Register exec driver plugin among some fixes
2018-11-02 10:11:05 -04:00
Mahmood Ali
dc0fc442ab
add plugin config
2018-11-02 08:51:23 -04:00
Michael Schurter
83db3e6a50
rkt: standardize names/code
2018-11-01 15:53:07 -07:00
Michael Schurter
1a7fb51285
rawexec: standardize names/code
2018-11-01 15:53:07 -07:00
Michael Schurter
5a5d52023d
qemu: standardize names/code
2018-11-01 15:53:07 -07:00
Michael Schurter
3c5e606ef6
drivers/mock: standardize names/code
2018-10-31 11:52:51 -07:00
Mahmood Ali
9a45837c4e
Register exec driver plugin among some fixes
...
Namely, remove the `enabled` configuration flag, as it's specific to
`raw_exec` driver. Also, pass resource limits to underlying call.
2018-10-31 13:55:59 -04:00