Nick Ethier
39ca1b00dd
client/drivermananger: add driver manager
...
The driver manager is modeled after the device manager and is started by the client.
It's responsible for handling driver lifecycle and reattachment state, as well as
processing the incomming fingerprint and task events from each driver. The mananger
exposes a method for registering event handlers for task events that is used by the
task runner to update the server when a task has been updated with an event.
Since driver fingerprinting has been implemented by the driver manager, it is no
longer needed in the fingerprint mananger and has been removed.
2018-12-18 22:55:18 -05:00
Danielle Tomlinson
da48a7eab3
client: Move fingerprint structs to pkg
...
This removes a cyclical dependency when importing client/structs from
dependencies of the plugin_loader, specifically, drivers. Due to
client/config also depending on the plugin_loader.
It also better reflects the ownership of fingerprint structs, as they
are fairly internal to the fingerprint manager.
2018-12-01 17:10:39 +01:00
Preetha Appan
829bf74aa8
modify fingerprint interface to use typed attribute struct
2018-11-28 10:01:03 -06:00
Nick Ethier
3244a4cc57
plumb NomadConfig into plugins
2018-10-16 22:47:22 -04:00
Nick Ethier
19b222b127
client: log retry during driver fingerprint redispense
2018-10-16 16:56:56 -07:00
Nick Ethier
2e055fe18a
client: add test for driverfailure during fingerprinting
2018-10-16 16:56:56 -07:00
Nick Ethier
44cc52a0d4
client: simplify driver plugin logic from review comments
2018-10-16 16:56:56 -07:00
Nick Ethier
4f9522dd54
client: review comments and fixup/skip tests
2018-10-16 16:56:56 -07:00
Nick Ethier
d335a82859
client: begin driver plugin integration
...
client: fingerprint driver plugins
2018-10-16 16:56:56 -07:00
Alex Dadgar
9a2c2a4f68
client uses passed logger and fix fingerprinters
2018-10-16 16:53:30 -07:00
Michael Schurter
9da25adc54
client: hclog-ify most of the client
...
Leaving fingerprinters in case that interface changes with plugins.
2018-10-16 16:53:30 -07:00
Javier Palomo Almena
3e6c3437af
DriverContext: Add the TaskGroup and the Job name
...
Adding this fields to the DriverContext object, will allow us to pass
them to the drivers.
An use case for this, will be to emit tagged metrics in the drivers,
which contain all relevant information:
- Job
- TaskGroup
- Task
- ...
Ref: https://github.com/hashicorp/nomad/pull/4185
2018-04-23 00:15:29 +02:00
Alex Dadgar
741975657d
fix race node access
2018-04-16 15:45:51 -07:00
Alex Dadgar
e0171acbdd
Move where attribute for driver detection is set
2018-04-12 15:50:25 -07:00
Chelsea Holland Komlo
228a2319c2
delete driver name from only health check attributes
2018-04-12 18:24:41 -04:00
Alex Dadgar
f45b51a138
Driver health detection cleanups
...
This PR does:
1. Health message based on detection has format "Driver XXX detected"
and "Driver XXX not detected"
2. Set initial health description based on detection status and don't
wait for the first health check.
3. Combine updating attributes on the node, fingerprint and health
checking update for drivers into a single call back.
4. Condensed driver info in `node status` only shows detected drivers
and make the output less wide by removing spaces.
2018-04-12 12:46:40 -07:00
Chelsea Holland Komlo
a40750e596
update comment for when the fingerprinter setting health status
2018-04-10 16:53:00 -04:00
Chelsea Holland Komlo
46ec4633fe
fingerprinter should set health check status if health check is not periodic
2018-04-10 15:29:51 -04:00
Chelsea Holland Komlo
9eaa1e7c9e
add setters for access to the fingerprint manager's node
...
refactor extracting driver info
2018-04-10 15:29:51 -04:00
Chelsea Holland Komlo
49e12b1ad2
guard against overwriting health status
2018-04-10 15:29:51 -04:00
Chelsea Holland Komlo
d3f0d05ac8
immediately set healthy to false when driver moves to undetected
2018-04-10 15:29:51 -04:00
Chelsea Holland Komlo
af8fc4f62c
only run health check if driver moves from undetected to detected
2018-04-09 10:10:43 -04:00
Chelsea Holland Komlo
bf3b7d8588
ux improvments to driver health checks
2018-03-22 18:38:29 -04:00
Chelsea Holland Komlo
eb3a53efa2
always set initial health status for every driver
2018-03-21 15:15:26 -04:00
Chelsea Holland Komlo
127b2c6ef7
set driver to unhealthy once if it cannot be detected in periodic check
2018-03-21 15:15:26 -04:00
Alex Dadgar
ffe9292e24
Only run health check if driver is detected
2018-03-21 15:15:26 -04:00
Chelsea Holland Komlo
9c143301de
fix issue when updating node events
2018-03-21 15:15:26 -04:00
Chelsea Holland Komlo
cba0a4d441
function rename and re-arrange functions in fingerprint_manager
2018-03-21 15:15:26 -04:00
Chelsea Holland Komlo
06a306e460
improve comments; update watchDriver
2018-03-21 15:15:26 -04:00
Chelsea Holland Komlo
7b2ed01472
remove unused function
2018-03-21 15:15:26 -04:00
Chelsea Holland Komlo
8597da0c5d
simplify logic
...
bump log level
2018-03-21 15:15:26 -04:00
Chelsea Holland Komlo
8aefd294e1
Code review feedback
2018-03-21 15:15:26 -04:00
Alex Dadgar
3ad03d9498
notes from walk through
2018-03-21 15:15:26 -04:00
Chelsea Holland Komlo
8a0ed4e5ff
improve tests
2018-03-21 15:15:26 -04:00
Chelsea Holland Komlo
521fbd4f97
refresh driver information for non-health checking drivers periodically
2018-03-21 15:15:26 -04:00
Chelsea Holland Komlo
240fee4848
fix up codereview feedback
2018-03-21 15:15:26 -04:00
Chelsea Holland Komlo
865b7e0ace
fix up racy tests
2018-03-21 15:15:26 -04:00
Chelsea Holland Komlo
fd25db9e1d
updating comments; locking concurrent node access
2018-03-21 15:15:26 -04:00
Chelsea Holland Komlo
9ec5a93bc1
fix scheduler driver name; create node structs file
2018-03-21 15:15:25 -04:00
Chelsea Holland Komlo
1570972cb3
add concept of health checks to fingerprinters and nodes
...
fix up feedback from code review
add driver info for all drivers to node
2018-03-21 15:15:25 -04:00
Chelsea Holland Komlo
6b0dc49950
fingerprinters accessing node information should be thread safe
2018-02-26 15:25:54 -05:00
Chelsea Holland Komlo
12ee25d852
extract test helper
...
lock concurrent accesses to node
comment exported method
2018-02-12 18:30:10 -05:00
Chelsea Holland Komlo
1a26950114
code review feedback
2018-02-07 18:10:55 -05:00
Chelsea Holland Komlo
ca3b28c5c6
remove dependency on client for fingerprint manager
2018-02-07 18:10:45 -05:00
Chelsea Holland Komlo
cc1213a8bb
add fingerprint manager
2018-02-07 18:10:33 -05:00