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
Mahmood Ali
93e8fc53f9
device stats summary in `node status`
...
Sample output with a mock device:
```
Host Resource Utilization
CPU Memory Disk
2651/26400 MHz 9.6 GiB/16 GiB 98 GiB/234 GiB
Device Resource Utilization
nomad/file/mock[README.md] 511 bytes
nomad/file/mock[e2e.go] 239 bytes
nomad/file/mock[e2e_test.go] 128 bytes
Allocations
No allocations placed
```
2018-11-14 22:13:23 -05:00
Mahmood Ali
7d3e34fab5
Add NodeResource Device types in `api` package
2018-11-14 14:42:36 -05:00
Mahmood Ali
63acda956c
Add Client Device Stats structs in `api` package
2018-11-14 14:41:19 -05:00
Preetha Appan
fd0ba320da
change path to v1/scheduler/configuration
2018-11-12 15:57:45 -06:00
Preetha Appan
75662b50d1
Use response object/querymeta/writemeta in scheduler config API
2018-11-10 10:31:10 -06:00
Preetha Appan
5f0a9d2cfd
Show preemption output in plan CLI
2018-11-08 09:48:43 -06:00
Preetha Appan
57fe5050f0
more minor review feedback
2018-11-01 17:05:17 -05:00
Preetha Appan
8f7eb61823
Introduce a response object for scheduler configuration
2018-10-30 11:06:32 -05:00
Preetha Appan
1415032c13
More review comments
2018-10-30 11:06:32 -05:00
Preetha Appan
c1c1c230e4
Make preemption config a struct to allow for enabling based on scheduler type
2018-10-30 11:06:32 -05:00
Preetha Appan
bd34cbb1f7
Support for new scheduler config API, first use case is to disable preemption
2018-10-30 11:06:32 -05:00
Preetha Appan
9257387a69
Add number of evictions to DesiredUpdates struct to use in CLI/API
2018-10-30 11:06:32 -05:00
Preetha Appan
5b3bfb63eb
structs and API changes to plan and alloc structs needed for preemption
2018-10-30 11:06:32 -05:00
Alex Dadgar
c176a83388
rename api TotalShares -> CpuShares
2018-10-16 17:25:55 -07:00
Alex Dadgar
a78cefec18
use int64
2018-10-16 15:34:32 -07:00
Preetha Appan
7c0d8c646c
Change CPU/Disk/MemoryMB to int everywhere in new resource structs
2018-10-16 16:21:42 -05:00
Alex Dadgar
5a07f9f96e
parse affinities and constraints on devices
2018-10-11 14:05:19 -07:00
Alex Dadgar
87cacb427f
parse devices
2018-10-08 16:09:41 -07:00
Alex Dadgar
6b08b9d6b6
Define device request structs
2018-10-08 15:38:03 -07:00
Alex Dadgar
bac5cb1e8b
Scheduler uses allocated resources
2018-10-02 17:08:25 -07:00
Alex Dadgar
5c8697667e
Node reserved resources
2018-09-29 18:44:55 -07:00
Alex Dadgar
3183153315
Node resources on client
2018-09-29 17:23:41 -07:00
Alex Dadgar
cc92cd92cd
Merge pull request #4642 from hashicorp/b-vet
...
Fix vet errors and use newer go version in travis
2018-09-04 17:04:02 -07:00
Alex Dadgar
c6576ddac1
Fix make check errors
2018-09-04 16:03:52 -07:00
Preetha Appan
751c0eb5a5
code review feedback
2018-09-04 16:10:11 -05:00
Preetha Appan
9bc0962527
Track top k nodes by norm score rather than top k nodes per scorer
2018-09-04 16:10:11 -05:00
Preetha Appan
6ed527c636
Use heap to store top K scoring nodes.
...
Scoring metadata is now aggregated by scorer type to make it easier
to parse when reading it in the CLI.
2018-09-04 16:10:11 -05:00
Preetha Appan
659cfa3f64
Parsing and API layer for spread stanza
2018-09-04 16:10:11 -05:00
Preetha Appan
1c0b123777
Fix test
2018-09-04 16:10:11 -05:00
Preetha Appan
c407e3626f
More review comments
2018-09-04 16:10:11 -05:00
Preetha Appan
4b3b618e4a
Remove unused field
2018-09-04 16:10:11 -05:00
Preetha Appan
9f0caa9c3d
Affinity parsing, api and structs
2018-09-04 16:10:11 -05:00
Nick Ethier
41e010cdc2
nomad: add 'Dispatch' field to Job
...
New -bash: Dispatch: command not found field is used to denote if the Job is a child dispatched job of
a parameterized job.
2018-06-11 11:59:03 -04:00
Alex Dadgar
72effb8632
code review
2018-06-06 14:52:26 -07:00
Alex Dadgar
f4fccd7ed2
Monitoring non-draining node exits
2018-06-05 17:58:44 -07:00
Alex Dadgar
7f25fcc1bd
Merge pull request #4354 from hashicorp/b-job-modify
...
Deployment adds JobSpecModifyIndex
2018-05-31 17:57:38 +00:00
Alex Dadgar
f2b2e0482b
code review fixes
2018-05-31 10:57:08 -07:00
Preetha Appan
4f835790d7
Set node eligibility to true when old client calls disable
2018-05-30 16:54:07 -05:00
Alex Dadgar
195e19827b
Deployment adds JobSpecModifyIndex
...
Deployment tracks the Job.JobModifyIndex so that PUTS against /v1/jobs
can be more easily coorelated with the created deployment.
Fixes https://github.com/hashicorp/nomad/issues/4301
2018-05-30 11:33:56 -07:00
Nick Ethier
4b64db3a0f
api: emit different monitor message if node's drain strategy is never set
2018-05-24 06:39:09 -04:00
Preetha
159888a856
Merge pull request #4274 from hashicorp/f-force-rescheduling
...
Add CLI and API support for forcing rescheduling of failed allocs
2018-05-21 16:24:22 -07:00
Preetha Appan
4a400f045b
Fix docs and method documentation in API
2018-05-21 17:20:59 -05:00
Preetha Appan
3a8040e36f
Add new method EvaluateWithOptions to avoid breaking go API client
2018-05-11 14:18:53 -05:00
Preetha Appan
b12df3c64b
Added CLI for evaluating job given ID, and modified client API for evaluate to take a request payload
2018-05-09 15:04:27 -05:00
Chelsea Holland Komlo
d51611040f
Add driver health information to node list stub
2018-05-09 11:21:54 -04:00
Alex Dadgar
f4af30fbb5
Canary tags structs
2018-05-07 14:50:01 -05:00
Alex Dadgar
f95ab4ade8
Mark canaries on creation, and unmark on promotion
2018-05-07 14:50:01 -05:00
Alex Dadgar
224b3092ae
change default to 10m and docs
2018-05-07 14:50:01 -05:00
Alex Dadgar
8a81038cdb
Set Reschedule from deployment watcher
2018-05-07 14:50:01 -05:00