Commit Graph

21291 Commits

Author SHA1 Message Date
Tim Gross 276633673d CSI: use AccessMode/AttachmentMode from CSIVolumeClaim
Registration of Nomad volumes previously allowed for a single volume
capability (access mode + attachment mode pair). The recent `volume create`
command requires that we pass a list of requested capabilities, but the
existing workflow for claiming volumes and attaching them on the client
assumed that the volume's single capability was correct and unchanging.

Add `AccessMode` and `AttachmentMode` to `CSIVolumeClaim`, use these fields to
set the initial claim value, and add backwards compatibility logic to handle
the existing volumes that already have claims without these fields.
2021-04-07 11:24:09 -04:00
Tim Gross dbcc2694b0 refactor: move VolumeRequest validation to Validate method 2021-04-07 11:24:09 -04:00
Tim Gross 72c07f15fb refactor: internal claim methods should be private 2021-04-07 11:24:09 -04:00
Chris Baker e9e4d420fc
Merge pull request #10302 from hashicorp/f-10301-api-header-race-condition
fix potential race condition in API client
2021-04-07 07:00:26 -05:00
Chris Baker b67a77c4c9 third attempt at fixing circle 2021-04-06 21:29:55 +00:00
Chris Baker 56f15c2536 second attempt at fixing circle 2021-04-06 21:00:45 +00:00
Chris Baker c220a0fba2 refactor enable_race circleci parameter 2021-04-06 20:38:52 +00:00
Chris Baker 90fc940e00 updated changelog 2021-04-06 20:27:12 +00:00
Brandon Romano 2e308a2135 Updates stackmenu to latest 2021-04-06 11:34:51 -07:00
Chris Baker 6000d6cecd sdk: header map copy to avoid race condition in #10301 2021-04-06 18:06:27 +00:00
Chris Baker d0a2e6fc84 documenting test for #10301
enable -race detector for testing api
2021-04-06 17:31:29 +00:00
Luiz Aoqui baef056f0c
docs: add `empty_ignore_system` node selector strategy for autoscaling (#10306) 2021-04-06 13:02:56 -04:00
Seth Hoenig df76bbc418
Merge pull request #10307 from hashicorp/f-go-get-buf
build: install buf during bootstrap
2021-04-06 10:06:14 -06:00
Seth Hoenig 7a6a7e4da1 build: install buf during bootstrap
Previously installing buf was left out of `make bootstrap` because it
had conflicts with the `tools/go.mod` file and dependencies used by
other tools. With Go 1.16 we eliminated that `go.mod` file, and can
now just install `buf` with `go install` like everything else.
2021-04-06 09:42:44 -06:00
Michael Lange 5f6fcae126
Merge pull request #10303 from hashicorp/d/broken-link-bootstrap-scheduler
Fix the broken link in the bootstrapping custom scheduler warning
2021-04-05 15:04:19 -07:00
Michael Lange d0d5431bf9
Fix the broken link in the bootstrapping custom scheduler warning 2021-04-05 14:27:22 -07:00
Drew Bailey b867784e9c
allow setting stale flag from cli to retrieve individual server license (#10300) 2021-04-05 15:35:14 -04:00
Nick Ethier 5aed5b7cd4
ar: stringify CNI result debug message 2021-04-05 12:35:34 -04:00
Seth Hoenig 84bf49d46f
Merge pull request #10235 from hashicorp/f-cns-oss
consul: plumbing for specifying consul namespace in job/group
2021-04-05 10:33:44 -06:00
Seth Hoenig fe8fce00d9 consul: minor CR cleanup 2021-04-05 10:10:16 -06:00
Seth Hoenig 9eacb1c27b docs: apply suggestions from code review
Co-authored-by: Tim Gross <tgross@hashicorp.com>
2021-04-05 10:03:19 -06:00
Seth Hoenig f17ba33f61 consul: plubming for specifying consul namespace in job/group
This PR adds the common OSS changes for adding support for Consul Namespaces,
which is going to be a Nomad Enterprise feature. There is no new functionality
provided by this changeset and hopefully no new bugs.
2021-04-05 10:03:19 -06:00
Drew Bailey 6f97cbfc93
changelog entry for on_update configuration settings (#10299)
* changelog entry for on_update configuration settings

* Update CHANGELOG.md

Co-authored-by: Tim Gross <tgross@hashicorp.com>

Co-authored-by: Tim Gross <tgross@hashicorp.com>
2021-04-05 11:04:03 -04:00
Drew Bailey 4f378b7f41
license changelog (#10298) 2021-04-05 10:57:20 -04:00
Mahmood Ali 246f9ae211
Merge pull request #10295 from greut/chore/bump-golangci-lint-to-v1.39
chore: bump golangci-lint from v1.24 to v1.39
2021-04-03 08:40:10 -04:00
Yoan Blanc fd53bf0986
fixup! chore: bump golangci-lint from v1.24 to v1.39
Signed-off-by: Yoan Blanc <yoan@dosimple.ch>
2021-04-03 13:41:05 +02:00
Yoan Blanc bc308d0f6a
fix: golangci-lint with -mod=vendor
Signed-off-by: Yoan Blanc <yoan@dosimple.ch>
2021-04-03 10:25:06 +02:00
Yoan Blanc ac0d5d8bd3
chore: bump golangci-lint from v1.24 to v1.39
Signed-off-by: Yoan Blanc <yoan@dosimple.ch>
2021-04-03 09:50:23 +02:00
Mahmood Ali 9b9e48944b remove unused scripts 2021-04-02 16:43:21 -04:00
Mahmood Ali 7237785972 Tweak cross compilation Make
Only use cross compile if not compiling in target architecture.

Also, use the latest gcc for cross compilation.
2021-04-02 16:29:57 -04:00
Michael Schurter 5811796eb4
Merge pull request #10294 from hashicorp/schmichael-patch-1
docs: specify buf v0.30.1
2021-04-02 13:06:20 -07:00
Michael Schurter 0cb219e777
docs: specify buf v0.30.1
If you use too new of a `buf` you will hit #10293
2021-04-02 12:40:09 -07:00
Mahmood Ali e56b2fcb9a
Merge pull request #10286 from hashicorp/b-executor-stats
Memory stats for cgroup-v2
2021-04-02 12:27:55 -04:00
Mahmood Ali 9ff7220588 reuse existing function and typo fix 2021-04-02 11:56:27 -04:00
Tim Gross 26bbd0578a CSI: correctly handly empty capacity fields during registration
When a volume is registered via `nomad volume register` and not via the
creation workflow, it may not have any of the capacity fields set (as they're
not used for registration). Handle this case without error, and let the
downstream RPCs handle the error case for `nomad volume create`.
2021-04-02 11:48:26 -04:00
Drew Bailey 82dbf08e9f
remove flakey exec test that tests non-deterministic docker behavior (#10291) 2021-04-02 11:15:22 -04:00
Chris Baker e35eb05c99
Merge pull request #10290 from hashicorp/f-move-json-handles-back-to-structs-package
move json handle back to `structs`
2021-04-02 09:12:35 -05:00
Chris Baker b11a092d2d added missing import from command/agent 2021-04-02 13:53:28 +00:00
Chris Baker 21bc48ca29 json handles were moved to a new package in #10202
this was unecessary after refactoring, so this moves them back to their
original location in package structs
2021-04-02 13:31:10 +00:00
Mahmood Ali b7529217fe
Merge pull request #10285 from hashicorp/build-no-codegen-by-default
dev: ignore msgpack codegen code in dev by default
2021-04-01 22:03:01 -04:00
Mahmood Ali c33df50808 cli: Show memory usage instead of RSS
If a task doesn't report RSS, let's use memory usage.
2021-04-01 20:26:41 -04:00
Chris Baker d9f3115606
Merge pull request #10202 from hashicorp/f-node-drain-api
remove deprecated `Drain` field from `structs.Node`
2021-04-01 16:48:53 -05:00
Mahmood Ali 24fe595de4 dev: ignore msgpack codegen code in dev by default
This change disables using msgpack generated serializers in dev by
default.

In released binaries, we use code-generated msgpack serializers to
improve performance.  However, in development, code generated
serializers are a pain. If a developer forgets to re-generate code, the
code generated gets out of sync with the go structs, and result into
subtle bugs where some values appear not to persist as expected.

The CI and release scripts will continue to use the msgpack
code-generation. Devs who want to test locally can set
`GO_TAGS=codegen_generated` as well.
2021-04-01 16:27:18 -04:00
Chris Baker 436d46bd19
Merge branch 'main' into f-node-drain-api 2021-04-01 15:22:57 -05:00
James Rasell 138adfdc68
docs: add fixed-value and pass-through autoscaler plugin docs. (#10278)
docs: add fixed-value and pass-through autoscaler plugin docs.
2021-04-01 16:11:37 -04:00
Luiz Aoqui 6bbbc19eb7
Merge pull request #10199 from hashicorp/docs-update-autoscaling-aws-permission
docs: Update AWS permission requirements for the Autoscaler
2021-04-01 16:10:28 -04:00
Luiz Aoqui f802fe3789
Merge pull request #10183 from hashicorp/docs-autoscaling-policy-eval-cli
docs: add Autoscaler CLI flags for policy eval configuration
2021-04-01 16:10:01 -04:00
Tim Gross 0856483115 CSI: fingerprint detailed node capabilities
In order to support new node RPCs, we need to fingerprint plugin capabilities
in more detail. This changeset mirrors recent work to fingerprint controller
capabilities, but is not yet in use by any Nomad RPC.
2021-04-01 16:00:58 -04:00
Buck Doyle 6d67e90763
Add exchange of one-time token on UI load (#10066)
This adds UI support for receiving the one-time token passed via query parameter, as in #10134
and related PRs, and exchanging it for its corresponding secret ID. When this works, it’s mostly
invisible, with a brief flash of the OTT onscreen.

The authentication failure message now suggests the -authenticate flag.

When OTT exchange fails, it shows a whole-page error.

This includes a known UX shortcoming in that the OTT will not disappear from the URL when an
identifier is specified on the command line, like nomad ui -authenticate jobname. The goal is to
address that shortcoming in a forthcoming pull request.
2021-04-01 13:21:30 -05:00
Mahmood Ali 565496e6ba drivers/docker: account for cgroup-v2 memory stats
If the docker engine is running on cgroup-v2 host, then RSS and Max
Usage doesn't get reported.

Using a heauristic here to avoid adding more API calls to the Docker
Engine to infer cgroups version. Also, opted to avoid coordinating stats
collection with fingerprinting, which adds concurrency complexities.
2021-04-01 12:23:57 -04:00