Preetha Appan
f89dbcd9cc
modify fingerprint interface to use typed attribute struct
2018-11-28 10:01:03 -06:00
Mahmood Ali
6d34d2fade
Add Driver Plugin for LXC
2018-11-27 21:40:43 -05:00
Nick Ethier
ced5d5c445
docker: move recoverable error proto to shared structs
2018-11-19 22:59:16 -05:00
Nick Ethier
8f8698b3e1
docker: started work on porting docker driver to new plugin framework
2018-11-19 22:59:15 -05:00
Mahmood Ali
b74ccc742c
Expose Device Stats in /client/stats API endpoint
2018-11-14 14:41:19 -05:00
Mahmood Ali
c5de71a424
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
713c9fe683
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
1f4db08f42
Regenerate proto files with protoc-gen-go@v1.2.0
2018-11-14 09:01:26 -05: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
c4f9e22aeb
fix race
2018-11-07 12:22:07 -08:00
Alex Dadgar
f0c7a8159b
tests
2018-11-07 10:43:15 -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
Alex Dadgar
feb83a2be3
assign devices
2018-11-07 10:32:03 -08:00
Mahmood Ali
53543b3e32
register the java plugin
2018-11-06 12:41:39 -08:00
Mahmood Ali
a17521475d
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
9a45837c4e
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
2a38f575c0
rkt: fix race, register by default, fix fingerprint
2018-10-30 17:37:00 -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
Nick Ethier
bda3b1d3b3
rename NomadConfig to ClientAgentConfig
2018-10-29 21:34:34 -04:00
Nick Ethier
58b430edae
added driver specific client config struct to plugin configuration
2018-10-18 23:31:01 -04:00
Nick Ethier
cbf81d3564
test for setting NomadConfig in plugin loader
2018-10-16 22:47:26 -04:00
Nick Ethier
65adb80ebf
plumb NomadConfig into plugins
2018-10-16 22:47:22 -04:00
Michael Schurter
1a29337e48
register drivers by default
...
Do not register mock_driver on release builds.
2018-10-16 16:56:56 -07:00
Alex Dadgar
84ce8c3487
extra logging
2018-10-16 16:56:55 -07:00
Alex Dadgar
6f0ed6184b
Fix client reloading and pass the plugin loaders to server and client
2018-10-16 16:56:55 -07:00
Alex Dadgar
183561cf82
Plugin loader initialization
2018-10-16 16:54:12 -07:00
Alex Dadgar
cc76555814
Internal plugin catalog
2018-10-16 16:53:31 -07:00
Alex Dadgar
3e7008c2dc
Add BlockAttrs
2018-10-15 20:47:38 -07:00
Alex Dadgar
06719d0b5a
Merge pull request #4783 from hashicorp/f-device-scheduling
...
Device constraint checking
2018-10-15 15:31:32 -07:00
Alex Dadgar
b94505b256
Merge pull request #4780 from hashicorp/f-device-attributes
...
Device fingerprinting uses Attribute object
2018-10-15 13:37:49 -07:00
Alex Dadgar
4098d2e99c
fix typos
2018-10-15 13:15:58 -07:00
Alex Dadgar
7ecd65109a
Check constraints on devices
2018-10-14 13:35:47 -07:00
Alex Dadgar
f9b056e1d1
Replace attributes map with new Attribute object
2018-10-13 14:08:58 -07:00
Alex Dadgar
5fc9a95201
Use Attribute in device fingerprinting
2018-10-13 11:43:06 -07:00
Alex Dadgar
c31a234fb3
fmt -s
2018-10-12 15:34:21 -07:00
Alex Dadgar
cbb5f21112
New parser and comparison
2018-10-12 15:25:34 -07:00
Alex Dadgar
364180b396
Units defined and parsing
2018-10-11 23:30:28 -07:00
Alex Dadgar
ceb0fa8d13
fix documentation of reattach and use testlog
2018-09-18 10:48:37 -07:00
Alex Dadgar
8236478815
singleton wrapper
2018-09-18 10:08:46 -07:00
Alex Dadgar
ca28afa3b2
small fixes
2018-09-15 16:42:38 -07:00
Alex Dadgar
7552112a0d
review comments
2018-09-10 17:29:28 -07:00
Alex Dadgar
643b9e8ced
Plugin loader
2018-09-09 16:41:47 -07:00
Alex Dadgar
c6576ddac1
Fix make check errors
2018-09-04 16:03:52 -07:00
Alex Dadgar
2c2a8322b5
Fix device launcher ctx cleanup
2018-09-04 15:48:38 -07:00
Alex Dadgar
b7f3e24391
launcher readme
2018-08-28 15:00:48 -07:00
Alex Dadgar
e14fa23961
Add stats to launcher
2018-08-28 13:59:57 -07:00
Alex Dadgar
83ad5afb69
Example device plugin and helpers
...
This PR introduces:
* An example device plugin that exposes files as devices for testing.
* Helpers for serving a device plugin
* A launcher binary that allows interacting with a device plugin without
needing a Nomad client.
2018-08-28 13:59:57 -07:00
Alex Dadgar
c49beed26e
vet
2018-08-13 11:10:33 -07:00
Alex Dadgar
42b432d18d
block attr spec
2018-08-10 11:14:12 -07:00
Alex Dadgar
d6b291b00d
hcl interface to cty function
2018-08-10 10:51:23 -07:00