Commit Graph

14885 Commits

Author SHA1 Message Date
Michael Schurter
3c19af4bfd client: expose allocated memory per task
Related to #4280

This PR adds
`client.allocs.<job>.<group>.<alloc>.<task>.memory.allocated` as a gauge
in bytes to metrics to ease calculating how close a task is to OOMing.

```
'nomad.client.allocs.memory.allocated.example.cache.6d98cbaf-d6bc-2a84-c63f-bfff8905a9d8.redis.rusty': 268435456.000
'nomad.client.allocs.memory.cache.example.cache.6d98cbaf-d6bc-2a84-c63f-bfff8905a9d8.redis.rusty': 5677056.000
'nomad.client.allocs.memory.kernel_max_usage.example.cache.6d98cbaf-d6bc-2a84-c63f-bfff8905a9d8.redis.rusty': 0.000
'nomad.client.allocs.memory.kernel_usage.example.cache.6d98cbaf-d6bc-2a84-c63f-bfff8905a9d8.redis.rusty': 0.000
'nomad.client.allocs.memory.max_usage.example.cache.6d98cbaf-d6bc-2a84-c63f-bfff8905a9d8.redis.rusty': 8908800.000
'nomad.client.allocs.memory.rss.example.cache.6d98cbaf-d6bc-2a84-c63f-bfff8905a9d8.redis.rusty': 876544.000
'nomad.client.allocs.memory.swap.example.cache.6d98cbaf-d6bc-2a84-c63f-bfff8905a9d8.redis.rusty': 0.000
'nomad.client.allocs.memory.usage.example.cache.6d98cbaf-d6bc-2a84-c63f-bfff8905a9d8.redis.rusty': 8208384.000
```
2019-05-10 11:12:12 -07:00
Charlie Voiselle
85a60d284c Merge pull request #5683 from hashicorp/docs-describe-sched-restart
Added Sparrow link
2019-05-10 11:25:27 -04:00
Danielle
1dd63883a5 stalebot: Add 'thinking' as an exempt label (#5684) 2019-05-10 11:00:35 -04:00
Danielle
291b306581 Merge pull request #5375 from hashicorp/dani/stale-issues
Setup probot/stale
2019-05-10 16:53:05 +02:00
Charlie Voiselle
40742affae Added Sparrow link 2019-05-10 10:35:21 -04:00
Charlie Voiselle
bab982484e Added info about scheduler fail and success cases (#5675)
* Added info about scheduler fail and success cases

* fix "and and"; copypasta

* Moving links to bottom for consistency

* Adopted @schmichael wording
2019-05-10 10:26:43 -04:00
Mahmood Ali
197114c017 Merge pull request #5682 from hashicorp/b-fix-website-links-20180510
Fix website links
2019-05-10 10:08:27 -04:00
Mahmood Ali
13474bca4d update links to use new canonical location 2019-05-10 09:41:19 -04:00
Mahmood Ali
11d25fdbca Add redirects for restructing done in GH-5667
https://github.com/hashicorp/nomad/pull/5667 restructured lots of
guides; this adds redirects to ensure that old links work.
2019-05-10 09:41:18 -04:00
Danielle
2530103a47 Merge pull request #5677 from jweissig/patch-8
doc: wording
2019-05-10 12:16:33 +02:00
Justin Weissig
915b78309a doc: wording
Fixed wording: "as show below" -> "as shown below".
2019-05-10 00:12:55 -07:00
Mahmood Ali
5abbee5d39 Merge pull request #5632 from hashicorp/f-nomad-exec-parts-01-base
nomad exec part 1: plumbing and docker driver
2019-05-09 18:09:27 -04:00
Mahmood Ali
980e4f5866 add e2e tests for nomad exec 2019-05-09 16:49:08 -04:00
Mahmood Ali
6168cc59be add api support for nomad exec
Adds nomad exec support in our API, by hitting the websocket endpoint.

We introduce API structs that correspond to the drivers streaming exec structs.

For creating the websocket connection, we reuse the transport setting from api
http client.
2019-05-09 16:49:08 -04:00
Mahmood Ali
67160a6302 drivers/docker: implement streaming exec 2019-05-09 16:49:08 -04:00
Mahmood Ali
3a77502cae Add basic drivers conformance tests
Add consolidated testing package to serve as conformance tests for all drivers.
2019-05-09 16:49:08 -04:00
Mahmood Ali
f908d6bcf5 vendor github.com/gorilla/websocket 2019-05-09 16:49:08 -04:00
Mahmood Ali
bfb4f0ca2d agent: add websocket handler for nomad exec
This adds a websocket endpoint for handling `nomad exec`.

The endpoint is a websocket interface, as we require a bi-directional
streaming (to handle both input and output), which is not very appropriate for
plain HTTP 1.0. Using websocket makes implementing the web ui a bit simpler. I
considered using golang http hijack capability to treat http request as a plain
connection, but the web interface would be too complicated potentially.

Furthermore, the API endpoint operates against the raw core nomad exec streaming
datastructures, defined in protobuf, with json serializer.  Our APIs use json
interfaces in general, and protobuf generates json friendly golang structs.
Reusing the structs here simplify interface and reduce conversion overhead.
2019-05-09 16:49:08 -04:00
Mahmood Ali
a77a3ba9b0 server: server forwarding logic for nomad exec endpoint 2019-05-09 16:49:08 -04:00
Mahmood Ali
979a6a1778 implement client endpoint of nomad exec
Add a client streaming RPC endpoint for processing nomad exec tasks, by invoking
the relevant task handler for execution.
2019-05-09 16:49:08 -04:00
Mahmood Ali
cb4ad3fb45 drivers/mock: implement nomad exec interface 2019-05-09 16:49:08 -04:00
Mahmood Ali
94ed649489 implemment streaming exec handling in driver grpc handlers
Also add a helper that converts the adapts the high level interface to the
low-level interface of nomad exec interfaces.
2019-05-09 16:49:08 -04:00
Yishan Lin
ac76fc2fdf Merge pull request #5667 from hashicorp/yishan/revised-nomadproject-structure
Revised NomadProject Structure
2019-05-09 13:03:50 -07:00
Charlie Voiselle
764b80eca0 Adopted @schmichael wording 2019-05-09 16:01:25 -04:00
Yishan Lin
eddf8a247e Merge branch 'master' into yishan/revised-nomadproject-structure 2019-05-09 12:59:53 -07:00
Charlie Voiselle
16874f337a Moving links to bottom for consistency 2019-05-09 15:38:43 -04:00
Charlie Voiselle
16a58e65f9 fix "and and"; copypasta 2019-05-09 15:03:51 -04:00
Charlie Voiselle
72d6bb9f8d Added info about scheduler fail and success cases 2019-05-09 14:53:45 -04:00
Mahmood Ali
2fd32a2f31 Merge pull request #5660 from hashicorp/b-remove-EmitNodeEventsResponse-index
remove Index field from EmitNodeEventsResponse
2019-05-09 14:12:29 -04:00
Yishan Lin
cbfc68ee1c Changed from "Container Management" to "Container Orchestration"
Removed Terraform mention in integrations without existing guide.
2019-05-09 10:14:01 -07:00
Danielle Lancashire
0bfe80e3b6 changelog: Add missing entry for nomad alloc signal 2019-05-09 15:46:32 +02:00
Chris Baker
875597729a copied consts used by jobspec parsing from structs into api package, to avoid referencing structs package in jobspec (#5663) 2019-05-09 08:23:49 -04:00
Danielle Lancashire
4ddb4bbcae changelog: Add changelog entries for consul improvements 2019-05-09 13:29:11 +02:00
Danielle
62274e9452 Merge pull request #5536 from hashicorp/dani/consul
Consul Catalog Integration Fixes
2019-05-09 13:22:54 +02:00
Danielle Lancashire
3d3b2ca239 consul: Document example check id 2019-05-09 13:22:22 +02:00
Mahmood Ali
7ba2378a15 Merge pull request #5666 from hashicorp/docs-querystring
docs: Change querystring -> query string
2019-05-08 19:49:36 -04:00
Yishan Lin
55abc0f403 Revised NomadProject Structure
- Revised "What is Nomad" copy
- Added "Key Features" section with links to task drivers & device plugins with lift-and-shift from README
- Added "Who Uses Nomad" section with users, talks, blog posts
- Removed Hadoop YARN, Docker Swarm, HTCondor from comparisons
- Revamped Guides section
- Inserted "Installing Nomad", "Upgrading", "Integrations" as persistent in Guides navbar
- Split Installing Nomad into two paths for users (one for Sandbox with "Quickstart", one for Production)
- Surfaced "Upgrading" and "Integrations" section from documentation
- Changed "Job Lifecycle" section into "Deploying & Managing Applications"
- Reworked "Operations" into "Operating Nomad"
- Reworked "Security" into "Securing Nomad"
- Segmented Namespaces, Resource Quotas, Sentinel into "Governance & Policy" subsection
- Reworked "Spark integration" into its own "Analytical Workloads" section
2019-05-08 14:40:38 -07:00
Charlie Voiselle
a910f1ded9 querystring -> query string 2019-05-08 15:14:31 -04:00
Preetha Appan
8932ccd62f update changelog for heartbeat fix 2019-05-08 13:38:29 -05:00
Preetha
eb7a3bc616 Merge pull request #5654 from hashicorp/b-hearbeat-lockfix
Remove unnecessary locking and serverlist syncing in heartbeats
2019-05-08 13:36:39 -05:00
Charlie Voiselle
0f8ed68b6b Typo fixes (#5661)
* Typo fixes
* it's -> its
* plugable -> pluggable
2019-05-08 12:54:44 -04:00
Preetha Appan
5bfa35ab81 fix typo and add one more test scenario 2019-05-08 10:54:22 -05:00
Mahmood Ali
50b784c1d6 update changelog For GH-5587 and GH-5629 2019-05-08 09:49:04 -04:00
Mahmood Ali
0848d022ed reorder CHANGELOG 2019-05-08 09:32:48 -04:00
Mahmood Ali
ec07a6717e remove Index field from EmitNodeEventsResponse
`Index` is already included as part of `WriteMeta` embedding.

This is a backward compatible change: Clients never read the field; and
Server refernces to `EmitNodeEventsResponse.Index` would be using the
value in `WriteMeta`, which is consistent with other response structs.
2019-05-08 08:42:26 -04:00
Preetha Appan
12e1804733 code review feedback 2019-05-07 16:23:32 -05:00
Chris Baker
855caf7232 update changelog to reflect metrics fix 2019-05-07 19:58:41 +00:00
Chris Baker
4b54e27841 stale allocation data leads to incorrect (and even negative) metrics (#5637)
* client: was not using up-to-date client state in determining which alloc count towards allocated resources

* Update client/client.go

Co-Authored-By: cgbaker <cgbaker@hashicorp.com>
2019-05-07 15:54:36 -04:00
Preetha
059d061c36 Fixed links in changelog 2019-05-07 14:24:18 -05:00
Michael Schurter
7b9e80a99f Merge pull request #5655 from hashicorp/docs-restarts
docs: fix default restart values
2019-05-07 10:43:53 -07:00