Commit graph

15304 commits

Author SHA1 Message Date
Michael Schurter e4bc943a68 nomad: SnapshotAfter -> SnapshotMinIndex
Rename SnapshotAfter to SnapshotMinIndex. The old name was not
technically accurate. SnapshotAtOrAfter is more accurate, but wordy and
still lacks context about what precisely it is at or after (the index).

SnapshotMinIndex was chosen as it describes the action (snapshot), a
constraint (minimum), and the object of the constraint (index).
2019-06-24 12:16:46 -07:00
Michael Schurter 0f8164b2f1 nomad: evaluate plans after previous plan index
The previous commit prevented evaluating plans against a state snapshot
which is older than the snapshot at which the plan was created.  This is
correct and prevents failures trying to retrieve referenced objects that
may not exist until the plan's snapshot. However, this is insufficient
to guarantee consistency if the following events occur:

1. P1, P2, and P3 are enqueued with snapshot @ 100
2. Leader evaluates and applies Plan P1 with snapshot @ 100
3. Leader evaluates Plan P2 with snapshot+P1 @ 100
4. P1 commits @ 101
4. Leader evaluates applies Plan P3 with snapshot+P2 @ 100

Since only the previous plan is optimistically applied to the state
store, the snapshot used to evaluate a plan may not contain the N-2
plan!

To ensure plans are evaluated and applied serially we must consider all
previous plan's committed indexes when evaluating further plans.

Therefore combined with the last PR, the minimum index at which to
evaluate a plan is:

    min(previousPlanResultIndex, plan.SnapshotIndex)
2019-06-24 12:16:46 -07:00
Michael Schurter e10fea1d7a nomad: include snapshot index when submitting plans
Plan application should use a state snapshot at or after the Raft index
at which the plan was created otherwise it risks being rejected based on
stale data.

This commit adds a Plan.SnapshotIndex which is set by workers when
submitting plan. SnapshotIndex is set to the Raft index of the snapshot
the worker used to generate the plan.

Plan.SnapshotIndex plays a similar role to PlanResult.RefreshIndex.
While RefreshIndex informs workers their StateStore is behind the
leader's, SnapshotIndex is a way to prevent the leader from using a
StateStore behind the worker's.

Plan.SnapshotIndex should be considered the *lower bound* index for
consistently handling plan application.

Plans must also be committed serially, so Plan N+1 should use a state
snapshot containing Plan N. This is guaranteed for plans *after* the
first plan after a leader election.

The Raft barrier on leader election ensures the leader's statestore has
caught up to the log index at which it was elected. This guarantees its
StateStore is at an index > lastPlanIndex.
2019-06-24 12:16:46 -07:00
Nick Ethier 448b759578
Merge pull request #5875 from sarcasticadmin/update-example-config
Update website example config
2019-06-24 08:15:14 -04:00
Robert James Hernandez 16939aa8c3 Update website example config 2019-06-23 10:41:48 -07:00
Buck Doyle 4aae981699
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 7c016b89c2
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 59fac48d92 alloc lifecycle: 404 when attempting to stop non-existent allocation 2019-06-20 21:27:22 +00:00
Michael Lange 792d39ac93
Merge pull request #5828 from hashicorp/f-ui/ui-screenshots-script
UI Screenshots script
2019-06-19 17:39:01 -07:00
Michael Lange 9594fade9c Also move the make targets to the root 2019-06-19 17:20:13 -07:00
Michael Lange 539b1693c0 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 af6daf34d2 Give the allTheThings scenario a better name 2019-06-19 17:18:43 -07:00
Michael Lange a7603747a0 Warn about the correct mirage scenario when starting the screenshots script 2019-06-19 17:18:42 -07:00
Michael Lange bf20c16710 Use local package.json instead of inherited one from buildkite/puppeteer container 2019-06-19 17:18:41 -07:00
Michael Lange 6201003f3f New Mirage scenario for puppeteer script to use 2019-06-19 17:18:40 -07:00
Michael Lange 22ce4894c7 A make target for running the screenshots script locally 2019-06-19 17:18:39 -07:00
Michael Lange afe64a44c9 A make target for running the screenshots script in a docker container 2019-06-19 17:18:38 -07:00
Michael Lange 2996fd951b 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 2d8caa9659 New script for automatically capturing UI screenshots to use for guides and docs 2019-06-19 17:18:36 -07:00
Omar Khawaja 4f357a91ac
[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 95f621559b 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 ab428eaa2a Changelog GH-5844 2019-06-19 14:16:11 -04:00
Buck Doyle a2b80bebe6
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 1dd300d02c
Merge pull request #5857 from hashicorp/missing-changelogs
Couple of changelog updates
2019-06-19 12:09:05 -05:00
Preetha Appan 23aed03592
Couple of changelog updates 2019-06-19 12:08:15 -05:00
Preetha 586e50d1a4
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 539d12e583
Add links to godoc for raft related metrics 2019-06-19 11:59:05 -05:00
Preetha Appan dc0ac81609
Change interval of raft stats collection to 10s 2019-06-19 11:58:46 -05:00
Chris Baker d8da6870fb
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
Chris Baker 0436f70975
Merge branch 'master' into b-5345-prometheus-metric-label-conflict 2019-06-19 12:50:03 -04:00
Chris Baker 8dadc50f4a
Update CHANGELOG.md 2019-06-19 12:49:12 -04:00
Mahmood Ali 4c3798c82a
Merge pull request #5844 from hashicorp/b-hcl-parse-unknown-vars
Upgrade hcl2 to validate arrays for unknown values
2019-06-19 10:44:21 -04:00
Omar Khawaja da4c801eb2
fixing typos in operator endpoint api docs (#5854) 2019-06-19 10:35:47 -04:00
Mahmood Ali 31d1e4a66c update changelog for GH-5726, GH-5811, and GH-5851 2019-06-18 21:59:49 -04:00
Mahmood Ali 6c245c9b6a
Merge pull request #5811 from cloudbuy/b-win32-volume-split
lift code from docker/volume/mounts for splitting windows volumes
2019-06-18 21:19:15 -04:00
Mahmood Ali b209584dce
Merge pull request #5726 from hashicorp/b-plugins-via-init
Use init() to handle plugin invocation
2019-06-18 21:09:03 -04:00
Mahmood Ali ac64509c59 comment on use of init() for plugin handlers 2019-06-18 20:54:55 -04:00
Mahmood Ali 9a39ec2307
Merge pull request #5851 from hashicorp/b-libcontainer-6cc5158
Update libcontainer to 6cc5158
2019-06-18 19:03:11 -04:00
Mahmood Ali 0c8a1623f3 update logrus and go-windows-terminal-sequences 2019-06-18 14:55:19 -04:00
Mahmood Ali 3dd3195d45 Update github.com/opencontainers/selinux
Or github.com/opencontainers/selinux/go-selinux, a dependency of
libcontainer.
2019-06-18 14:49:11 -04:00
Mahmood Ali 0848f577bb Update libcontainer to 6cc5158
To pick up the fix in https://github.com/opencontainers/runc/pull/2023

Fixes https://github.com/hashicorp/nomad/issues/5836
2019-06-18 14:48:13 -04:00
Chris Baker 355082c0ac update changelog for GH-5850 2019-06-18 18:38:41 +00:00
Chris Baker 50b491564d metrics: upgraded prometheus http client to 0.9.4 to address label conflict in Nomad 0.9.x reported in #5345 2019-06-18 18:34:22 +00:00
Chris Baker 3b8315f381
Merge pull request #5847 from hashicorp/f-5554-metrics-namespace-label
metrics: add namespace label to allocation metrics
2019-06-18 10:57:07 -04:00
Charlie Voiselle 971e8a94c9
Merge pull request #5849 from hashicorp/roll-back-ami
roll back to previous ami
2019-06-18 10:23:11 -04:00
Omar Khawaja 81f0764697 roll back to previous ami 2019-06-18 10:20:13 -04:00
Chris Baker a2b3e83499 update changelog 2019-06-18 14:16:49 +00:00
Chris Baker f71114f5b8 cleanup test 2019-06-18 14:15:25 +00:00
Chris Baker a2dc351fd0 formatting and clarity 2019-06-18 14:00:57 +00:00
Damien Churchill 9ee17f32c0 run new file through goimports 2019-06-18 08:35:25 +01:00