Commit Graph

18 Commits

Author SHA1 Message Date
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
Preetha Appan
829bf74aa8 modify fingerprint interface to use typed attribute struct 2018-11-28 10:01:03 -06:00
Nick Ethier
37ed75502e docker: move recoverable error proto to shared structs 2018-11-19 22:59:16 -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
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
Alex Dadgar
6fb074e0e8 Merge pull request #4783 from hashicorp/f-device-scheduling
Device constraint checking
2018-10-15 15:31:32 -07:00
Alex Dadgar
7b1753bd9a Merge pull request #4780 from hashicorp/f-device-attributes
Device fingerprinting uses Attribute object
2018-10-15 13:37:49 -07:00
Alex Dadgar
a7e40bb85b fix typos 2018-10-15 13:15:58 -07:00
Alex Dadgar
ef82a33329 Check constraints on devices 2018-10-14 13:35:47 -07:00
Alex Dadgar
41bd0da920 Replace attributes map with new Attribute object 2018-10-13 14:08:58 -07:00
Alex Dadgar
38a421a54b Use Attribute in device fingerprinting 2018-10-13 11:43:06 -07:00
Alex Dadgar
cb773f3dc1 fmt -s 2018-10-12 15:34:21 -07:00
Alex Dadgar
929eb5570a New parser and comparison 2018-10-12 15:25:34 -07:00
Alex Dadgar
f2e1cefda1 Units defined and parsing 2018-10-11 23:30:28 -07:00