Commit Graph

71 Commits

Author SHA1 Message Date
Alex Dadgar
ad4c26a1e3 review comments 2018-11-07 11:31:52 -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
Mahmood Ali
62d24ce9ef reconcile java with latest patterns 2018-11-06 12:49:29 -08:00
Mahmood Ali
12149c3804 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
dc0d244dd8 Reconcile with latest master patterns 2018-11-06 12:41:39 -08:00
Mahmood Ali
0022496e5b add java driver tests 2018-11-06 12:41:39 -08:00
Mahmood Ali
f7d83d7e80 Implement java driver 2018-11-06 12:41:39 -08:00
Michael Schurter
8122c76cd6 Merge pull request #4828 from hashicorp/b-restore
Implement client agent restarting
2018-11-05 18:50:15 -06:00
Michael Schurter
fdbe446ea6 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
11a64f1332 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
6b79e5bd12 add plugin config 2018-11-02 08:51:23 -04:00
Michael Schurter
ce604b8b86 rkt: standardize names/code 2018-11-01 15:53:07 -07:00
Michael Schurter
4d707b5e8c rawexec: standardize names/code 2018-11-01 15:53:07 -07:00
Michael Schurter
84c8dbe5c9 qemu: standardize names/code 2018-11-01 15:53:07 -07:00
Michael Schurter
e949416e12 drivers/mock: standardize names/code 2018-10-31 11:52:51 -07:00
Mahmood Ali
a5e1e4b59e 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
Michael Schurter
55d79c6022 mock_driver: match other's fingerprint message 2018-10-30 17:38:23 -07:00
Michael Schurter
864d545284 rkt: fix race, register by default, fix fingerprint 2018-10-30 17:37:00 -07:00
Michael Schurter
8f78d1d164 qemu: fix fingerprint description and handle race 2018-10-30 17:34:08 -07:00
Michael Schurter
0d1a8bf7fd rawexec: fix fingerprint results and tests
In tests:
* always cleanup (Kill) the harness
* don't call SetConfig more than once (a race)
* avoid cgroups to allow running without being root
2018-10-30 17:16:22 -07:00
Michael Schurter
7d250fc58c rawexec: fix race around h.procState 2018-10-30 17:15:47 -07:00
Michael Schurter
9fb39b35c6 drivers: remove stutter from exported driver names
Also fix a comment on the logger that got copy/pasted around.
2018-10-30 14:05:31 -07:00
Michael Schurter
7d28d346d5 qemu: fix build and register by default
API changes had broken the build.
2018-10-29 22:10:37 -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
Preetha Appan
9937dc93b9 Merge branch 'f-driver-plugin-qemu' of github.com:hashicorp/nomad into f-driver-plugin-qemu 2018-10-25 13:51:58 -05:00
Preetha Appan
0ec59305ee remove driver config struct from qemu driver since its not used 2018-10-25 13:51:06 -05:00
Michael Schurter
76ad56c73f Fix hclog log line formatting
Co-Authored-By: preetapan <preetha@hashicorp.com>
2018-10-25 13:47:17 -05:00
Preetha Appan
c99b8701de Fix imports 2018-10-25 13:45:44 -05:00
Michael Schurter
1744b4d123 Fix copy pasted comment
Co-Authored-By: preetapan <preetha@hashicorp.com>
2018-10-25 13:43:29 -05:00
Michael Schurter
2101d58d0f remove newline
Co-Authored-By: preetapan <preetha@hashicorp.com>
2018-10-25 13:42:20 -05:00
Michael Schurter
2cf48b931d update comment
Co-Authored-By: preetapan <preetha@hashicorp.com>
2018-10-25 13:41:24 -05:00
Michael Schurter
1f87a25d54 Remove unnecessary return
Co-Authored-By: preetapan <preetha@hashicorp.com>
2018-10-25 13:40:28 -05:00
Michael Schurter
f50c358988 remove unnecessary return
Co-Authored-By: preetapan <preetha@hashicorp.com>
2018-10-25 13:40:15 -05:00
Nick Ethier
b837bf3ce3 drivers: update SetConfig to handle driver client config 2018-10-18 23:32:17 -04:00
Michael Schurter
08574715e3 Update drivers/qemu/driver.go 2018-10-17 17:42:01 -05:00
Preetha Appan
e20e3d7c36 QEMU driver plugin 2018-10-17 11:43:15 -05:00
Alex Dadgar
0202b183cc Merge pull request #4793 from hashicorp/b-no-cty
Do not use cty in drivers
2018-10-16 20:04:41 -07:00
Nick Ethier
87748fe423 update rkt and exec setconfig funcs 2018-10-16 23:00:26 -04:00
Nick Ethier
3244a4cc57 plumb NomadConfig into plugins 2018-10-16 22:47:22 -04:00
Nick Ethier
832a214bac drivers/exec: better fingerprinting and detection on non linux 2018-10-16 22:45:33 -04:00
Nick Ethier
7f5046849e drivers/exec: add exec implementation 2018-10-16 22:45:28 -04:00
Alex Dadgar
a10d3964d0 Do not use cty in drivers 2018-10-16 17:17:07 -07:00
Michael Schurter
cf42289c8b fix linter errors 2018-10-16 16:56:57 -07:00
Nick Ethier
3a9ed23d71 driver/docker: rename container logger 2018-10-16 16:56:56 -07:00
Michael Schurter
9c4a1d4c28 drivers/mock: fix plugin name
Was mock_driver before plugins, so keep the name.
2018-10-16 16:56:56 -07:00
Preetha Appan
b12de40124 Address review comments around logging task properly 2018-10-16 16:56:56 -07:00
Preetha Appan
ed2b3b25c5 Address review comments 2018-10-16 16:56:56 -07:00
Preetha Appan
be57b3e84d Switch back to using map[string]string for port map 2018-10-16 16:56:56 -07:00
Michael Schurter
4175e908dd fixup comments, logging, and missing method impls
from #4777 comments
2018-10-16 16:56:56 -07:00