Commit Graph

14939 Commits

Author SHA1 Message Date
Mahmood Ali
c1c9d9b07d fix typo 2019-05-15 13:01:05 -04:00
Mahmood Ali
72b2fb1946 Merge pull request #5633 from hashicorp/f-nomad-exec-parts-02-cli
nomad exec part 2: CLI
2019-05-15 12:50:42 -04:00
Mahmood Ali
d675d28ff3 Handle Terminal Output state in Windows 2019-05-15 10:37:37 -04:00
Mahmood Ali
8bbc78a48a Add clarifying comments for negating -i or -t 2019-05-15 10:35:12 -04:00
Nick Ethier
c49ec0a964 Add jrasell/sherpa to resource page and remove Replicator. (#5700)
Add jrasell/sherpa to resource page and remove Replicator.
2019-05-14 22:25:13 -04:00
Mahmood Ali
8841da4f0b Merge pull request #5707 from hashicorp/b-more-redirects-20190514
More website redirects
2019-05-14 17:56:16 -04:00
Mahmood Ali
18c63d4c3f Make spark.html the index 2019-05-14 17:30:08 -04:00
Michael Schurter
5b65afb29c Merge pull request #5669 from hashicorp/b-block-on-servers-4
client: do not restart restored tasks until server is contacted
2019-05-14 14:27:01 -07:00
Mahmood Ali
84193504bc More redirects for website
I expected redirects to handle directory rewrites without needing to
specify every file.
2019-05-14 17:24:53 -04:00
Yishan Lin
da6039bc84 Correct Spark links in redirects.txt 2019-05-14 17:24:48 -04:00
Michael Schurter
abd809d60a docs: changelog entry for #5669 and fix comment 2019-05-14 10:54:00 -07:00
Michael Schurter
796c05b9b8 client: register before restoring
Registration and restoring allocs don't share state or depend on each
other in any way (syncing allocs with servers is done outside of
registration).

Since restoring is synchronous, start the registration goroutine first.

For nodes with lots of allocs to restore or close to their heartbeat
deadline, this could be the difference between becoming "lost" or not.
2019-05-14 10:53:27 -07:00
Michael Schurter
6a2792ad90 client: do not restart dead tasks until server is contacted (try 2)
Refactoring of 104067bc2b2002a4e45ae7b667a476b89addc162

Switch the MarkLive method for a chan that is closed by the client.
Thanks to @notnoop for the idea!

The old approach called a method on most existing ARs and TRs on every
runAllocs call. The new approach does a once.Do call in runAllocs to
accomplish the same thing with less work. Able to remove the gate
abstraction that did much more than was needed.
2019-05-14 10:53:27 -07:00
Michael Schurter
4b854cc557 drivers/mock: implement InspectTask 2019-05-14 10:53:27 -07:00
Michael Schurter
e7042b674b client: do not restart dead tasks until server is contacted
Fixes #1795

Running restored allocations and pulling what allocations to run from
the server happen concurrently. This means that if a client is rebooted,
and has its allocations rescheduled, it may restart the dead allocations
before it contacts the server and determines they should be dead.

This commit makes tasks that fail to reattach on restore wait until the
server is contacted before restarting.
2019-05-14 10:53:27 -07:00
Michael Schurter
846b482814 e2e: fix nomad service for systemd<230 2019-05-14 10:53:26 -07:00
Yishan Lin
315beb6d9d Merge pull request #5703 from hashicorp/yishan/corrected-website-redirects
Fixed Spark links in redirects.txt.
2019-05-14 10:36:31 -07:00
Yishan Lin
330cf77c43 Update redirects.txt
Fixed Spark redirects post-website restructuring for the guides.
2019-05-14 08:56:13 -07:00
Michael Schurter
8deb6a96d9 Merge pull request #5695 from hashicorp/f-squelch-logline
client: log when server list changes
2019-05-14 08:38:05 -07:00
Michael Schurter
890f70a697 Merge pull request #4590 from hashicorp/d-fix-stagger
docs: fix description of update.stagger
2019-05-14 08:36:08 -07:00
Michael Schurter
640470cea4 Merge pull request #5693 from hashicorp/docs-task-config
docs: mention regression in task config validation
2019-05-14 07:50:39 -07:00
Michael Schurter
883fe5b358 Merge pull request #5657 from hashicorp/docs-plugin-link
docs: add lots of links to plugin guide
2019-05-14 07:50:09 -07:00
James Rasell
ae4495fb12 Add jrasell/sherpa to resource page and remove Replicator.
Adds jrasell/sherpa to the resources page under the Integrations
section.

Replicator is no longer being maintained or has been under active
development for well over a year. I have therefore removed this
from the resources page.
2019-05-14 13:13:11 +01:00
Yishan Lin
f6dfe5bf94 Added redirect for Spark guide link 2019-05-13 16:16:14 -07:00
Michael Schurter
bb809ea259 client: log when server list changes
Stop logging in the happy path when nothing has changed.
2019-05-13 15:42:55 -07:00
Michael Schurter
14244af3a4 docs: mention regression in task config validation 2019-05-13 14:08:46 -07:00
Michael Schurter
4e3468babd Merge pull request #5492 from hashicorp/f-allocated-mem
client: expose allocated memory per task
2019-05-13 13:31:22 -07:00
Jasmine Dahilig
fd5c3a8173 fix update to changelog 2019-05-13 13:14:01 -07:00
Jasmine Dahilig
772e8d6b94 update CHANGELOG with datacenter config validation https://github.com/hashicorp/nomad/pull/5665 2019-05-13 13:10:29 -07:00
Jasmine Dahilig
2d23f904cd Merge pull request #5665 from hashicorp/b-empty-datacenters
add non-empty string validation for datacenters
2019-05-13 10:23:26 -07:00
Mahmood Ali
12114354ab Merge pull request #5668 from hashicorp/flaky-test-20190430
fix flaky test by allowing for call invocation overhead
2019-05-13 12:33:44 -04:00
Lang Martin
a732cd1f06 Merge pull request #5642 from hashicorp/b-network-fingerprinting-ipv4
network fingerprinting multiple IPs on the configured network device
2019-05-13 11:46:53 -04:00
Mahmood Ali
166a5c7b29 Merge pull request #5690 from hashicorp/f-nomad-exec-part-04-rkt
implement nomad exec for rkt
2019-05-13 10:03:55 -04:00
Mahmood Ali
494642b11c typo: "atleast" -> "at least" 2019-05-13 10:01:19 -04:00
Mahmood Ali
bad77f1ece add CLI commands for nomad exec 2019-05-12 22:04:50 -04:00
Mahmood Ali
bfac34d9c5 implement nomad exec for rkt
Implement the streaming exec handler for the rkt driver
2019-05-12 18:59:00 -04:00
Danielle
9b6e5c1fd4 Merge pull request #5685 from jweissig/patch-9
docs: fixed typo
2019-05-11 21:00:47 +02:00
Justin Weissig
ffe06cb57f docs: fixed typo
Fixed typo: programatic/programmatic
2019-05-11 10:40:39 -07:00
Mahmood Ali
c25b247fa4 Merge pull request #5634 from hashicorp/f-nomad-exec-parts-03-executors
nomad exec part 3: executor based drivers
2019-05-10 21:24:23 -04:00
Mahmood Ali
7f76aedfae use pty/tty terminology similar to github.com/kr/pty 2019-05-10 19:17:14 -04:00
Mahmood Ali
f6a4b8810a vendor github.com/kr/pty 2019-05-10 19:17:14 -04:00
Mahmood Ali
74e5e20c0b drivers: implement streaming exec for executor based drivers
These simply delegate call to backend executor.
2019-05-10 19:17:14 -04:00
Mahmood Ali
976bfbc41a executors: implement streaming exec
Implements streamign exec handling in both executors (i.e. universal and
libcontainer).

For creation of TTY, some incidental complexity leaked in.  The universal
executor uses github.com/kr/pty for creation of TTYs.

On the other hand, libcontainer expects a console socket and for libcontainer to
create the underlying console object on process start.  The caller can then use
`libcontainer.utils.RecvFd()` to get tty master end.

I chose github.com/kr/pty for managing TTYs here.  I tried
`github.com/containerd/console` package (which is already imported), but the
package did not work as expected on macOS.
2019-05-10 19:17:14 -04:00
Mahmood Ali
efc4249f85 executor: scaffolding for executor grpc handling
Prepare executor to handle streaming exec API calls that reuse drivers protobuf
structs.
2019-05-10 19:17:14 -04:00
Mahmood Ali
152d6426aa Merge pull request #5674 from hashicorp/b-ui/flaky-client-detail-test
UI: Fixed flaky client-detail test
2019-05-10 18:51:00 -04:00
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
Lang Martin
c7071a12e3 client improve a comment in updateNetworks 2019-05-10 11:25:04 -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