Commit Graph

20874 Commits

Author SHA1 Message Date
Chris Baker
0cd707e3a9 moved JSON handlers and extension code around a bit for proper order of
initialization
2021-03-22 14:12:42 +00:00
Chris Baker
ca51bd91bd refactor? 2021-03-22 01:49:21 +00:00
Chris Baker
574d26cb66 updated node drain API test 2021-03-21 15:30:16 +00:00
Chris Baker
93d5187e7b removed deprecated fields from Drain structs and API
node drain: use msgtype on txn so that events are emitted
wip: encoding extension to add Node.Drain field back to API responses

new approach for hiding Node.SecretID in the API, using `json` tag
documented this approach in the contributing guide
refactored the JSON handlers with extensions
modified event stream encoding to use the go-msgpack encoders with the extensions
2021-03-21 15:30:11 +00:00
Tim Gross
7c7569674c CSI: unique volume per allocation
Add a `PerAlloc` field to volume requests that directs the scheduler to test
feasibility for volumes with a source ID that includes the allocation index
suffix (ex. `[0]`), rather than the exact source ID.

Read the `PerAlloc` field when making the volume claim at the client to
determine if the allocation index suffix (ex. `[0]`) should be added to the
volume source ID.
2021-03-18 15:35:11 -04:00
Tim Gross
a1eaad9cf7 CSI: remove prefix matching from CSIVolumeByID and fix CLI prefix matching (#10158)
Callers of `CSIVolumeByID` are generally assuming they should receive a single
volume. This potentially results in feasibility checking being performed
against the wrong volume if a volume's ID is a prefix substring of other
volume (for example: "test" and "testing").

Removing the incorrect prefix matching from `CSIVolumeByID` breaks prefix
matching in the command line client. Add the required elements for prefix
matching to the commands and API.
2021-03-18 14:32:40 -04:00
Tim Gross
618d64ba37 csi: volume init command
Create a convenience command for generating example CSI volume specifications,
similar to the existing `nomad job init` or `nomad quota init` commands.
2021-03-18 14:24:40 -04:00
Dave May
9138d374d6 docs: add missing dashes to operator debug Usage (#10192) 2021-03-17 15:13:04 -04:00
Seth Hoenig
7b8364d459 Merge pull request #10103 from AndrewChubatiuk/service-portlabel-interpolation-fix
fixed service interpolation for sidecar tasks
2021-03-17 10:40:48 -05:00
Charlie Voiselle
d914990e5f Fixup uses of sanity (#10187)
* Fixup uses of `sanity`
* Remove unnecessary comments.

These checks are better explained by earlier comments about
the context of the test. Per @tgross, moved the tests together
to better reinforce the overall shared context.

* Update nomad/fsm_test.go
2021-03-16 18:05:08 -04:00
Tim Gross
e200caae45 docs: clarify HCL is parsed in CLI 2021-03-15 15:41:43 -04:00
davemay99
b2207d70f7 CHANGELOG: Add missing 0.12.10 version 2021-03-15 08:35:03 -04:00
Florian Apolloner
8b3ea4ea9a docker: support configuring default log driver in plugin options 2021-03-12 16:04:33 -05:00
Luiz Aoqui
9d7054e00c Merge pull request #10171 from hashicorp/docs-set-ports-on-jobspec
docs: add ports to jobspec overview example
2021-03-12 14:55:19 -05:00
Luiz Aoqui
e873675a5b docs: add ports to jobspec overview example 2021-03-12 13:36:39 -05:00
Michael Schurter
c128d9c767 Merge pull request #10169 from hashicorp/docs-api
docs: remove mention of api versioning
2021-03-12 10:15:42 -08:00
Michael Schurter
927392462c docs: remove mention of api versioning
We've only ever had 1 API version, and we've broken backward
compatibility extremely rarely. Nothing changed about this with the
release of 1.0, let's just remove these sentences and save everybody
some reading.
2021-03-12 08:51:22 -08:00
Michael Schurter
5e0b6241d4 Merge pull request #10167 from hashicorp/docs-k8s-docker
docs: describe k8s in terms of "Linux containers"
2021-03-12 08:29:35 -08:00
Tim Gross
efc37542e7 csi: don't truncate CSI volume IDs
Volume IDs are not UUIDs, so truncating them to the short ID isn't really
necessary and makes for especially awkward UX when per-alloc volumes are in
use.
2021-03-12 10:39:09 -05:00
Tim Gross
b527861a67 csi: upgrade CSI protobufs to 1.4.0 2021-03-12 10:36:33 -05:00
Michael Schurter
7d7bda7f1b docs: describe k8s in terms of "Linux containers"
The terminology here is a bit tricky. Technically Kuberbetes deprecated
their Docker *runtime* support but can still run Docker images. Sadly in
a lot of people's minds "Docker" and "containers" are nearly synonymous.

I think "Linux containers" is a more accurate characterization of
Kubernetes focus than "Docker" at this point.

Fixes #10120
2021-03-11 17:49:13 -08:00
Drew Bailey
e0fabcb9a7 add on update to services table in allocation details (#10153)
* add on update to services table in allocation details

* populate onupdate test data
2021-03-11 12:28:38 -05:00
Tim Gross
b66a341505 scheduler/csi: fix early return when multiple volumes are requested
When multiple CSI volumes are requested, the feasibility check could return
early for read/write volumes with free claims, even if a later volume in the
request was not feasible for any other reason (including not existing at
all). This can result in random failure to fail feasibility checking,
depending on how the map of volumes was being ordered at runtime.

Remove the early return from the feasibility check. Add a test to verify that
missing volumes in the map will cause a failure; this test will not catch a
regression every test run because of the random map ordering, but any failure
will be caught over the course of several CI runs.
2021-03-10 15:18:36 -05:00
James Rasell
ded978c34c Merge pull request #10140 from hashicorp/b-gh-10070
agent: return req error if prometheus metrics are disabled.
2021-03-10 17:11:39 +01:00
Mahmood Ali
b0ca1fd74d server: handle invalid jobs in expose handler hook (#10154)
The expose handler hook must handle if the submitted job is invalid. Without this validation, the rpc handler panics on invalid input.

Co-authored-by: Tim Gross <tgross@hashicorp.com>
2021-03-10 09:12:46 -05:00
James Rasell
9263f4052a correctly format variable name within upgrade doc
Co-authored-by: Tim Gross <tgross@hashicorp.com>
2021-03-10 15:08:17 +01:00
Tim Gross
a0aef186ec CLI 'nomad ui -authenticate' flag for one-time token exchange
Includes swapping the previously documented `-login` flag for `-authenticate`
to align better with Waypoint.
2021-03-10 08:17:56 -05:00
Tim Gross
f9cf36d43a HTTP API support for 'nomad ui -login'
Endpoints for requesting and exchanging one-time tokens via the HTTP
API. Includes documentation updates.
2021-03-10 08:17:56 -05:00
Tim Gross
a32fa2499c one-time token: never return expired tokens 2021-03-10 08:17:56 -05:00
Tim Gross
a12f44705a RPC endpoints to support 'nomad ui -login'
RPC endpoints for the user-driven APIs (`UpsertOneTimeToken` and
`ExchangeOneTimeToken`) and token expiration (`ExpireOneTimeTokens`).
Includes adding expiration to the periodic core GC job.
2021-03-10 08:17:56 -05:00
Tim Gross
b4a516bed7 state store updates for one-time tokens
The `OneTimeToken` struct is to support the `nomad ui -login` command. This
changeset adds the struct to the Nomad state store.
2021-03-10 08:17:56 -05:00
Tim Gross
47f3945cfe docs: 'nomad ui -login' command 2021-03-10 08:17:56 -05:00
Michael Lange
ff009f94c1 Merge pull request #10138 from hashicorp/f-ui/improved-stats-charts
UI: Line Chart new primitives and tooltip refactor
2021-03-09 17:58:42 -08:00
Michael Lange
53f9b47c72 Move complex annotation hbs logic into JS
As @backspace pointed out, we're processing a bunch of other stuff
anyway, so might as well process the active state there too where it's
more likely to be expected.
2021-03-09 17:19:52 -08:00
Mahmood Ali
74f72fb820 Merge pull request #10151 from hashicorp/c-golang-1.16
Update to Golang 1.16
2021-03-09 15:39:45 -05:00
Tim Gross
df298a44d9 docs: update website links from master to main 2021-03-09 14:42:24 -05:00
Mahmood Ali
bc64f26d6e use go install for tools
Golang 1.16 added better support for installing tools, without updating
go.mod files: https://blog.golang.org/go116-module-changes#TOC_4. .
2021-03-09 14:26:44 -05:00
Mahmood Ali
02ea1e2146 build: use golang 1.16 2021-03-09 14:20:40 -05:00
Mahmood Ali
07c7b604b2 Only reference the major/minor versions
Maintaining patch versions is burdensome, and historical info is already
present in git history.
2021-03-09 14:20:40 -05:00
Tim Gross
ffcb501820 demo: hclfmt a jobspec 2021-03-09 14:19:14 -05:00
Tim Gross
41e7a16b7e changelog: fix position of entry 2021-03-09 10:47:13 -05:00
Sylvain Corsini
1b19cd4334 Update DigitalOcean CSI plugin demo 2021-03-09 10:42:40 -05:00
James Rasell
65c826d887 docs: add upgrade guide for change to metrics API. 2021-03-09 15:40:08 +01:00
James Rasell
1fd4fbd1d1 changelog: add entry for #10140 2021-03-09 15:29:25 +01:00
James Rasell
09cf00f330 agent: return req error if prometheus metrics are disabled.
If the user has disabled Prometheus metrics and a request is
sent to the metrics endpoint requesting Prometheus formatted
metrics, then the request should fail.
2021-03-09 15:28:58 +01:00
Dave May
83af6f5785 debug: update defaults to commonly used values 2021-03-09 08:31:38 -05:00
Michael Lange
945ad592a5 Update LineChart stories to use new tooltip pattern
Some charts intentionally don't yield a tooltip to show the possibility.
2021-03-08 21:02:40 -08:00
Michael Lange
8a9d2abc4d No longer include an automatic tooltip in LineChart
It is now required to use the one yielded by the :after named block.
2021-03-08 21:02:01 -08:00
Michael Lange
db1a128659 Integration test coverage for horizontal annotations and tooltips 2021-03-08 20:22:01 -08:00
Michael Lange
2eff475be6 Pre format x and y values for the yielded tooltip component in line chart 2021-03-08 15:41:18 -08:00