Commit Graph

15327 Commits

Author SHA1 Message Date
Danielle
7968f799a5 Merge pull request #5864 from hashicorp/dani/win-pipe-cleaner
windows: Fix restarts using the raw_exec driver
2019-07-02 13:58:56 +02:00
Danielle Lancashire
c712fdcbd9 fifo: Safer access to Conn 2019-07-02 13:12:54 +02:00
Mahmood Ali
bd7d60ef93 Merge pull request #5890 from hashicorp/b-dont-start-completed-allocs-2
task runner to avoid running task if terminal
2019-07-02 15:31:17 +08:00
Mahmood Ali
009f186eb7 address review comments 2019-07-02 14:53:50 +08:00
Mahmood Ali
22960f821e Merge pull request #5906 from hashicorp/b-alloc-stale-updates
client: defensive against getting stale alloc updates
2019-07-02 12:40:17 +08:00
Preetha Appan
7fd36580bd changelog 2019-07-01 16:59:37 -05:00
Preetha
15df89bb06 Merge pull request #5907 from hashicorp/f-infer-contenttype
Infer content type in alloc fs stat endpoint
2019-07-01 16:54:32 -05:00
Preetha Appan
de8ae8bcd2 Improve test cases for detecting content type 2019-07-01 16:24:48 -05:00
Yishan Lin
21f07c25c9 Merge pull request #5804 from hashicorp/yishan/revised-enterprise-docs
Revised Nomad Enterprise page
2019-07-01 10:41:32 -07:00
Yishan Lin
5262102a94 Updated with suggestions. 2019-07-01 10:39:35 -07:00
Danielle Lancashire
8148466da6 fifo: Close connections and cleanup lock handling 2019-07-01 14:14:29 +02:00
Danielle Lancashire
2e5aba9188 logmon: Add windows compatibility test 2019-07-01 14:14:06 +02:00
Mahmood Ali
2e1978eb1f client: defensive against getting stale alloc updates
When fetching node alloc assignments, be defensive against a stale read before
killing local nodes allocs.

The bug is when both client and servers are restarting and the client requests
the node allocation for the node, it might get stale data as server hasn't
finished applying all the restored raft transaction to store.

Consequently, client would kill and destroy the alloc locally, just to fetch it
again moments later when server store is up to date.

The bug can be reproduced quite reliably with single node setup (configured with
persistence).  I suspect it's too edge-casey to occur in production cluster with
multiple servers, but we may need to examine leader failover scenarios more closely.

In this commit, we only remove and destroy allocs if the removal index is more
recent than the alloc index. This seems like a cheap resiliency fix we already
use for detecting alloc updates.

A more proper fix would be to ensure that a nomad server only serves
RPC calls when state store is fully restored or up to date in leadership
transition cases.
2019-06-29 04:17:35 -05:00
Preetha Appan
f7f41c42e6 Infer content type in alloc fs stat endpoint 2019-06-28 20:31:28 -05:00
Danielle Lancashire
aff554deec appveyor: Run logmon tests 2019-06-28 16:01:41 +02:00
Danielle Lancashire
e6daf3b5bd fifo: Require that fifos do not exist for create
Although this operation is safe on linux, it is not safe on Windows when
using the named pipe interface. To provide a ~reasonable common api
abstraction, here we switch to returning File exists errors on the unix
api.
2019-06-28 13:47:18 +02:00
Danielle Lancashire
76f72fe4bd vendor: Use dani fork of go-winio 2019-06-28 13:47:18 +02:00
Danielle Lancashire
efda81cbbb logmon: Refactor fifo access for windows safety
On unix platforms, it is safe to re-open fifo's for reading after the
first creation if the file is already a fifo, however this is not
possible on windows where this triggers a permissions error on the
socket path, as you cannot recreate it.

We can't transparently handle this in the CreateAndRead handle, because
the Access Is Denied error is too generic to reliably be an IO error.
Instead, we add an explict API for opening a reader to an existing FIFO,
and check to see if the fifo already exists inside the calling package
(e.g logmon)
2019-06-28 13:41:54 +02:00
Michael Lange
83fba96bd5 Merge pull request #5902 from hashicorp/b-ui/allocation-magnifying-glass
UI: Account for the search icon within the is-compact modifier
2019-06-27 14:37:14 -07:00
Michael Lange
35c45e61ca Account for the search icon within the is-compact modifer 2019-06-27 12:32:26 -07:00
Omar Khawaja
65fe89f1c2 make purge parameter lowercase (#5895) 2019-06-27 14:07:25 -04:00
Mahmood Ali
f3c944aaf5 task runner to avoid running task if terminal
This change fixes a bug where nomad would avoid running alloc tasks if
the alloc is client terminal but the server copy on the client isn't
marked as running.

Here, we fix the case by having task runner uses the
allocRunner.shouldRun() instead of only checking the server updated
alloc.

Here, we preserve much of the invariants such that `tr.Run()` is always
run, and don't change the overall alloc runner and task runner
lifecycles.

Fixes https://github.com/hashicorp/nomad/issues/5883
2019-06-27 11:27:34 +08:00
Danielle
520cd901d7 Merge pull request #5889 from hashicorp/dani/b-task-restart
tr: Fetch Wait channel before killTask in restart
2019-06-26 16:18:08 +02:00
Danielle Lancashire
079cfb437d tr: Fetch Wait channel before killTask in restart
Currently, if killTask results in the termination of a process before
calling WaitTask, Restart() will incorrectly return a TaskNotFound
error when using the raw_exec driver on Windows.
2019-06-26 15:20:57 +02:00
Nick Ethier
72b9b879e5 Merge pull request #5875 from sarcasticadmin/update-example-config
Update website example config
2019-06-24 08:15:14 -04:00
Robert James Hernandez
96662bae97 Update website example config 2019-06-23 10:41:48 -07:00
Buck Doyle
e6814c08af Add ember-qunit-nice-errors (#5869)
This shows the entire assertion that’s failing. This is
especially useful in combination with page objects.

For an assertion like this:
assert.equal(PageLayout.flashMessages.length, 1)

The failure displayed normally is just “failed” with the
expected of 1 and the result of undefined. With this addon,
the expected and result remain the same, but “failed” is
replaced with the text of the assertion.

The typical way to address this is to supply the optional
final argument to the assertion function that customises the
failure message. That still works with this addon, but most
of the time it becomes unnecessary.
2019-06-21 14:12:28 -05:00
Chris Baker
495e793490 Merge pull request #5865 from hashicorp/b-alloc-stop-missing-panic
alloc lifecycle: 404 when attempting to stop non-existent allocation
2019-06-21 06:09:51 -04:00
Chris Baker
7bc951237b alloc lifecycle: 404 when attempting to stop non-existent allocation 2019-06-20 21:27:22 +00:00
Michael Lange
069455c0e4 Merge pull request #5828 from hashicorp/f-ui/ui-screenshots-script
UI Screenshots script
2019-06-19 17:39:01 -07:00
Michael Lange
e9731f0572 Also move the make targets to the root 2019-06-19 17:20:13 -07:00
Michael Lange
f939de1fd0 Moved the ui screenshots script from /website/scripts to /scripts
Having a node package in the website dir is incompatible with the way
middleman watches the filesystem.
2019-06-19 17:18:44 -07:00
Michael Lange
ece0c9038d Give the allTheThings scenario a better name 2019-06-19 17:18:43 -07:00
Michael Lange
04c96eaa6d Warn about the correct mirage scenario when starting the screenshots script 2019-06-19 17:18:42 -07:00
Michael Lange
3a53c3b329 Use local package.json instead of inherited one from buildkite/puppeteer container 2019-06-19 17:18:41 -07:00
Michael Lange
8920650990 New Mirage scenario for puppeteer script to use 2019-06-19 17:18:40 -07:00
Michael Lange
77f02b95fb A make target for running the screenshots script locally 2019-06-19 17:18:39 -07:00
Michael Lange
cc5a411e51 A make target for running the screenshots script in a docker container 2019-06-19 17:18:38 -07:00
Michael Lange
588b10fada A puppeteer based docker container for running the screenshots script without having to deal with headless chrome 2019-06-19 17:18:37 -07:00
Michael Lange
a78d74c35a New script for automatically capturing UI screenshots to use for guides and docs 2019-06-19 17:18:36 -07:00
Omar Khawaja
6d889fe884 [WIP] Add telemetry overview section (#5529)
* re-arrange telemetry docs and add overview with navigation

* update job and task status section

* fix navigation

* Update website/source/docs/telemetry/overview.html.md

Co-Authored-By: Chris Baker <cgbaker@hashicorp.com>

* Update website/source/docs/telemetry/overview.html.md

Co-Authored-By: Chris Baker <cgbaker@hashicorp.com>

* Update website/source/docs/telemetry/overview.html.md

Co-Authored-By: Chris Baker <cgbaker@hashicorp.com>

* Update website/source/docs/telemetry/metrics.html.md

Co-Authored-By: Chris Baker <cgbaker@hashicorp.com>

* Update website/source/docs/telemetry/metrics.html.md

Co-Authored-By: Chris Baker <cgbaker@hashicorp.com>

* fix formatting for nomad.plan.evaluate metric

* clarifications on collection interval and namespace labell

* fix typo

* Update website/source/docs/telemetry/overview.html.md

Co-Authored-By: Chris Baker <cgbaker@hashicorp.com>

* Update website/source/docs/telemetry/overview.html.md

Co-Authored-By: Chris Baker <cgbaker@hashicorp.com>

* Update website/source/docs/telemetry/overview.html.md

Co-Authored-By: Chris Baker <cgbaker@hashicorp.com>
2019-06-19 15:25:14 -04:00
Mahmood Ali
f3f59ab122 Update 0.9.3 and 0.9.4 changelog formating
to be consistent with other entries
2019-06-19 14:17:28 -04:00
Mahmood Ali
1b6ca959e6 Changelog GH-5844 2019-06-19 14:16:11 -04:00
Buck Doyle
237c40698b Update client list to combine statuses (#5789)
The draining, eligibility, and status fields now all show under a combined
state column. Draining takes precedence, then (in)eligibility; if neither of
those is true, the status displays.
2019-06-19 10:11:17 -07:00
Preetha
0317229f46 Merge pull request #5857 from hashicorp/missing-changelogs
Couple of changelog updates
2019-06-19 12:09:05 -05:00
Preetha Appan
a1e8c4d542 Couple of changelog updates 2019-06-19 12:08:15 -05:00
Preetha
c135f036e6 Merge pull request #5841 from hashicorp/f-raft-snapshot-metrics
Raft and state store indexes as metrics
2019-06-19 12:01:03 -05:00
Preetha Appan
aba8d42811 Add links to godoc for raft related metrics 2019-06-19 11:59:05 -05:00
Preetha Appan
3adb7510b0 Change interval of raft stats collection to 10s 2019-06-19 11:58:46 -05:00
Chris Baker
e02947801e Merge pull request #5850 from hashicorp/b-5345-prometheus-metric-label-conflict
metrics: upgraded prometheus http client
2019-06-19 12:50:24 -04:00