Commit Graph

77 Commits

Author SHA1 Message Date
Alex Dadgar
ecec3d38de Nomad 0.9.0-beta1 generated code 2019-01-30 10:49:44 -08:00
Michael Schurter
158c74887e goimports until make check is happy 2019-01-23 06:27:14 -08:00
Michael Schurter
0d61ff0fb9 move pluginutils -> helper/pluginutils
I wanted a different color bikeshed, so I get to paint it
2019-01-22 15:50:08 -08:00
Alex Dadgar
72f8851254 Split hclspec 2019-01-22 15:43:34 -08:00
Alex Dadgar
8be7057177 move hclutils 2019-01-22 15:43:34 -08:00
Alex Dadgar
e46d67a889 Driver tests do not use hcl2/hcl, hclspec, or hclutils 2019-01-22 15:43:34 -08:00
Alex Dadgar
2d23f4a038 move reattach config 2019-01-22 15:11:58 -08:00
Alex Dadgar
c19cd2e5cf loader and singleton 2019-01-22 15:11:57 -08:00
Alex Dadgar
b9f36134dc move catalog + grpcutils 2019-01-22 15:11:57 -08:00
Alex Dadgar
7e81a9e3c4 increase log level 2019-01-22 14:20:54 -08:00
Mahmood Ali
9f7619344e Merge pull request #5190 from hashicorp/f-memory-usage
Track Basic Memory Usage as reported by cgroups
2019-01-18 16:46:02 -05:00
Chris Baker
0502f255c7 renamed mispelled function, fixed incorrect comment 2019-01-18 20:00:49 +00:00
Danielle Tomlinson
9b3456011a Merge pull request #5204 from hashicorp/dani/loader-typo-2
Fix typo in PluginLoader
2019-01-18 11:22:22 +01:00
Danielle Tomlinson
1d5c04ee1d pluginloader: typo: s/validePluginConfig/validatePluginConfig 2019-01-17 19:10:32 +01:00
Danielle Tomlinson
8ffd94ca55 plugins: Require an exe extension on windows 2019-01-17 18:43:14 +01:00
Danielle Tomlinson
3287c3f019 chore: General Cleanup 2019-01-17 18:43:14 +01:00
Mahmood Ali
fe8c60e157 chore: Stylistic cleanup
Co-Authored-By: dantoml <dani@tomlinson.io>
2019-01-17 18:43:14 +01:00
Danielle Tomlinson
8a4ffea94a chore: Cleanup formatting 2019-01-17 18:43:13 +01:00
Danielle Tomlinson
8547428807 plugins: Load plugins on windows 2019-01-17 18:43:13 +01:00
Mahmood Ali
b5c20aa50b Track Basic Memory Usage as reported by cgroups
Track current memory usage, `memory.usage_in_bytes`, in addition to
`memory.max_memory_usage_in_bytes` and friends.  This number is closer
what Docker reports.

Related to https://github.com/hashicorp/nomad/issues/5165 .
2019-01-14 18:47:52 -05:00
Mahmood Ali
b51ecacd23 remove lxc references 2019-01-08 09:28:20 -05:00
Alex Dadgar
437f03d877 recover 2019-01-07 14:49:40 -08:00
Alex Dadgar
07a7555acd lint 2018-12-18 16:48:00 -08:00
Alex Dadgar
ed4f8eac6e Add plugin API versioning to plugin loader and plugins 2018-12-18 16:48:00 -08:00
Danielle Tomlinson
113205318c plugins: Add support for serving driver plugins 2018-12-01 17:30:54 +01:00
Preetha Appan
829bf74aa8 modify fingerprint interface to use typed attribute struct 2018-11-28 10:01:03 -06:00
Mahmood Ali
b546247626 Add Driver Plugin for LXC 2018-11-27 21:40:43 -05:00
Nick Ethier
37ed75502e docker: move recoverable error proto to shared structs 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
Mahmood Ali
5af9296bb4 Expose Device Stats in /client/stats API endpoint 2018-11-14 14:41:19 -05:00
Mahmood Ali
dd47c590f0 Allow nullable fields in StatValues
In state values, we need to be able to distinguish between zero values
(e.g. `false`) and unset values (e.g. `nil`).

We can alternatively use protobuf `oneOf` and nested map to ensure
consistency of fields that are set together, but the golang
representation does not represent that well and introducing a mismatch
between representations.  Thus, I opted not to use it.
2018-11-14 14:41:19 -05:00
Mahmood Ali
2f4c510cb7 Move Stat{Object|Value} to plugins/shared/structs
Moving them as they may be useful for other packages/plugins besides
devices.
2018-11-14 09:01:26 -05:00
Mahmood Ali
df694eb3be Regenerate proto files with protoc-gen-go@v1.2.0 2018-11-14 09:01:26 -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
Alex Dadgar
37f239ea74 fix race 2018-11-07 12:22:07 -08:00
Alex Dadgar
a8e95502fe tests 2018-11-07 10:43:15 -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
Alex Dadgar
77ad27de60 assign devices 2018-11-07 10:32:03 -08:00
Mahmood Ali
efe9a60556 register the java plugin 2018-11-06 12:41:39 -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
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
864d545284 rkt: fix race, register by default, fix fingerprint 2018-10-30 17:37:00 -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
95d381cff7 rename NomadConfig to ClientAgentConfig 2018-10-29 21:34:34 -04:00
Nick Ethier
7f69bcd4cd added driver specific client config struct to plugin configuration 2018-10-18 23:31:01 -04:00
Nick Ethier
16935d6f01 test for setting NomadConfig in plugin loader 2018-10-16 22:47:26 -04:00
Nick Ethier
3244a4cc57 plumb NomadConfig into plugins 2018-10-16 22:47:22 -04:00
Michael Schurter
7848acbea4 register drivers by default
Do not register mock_driver on release builds.
2018-10-16 16:56:56 -07:00
Alex Dadgar
14cc4f7337 extra logging 2018-10-16 16:56:55 -07:00
Alex Dadgar
e2553a13d4 Fix client reloading and pass the plugin loaders to server and client 2018-10-16 16:56:55 -07:00