406 Commits

Author SHA1 Message Date
Alex Dadgar
fe2fa21a7d gofmt 2019-01-22 15:43:34 -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
Nick Ethier
f3ab65947e drivers: regen proto 2019-01-18 18:53:45 -05:00
Nick Ethier
994c66f7d7 drivers: use consts for task handle version 2019-01-18 18:31:01 -05:00
Nick Ethier
7c440aa437 drivers: fix test 2019-01-18 18:31:01 -05:00
Nick Ethier
2f91ac88f7 cleanup code comments and small fixes from refactor 2019-01-18 18:31:01 -05:00
Nick Ethier
07cdedec2f driver: add pre09 migration logic 2019-01-18 18:31:01 -05:00
Nick Ethier
2118d94b2d executor: add pre 0.9 client and wrapper 2019-01-18 18:30:58 -05: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
Nick Ethier
72a4685534 drivers: plumb grpc client logger 2019-01-12 12:18:23 -05:00
Nick Ethier
9904463da2 executor: fix failing stats related test 2019-01-12 12:18:23 -05:00
Nick Ethier
f6af1d4d04 docker: add test for stats collection 2019-01-12 12:18:22 -05:00
Nick Ethier
fbf9a4c772 executor: implement streaming stats API
plugins/driver: update driver interface to support streaming stats

client/tr: use streaming stats api

TODO:
 * how to handle errors and closed channel during stats streaming
 * prevent tight loop if Stats(ctx) returns an error

drivers: update drivers TaskStats RPC to handle streaming results

executor: better error handling in stats rpc

docker: better control and error handling of stats rpc

driver: allow stats to return a recoverable error
2019-01-12 12:18:22 -05:00
Mahmood Ali
d0efb37b80 Merge pull request #5162 from hashicorp/f-extract-lxc
Extract LXC from nomad
2019-01-09 13:07:05 -05:00
Mahmood Ali
d1fbd735f3 Merge pull request #5157 from hashicorp/r-drivers-no-cstructs
drivers: avoid referencing client/structs package
2019-01-09 13:06:46 -05:00
Mahmood Ali
855e3684e3 fixup! remove unused field 2019-01-08 12:58:12 -05:00
Mahmood Ali
b0a3f6b491 remove unused field 2019-01-08 12:19:44 -05:00
Mahmood Ali
b51ecacd23 remove lxc references 2019-01-08 09:28:20 -05:00
Mahmood Ali
34ee0ba6b9 Remove some dead code 2019-01-08 09:11:48 -05:00
Mahmood Ali
800a3522e3 drivers: re-export ResourceUsage structs
Re-export the ResourceUsage structs in drivers package to avoid drivers
directly depending on the internal client/structs package directly.

I attempted moving the structs to drivers, but that caused some import
cycles that was a bit hard to disentagle.  Alternatively, I added an
alias here that's sufficient for our purposes of avoiding external
drivers depend on internal packages, while allowing us to restructure
packages in future without breaking source compatibility.
2019-01-08 09:11:47 -05:00
Mahmood Ali
c0162fab35 move cstructs.DeviceNetwork to drivers pkg 2019-01-08 09:11:47 -05:00
Mahmood Ali
694e3010c2 use drivers.FSIsolation 2019-01-08 09:11:47 -05:00
Danielle Tomlinson
994057abf4 drivers: Add internal interface for Shutdown
This allows us to correctly terminate internal state during runs of the
nomad test suite, e.g closing eventer contexts correctly.
2019-01-08 13:48:49 +01:00
Alex Dadgar
4e7da3ea4e regenerate protos 2019-01-07 14:49:40 -08:00
Alex Dadgar
437f03d877 recover 2019-01-07 14:49:40 -08:00
Alex Dadgar
ffadab1b20 remove nil logger 2019-01-07 14:48:01 -08:00
Preetha Appan
26594aa31e Standardize driver health description messages for all drivers 2019-01-06 22:06:38 -06:00
Danielle Tomlinson
749eab7257 chore: Fix environement->environment typo 2019-01-03 13:31:26 +01:00
Danielle Tomlinson
26b5ad4532 Merge pull request #5041 from hashicorp/dani/b-driver-healt
drivers: Cleanup root user fingerprinting
2019-01-03 13:16:28 +01:00
Danielle Tomlinson
4798dacafd plugins: Add consistent message for requires root 2018-12-20 12:54:01 +01:00
Alex Dadgar
99df4c98c7 Store device envs separately and pass to drivers 2018-12-19 14:23:09 -08:00
Alex Dadgar
9a017adfc9 proto 2018-12-19 13:54:19 -08:00
Nick Ethier
6951ca487d drivermanager: use allocID and task name to route task events 2018-12-18 23:01:51 -05: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