open-nomad/api
Mahmood Ali f72e599ee7 Populate alloc stats API with device stats
This change makes few compromises:

* Looks up the devices associated with tasks at look up time.  Given
that `nomad alloc status` is called rarely generally (compared to stats
telemetry and general job reporting), it seems fine.  However, the
lookup overhead grows bounded by number of `tasks x total-host-devices`,
which can be significant.

* `client.Client` performs the task devices->statistics lookup.  It
passes self to alloc/task runners so they can look up the device statistics
allocated to them.
  * Currently alloc/task runners are responsible for constructing the
entire RPC response for stats
  * The alternatives for making task runners device statistics aware
don't seem appealing (e.g. having task runners contain reference to hostStats)

* On the alloc aggregation resource usage, I did a naive merging of task device statistics.
  * Personally, I question the value of such aggregation, compared to
costs of struct duplication and bloating the response - but opted to be
consistent in the API.
  * With naive concatination, device instances from a single device group used by separate tasks in the alloc, would be aggregated in two separate device group statistics.
2018-11-16 10:26:32 -05:00
..
contexts sync 2017-10-13 14:36:02 -07:00
acl.go Self token lookup 2017-10-13 13:12:20 -07:00
acl_test.go Self token lookup 2017-10-13 13:12:20 -07:00
agent.go spelling: unmarshal 2018-03-11 19:07:44 +00:00
agent_test.go non-Existent -> nonexistent 2018-03-12 11:59:33 -07:00
allocations.go Show preemption output in plan CLI 2018-11-08 09:48:43 -06:00
allocations_test.go Add DesiredTransition.ShouldMigrate to api pkg 2018-03-21 16:51:45 -07:00
api.go spelling: configurations 2018-03-11 17:47:24 +00:00
api_test.go Enhance API pkg to utilize Server's Client Tunnel 2018-02-15 13:59:03 -08:00
compose_test.go Parsing and API layer for spread stanza 2018-09-04 16:10:11 -05:00
constraint.go
constraint_test.go Parallel 2017-07-21 16:33:04 -07:00
deployments.go code review fixes 2018-05-31 10:57:08 -07:00
evaluations.go Rename DelayCeiling to MaxDelay 2018-03-14 16:10:32 -05:00
evaluations_test.go non-Existent -> nonexistent 2018-03-12 11:59:33 -07:00
fs.go api: never return EOF from Logs error chan 2018-05-02 10:46:16 -07:00
fs_test.go framer: fix early exit/truncation in framer 2018-05-02 10:46:16 -07:00
jobs.go more minor review feedback 2018-11-01 17:05:17 -05:00
jobs_test.go Parsing and API layer for spread stanza 2018-09-04 16:10:11 -05:00
jobs_testing.go Remove structs import from api 2017-09-29 10:36:08 -07:00
namespace.go sync 2017-10-13 14:36:02 -07:00
namespace_test.go sync 2017-09-19 10:08:23 -05:00
nodes.go device stats summary in node status 2018-11-14 22:13:23 -05:00
nodes_test.go device stats summary in node status 2018-11-14 22:13:23 -05:00
operator.go change path to v1/scheduler/configuration 2018-11-12 15:57:45 -06:00
operator_autopilot.go Fix make check errors 2018-09-04 16:03:52 -07:00
operator_autopilot_test.go Remove fake advertise address and fix TestAPI_OperatorAutopilotServerHealth 2018-03-19 15:49:12 -07:00
operator_test.go Use response object/querymeta/writemeta in scheduler config API 2018-11-10 10:31:10 -06:00
quota.go sync 2017-10-13 14:36:02 -07:00
quota_test.go sync 2017-10-13 14:36:02 -07:00
raw.go
regions.go fix a copy/paste error on api.Regions() comment 2017-01-17 22:48:01 -08:00
regions_test.go Parallel 2017-07-21 16:33:04 -07:00
resources.go Add NodeResource Device types in api package 2018-11-14 14:42:36 -05:00
search.go Search respects QueryOptions and returns QueryMeta 2017-08-27 22:17:51 -07:00
search_test.go Add new reschedule options to API layer and unit tests 2018-03-14 16:10:32 -05:00
sentinel.go sync 2017-09-19 10:08:23 -05:00
sentinel_test.go sync 2017-09-19 10:08:23 -05:00
status.go
status_test.go Parallel 2017-07-21 16:33:04 -07:00
system.go Add missing ReconcileSummaries API method 2017-08-24 11:55:10 +02:00
system_test.go Parallel 2017-07-21 16:33:04 -07:00
tasks.go Populate alloc stats API with device stats 2018-11-16 10:26:32 -05:00
tasks_test.go Parsing and API layer for spread stanza 2018-09-04 16:10:11 -05:00
util_test.go test: index no longer guaranteed on job list 2018-03-21 16:55:22 -07:00