Commit graph

34 commits

Author SHA1 Message Date
Alex Dadgar 471fdb3ccf
Merge pull request #5173 from hashicorp/b-log-levels
Plugins use parent loggers
2019-01-14 16:14:30 -08:00
Nick Ethier 9fea54e0dc
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
Alex Dadgar 14ed757a56 Plugins use parent loggers
This PR fixes various instances of plugins being launched without using
the parent loggers. This meant that logs would not all go to the same
output, break formatting etc.
2019-01-11 11:36:37 -08:00
Mahmood Ali 64f80343fc 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 916a40bb9e move cstructs.DeviceNetwork to drivers pkg 2019-01-08 09:11:47 -05:00
Mahmood Ali 9369b123de use drivers.FSIsolation 2019-01-08 09:11:47 -05:00
Danielle Tomlinson a9b9ad34dc drivers: Implement InternalPluginDriver interface
This implements the InternalPluginDriver interface in each driver, and
calls the cancellation fn for their respective eventers.

This fixes a per task goroutine leak during test suite execution.
2019-01-08 13:49:31 +01:00
Preetha Appan 2fb2de3cef
Standardize driver health description messages for all drivers 2019-01-06 22:06:38 -06:00
Alex Dadgar 4c57d2ec4d Add plugin API versioning to plugin loader and plugins 2018-12-18 16:48:00 -08:00
Alex Dadgar 327b551b39 Drivers 2018-12-18 15:50:11 -08:00
Nick Ethier 29ef54c0ee
executor: merge plugin shim with executor package 2018-12-06 21:13:45 -05:00
Nick Ethier 71353a88d4
executor: remove structs package 2018-12-06 20:54:14 -05:00
Nick Ethier 02f4b0fac5
executor: update driver references 2018-12-05 11:04:18 -05:00
Danielle Tomlinson fdfe93aa25 fixup: executorplugin: fix rkt build 2018-11-30 10:47:08 +01:00
Danielle Tomlinson 0544a57abe drivers: Move client/drivers/executor to drivers/shared/executor 2018-11-30 10:46:13 +01:00
Preetha Appan f89dbcd9cc
modify fingerprint interface to use typed attribute struct 2018-11-28 10:01:03 -06: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
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
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
Michael Schurter 5a5d52023d qemu: standardize names/code 2018-11-01 15:53:07 -07:00
Michael Schurter 5b0b75e1ee qemu: fix fingerprint description and handle race 2018-10-30 17:34:08 -07:00
Michael Schurter 9fa53565ad 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 fc320906aa qemu: fix build and register by default
API changes had broken the build.
2018-10-29 22:10:37 -07:00
Preetha Appan 68991d8acb
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 bfff771416
remove driver config struct from qemu driver since its not used 2018-10-25 13:51:06 -05:00
Michael Schurter 48d25dbef1
Fix hclog log line formatting
Co-Authored-By: preetapan <preetha@hashicorp.com>
2018-10-25 13:47:17 -05:00
Preetha Appan 95a1637741
Fix imports 2018-10-25 13:45:44 -05:00
Michael Schurter ca151a7828
Fix copy pasted comment
Co-Authored-By: preetapan <preetha@hashicorp.com>
2018-10-25 13:43:29 -05:00
Michael Schurter c85b90f1e4
remove newline
Co-Authored-By: preetapan <preetha@hashicorp.com>
2018-10-25 13:42:20 -05:00
Michael Schurter 66c15e3a67
update comment
Co-Authored-By: preetapan <preetha@hashicorp.com>
2018-10-25 13:41:24 -05:00
Michael Schurter 9ca6c998c7
Remove unnecessary return
Co-Authored-By: preetapan <preetha@hashicorp.com>
2018-10-25 13:40:28 -05:00
Michael Schurter fc7ba5e79d
remove unnecessary return
Co-Authored-By: preetapan <preetha@hashicorp.com>
2018-10-25 13:40:15 -05:00
Michael Schurter af3e9adf2f Update drivers/qemu/driver.go 2018-10-17 17:42:01 -05:00
Preetha Appan 93eb048b87
QEMU driver plugin 2018-10-17 11:43:15 -05:00