Commit Graph

7814 Commits

Author SHA1 Message Date
Alex Dadgar
3cd8d50bbc Multiple matched objects now treated as an error condition. 2017-07-20 17:31:07 -07:00
Alex Dadgar
d104ccce6b Blue/green and canary docs 2017-07-19 15:56:41 -07:00
Alex Dadgar
635395a479 Job promote command 2017-07-19 15:39:32 -07:00
Alex Dadgar
0a1ab6ce9c Inspect job at a particular version 2017-07-19 13:44:30 -07:00
Alex Dadgar
bdb71e7074 Small fixes and UX changes 2017-07-19 13:34:24 -07:00
Alex Dadgar
dedb9127a3 Merge pull request #2866 from hashicorp/f-autocomplete-agent
Agent command autocompletes to hcl/json files
2017-07-19 13:18:32 -07:00
Michael Schurter
0c27ad58e5 Merge pull request #2861 from hashicorp/f-update-raft-serf
Update vendored raft and serf
2017-07-19 12:33:00 -07:00
Michael Schurter
caf451a170 Missing hashicorp/serf/serf dep 2017-07-19 11:53:53 -07:00
Michael Schurter
f91274c163 Update raft to hashicorp/raft@b3d48f1
Pulls in hashicorp/raft#225
2017-07-19 11:53:53 -07:00
Michael Schurter
64f4e06f7d Update serf to hashicorp/serf@bbeddf0 2017-07-19 11:53:53 -07:00
Michael Schurter
6c3a739031 Too lazy to remember the right formatter for floats 2017-07-19 11:53:18 -07:00
Alex Dadgar
8a371e0bd4 Fix predictor 2017-07-19 11:51:01 -07:00
Alex Dadgar
3127ce320c Agent command autocompletes to hcl/json files 2017-07-19 11:28:16 -07:00
Alex Dadgar
2426650286 Merge pull request #2862 from hashicorp/b-reconcile-panic
Fix update limit calculation to avoid panic
2017-07-19 11:19:09 -07:00
Alex Dadgar
d507d5bf20 Fix update limit calculation to avoid panic
This PR fixes the rolling update limit calculation to avoid a panic when
there are more allocations for a deployment that haven't determined
their health than the max_parallel count of the task group.

Fixes https://github.com/hashicorp/nomad/issues/2820
2017-07-19 11:11:47 -07:00
Alex Dadgar
f8709270e3 Merge pull request #2841 from hashicorp/b-rolling-no-fit
Treat destructive updates atomically
2017-07-19 11:11:25 -07:00
Michael Schurter
6679c052b5 Merge pull request #2858 from hashicorp/b-2849-deploy-json
Implement -json for job deployments
2017-07-19 10:15:01 -07:00
Alex Dadgar
5dd3f3fa6d Changelog 2017-07-19 10:09:11 -07:00
Alex Dadgar
62a9abcc7d Merge pull request #2859 from hashicorp/f-heartbeat-tunables
Allow tuning of heartbeat ttls
2017-07-19 10:07:36 -07:00
Michael Schurter
b124a92bc8 Error -> Errof 2017-07-19 10:00:57 -07:00
Alex Dadgar
bb45b95bc4 Allow tuning of heartbeat ttls
This PR allows tuning of heartbeat TTLs. An example of very aggressive
settings is as follows:

```
server {
  heartbeat_grace = "1s"
  min_heartbeat_ttl = "1s"
  max_heartbeats_per_second = 200.0
}
```
2017-07-19 09:38:35 -07:00
Alex Dadgar
cc9bfe0fd2 Changelog 2017-07-18 18:02:42 -07:00
Alex Dadgar
9bd63fd873 Merge pull request #2856 from hashicorp/b-port-range
Shrink dynamic port range
2017-07-18 18:01:19 -07:00
Michael Schurter
6dac431a89 Implement -json for job deployments
Fixes #2849
2017-07-18 17:28:44 -07:00
Michael Schurter
dc0fc82cc9 Merge pull request #2854 from hashicorp/b-2827-agent-services
Never remove unknown agent services
2017-07-18 14:48:36 -07:00
Michael Schurter
d51f4e4614 Merge pull request #2857 from hashicorp/b-retry-send
Use broadcast send retry logic everywhere
2017-07-18 14:39:04 -07:00
Michael Schurter
9150135b50 Use broadcast send retry logic everywhere 2017-07-18 14:36:32 -07:00
Alex Dadgar
4f376d08ed Merge pull request #2853 from hashicorp/b-watcher
Improve alloc health watcher
2017-07-18 14:12:28 -07:00
Alex Dadgar
e97f829206 Merge pull request #2855 from hashicorp/f-autocomplete-files
Autocomplete files
2017-07-18 14:10:36 -07:00
Michael Schurter
2a44ecfd53 Merge pull request #2852 from hashicorp/b-gc-race
Fix deadlock caused by syncing during destroy
2017-07-18 14:07:57 -07:00
Alex Dadgar
24236e6309 docs 2017-07-18 14:07:28 -07:00
Alex Dadgar
8a2c655403 Shrink dynamic port range
This PR shrinks the dynamic port range to not overlap with most
operating systems ephemeral port range: https://en.wikipedia.org/wiki/Ephemeral_port
2017-07-18 13:47:53 -07:00
Michael Schurter
a83d6f996e Never remove unknown agent services
Fixes #2827

This is a tradeoff. The pro is that you can run separate client and
server agents on the same node and advertise both. The con is that if a
Nomad agent crashes and isn't restarted on that node in the same mode
its entry will not be cleaned up.

That con scenario seems far less likely to occur than the scenario on
the pro side, and even if we do leak an agent entry the checks will be
failing so nothing should attempt to use it.
2017-07-18 13:23:01 -07:00
Alex Dadgar
24912517ac Autocomplete files
This PR makes run, validate and plan autocomplete their arg to
appropriate files.
2017-07-18 13:18:17 -07:00
Alex Dadgar
e3a6b5bb69 fix blocking queries in deployment watcher 2017-07-18 13:02:40 -07:00
Alex Dadgar
459ddf63ec Save deployment status 2017-07-18 12:37:52 -07:00
Alex Dadgar
386557da73 Small fixes 2017-07-18 12:19:57 -07:00
Michael Schurter
970fac0a02 Merge pull request #2836 from hashicorp/f-go-getter-xz-support
Update go-getter to get .xz support
2017-07-18 11:26:13 -07:00
Michael Schurter
8c4b760803 Fix deadlock caused by syncing during destroy
When replacing an alloc the new alloc is blocked until the old alloc is
destroyed. This could cause a deadlock:

1. Destroying the old alloc includes a final sync of its status
2. Syncing status causes a GC
3. A GC looks for terminal allocs to cleanup
4. The GC waits for an alloc to stop completely before GC'ing

If the GC chooses the currently-being-destroyed-alloc to GC, the GC
deadlocks. If `client.max_parallel` deadlocks happen the GC is wedged
until the Nomad process is restarted.

Performing the final sync asynchronously is an ugly hack but prevents
the deadlock by allowing the final sync to occur after the alloc runner
has shutdown and been destroyed.
2017-07-18 11:12:56 -07:00
Michael Schurter
ed4d265346 Merge pull request #2838 from hashicorp/b-alloc-dir-fixes
Ensure allocDir is never nil and persisted safely
2017-07-18 10:19:50 -07:00
Michael Schurter
4967eb2dc7 Mention tls_skip_verify support 2017-07-18 09:15:57 -07:00
Alex Dadgar
96206f08b2 Changelog 2017-07-17 18:27:53 -07:00
Alex Dadgar
5b07d7f083 Merge pull request #2848 from hashicorp/f-autocomplete
Add command autocompletion.
2017-07-17 18:27:04 -07:00
Alex Dadgar
698c964c88 Fix deep copy of driver config 2017-07-17 17:53:21 -07:00
Alex Dadgar
83fb59969d Stop before trying to place 2017-07-17 17:18:12 -07:00
Michael Schurter
b0eae2f002 Test AllocDir.Copy 2017-07-17 15:46:54 -07:00
Michael Schurter
dc5ea4acb9 Add AllocRunner.allocID for ease-of-use
Since the AllocRunner.alloc struct can be mutated, most of AllocRunner
needs to acquire a lock to get the alloc's ID. Log lines always need to
include the alloc ID, so we often skipped acquiring a lock just to grab
the ID and accepted the race.

Let's make the race detector a little happier by storing the ID in a
single assignment field.
2017-07-17 15:46:54 -07:00
Michael Schurter
802a99749c Fix log level 2017-07-17 15:46:54 -07:00
Michael Schurter
427a0ae1db Don't fail if task dirs don't exist on creation
Task dir metadata is created in AllocRunner.Run which may not run before
an alloc is sync'd and Nomad exits. There's no reason not to just create
task dir metadata on restore if it doesn't exist.
2017-07-17 15:46:54 -07:00
Michael Schurter
12d9e91f65 Ensure allocDir is never nil and persisted safely
Fixes #2834
2017-07-17 15:46:54 -07:00