Commit Graph

21309 Commits

Author SHA1 Message Date
Mahmood Ali d2a9cd93a8
Merge pull request #10326 from hashicorp/b-hcl2-undefined-variables
Fix HCL2 panics when parsing undefined variables
2021-04-08 12:10:05 -04:00
Mike Wickett 0412c02ca8
Update homepage testimonial card, customer logos (#10210)
* website: add customer testimonial to homepage

* website: remove one testimonial, remove product logos
2021-04-07 17:41:41 -04:00
Mahmood Ali b2f9234b30
Merge pull request #10296 from hashicorp/c-script-tweaks-20210402
makefile cleanup
2021-04-07 16:54:43 -04:00
Mahmood Ali 04bfeacc5b hcl2: Use the actual string snippet as it appears from undefined
With the updated undefined variable code, we attempt to pick the text of
`${....}` verbatim from the hcl body. Previously, we'd attempt to
regenerate the string from the AST and pray it matches input; the
generation is lossy, as the same AST can represent multiple variations
(e.g. `${v.0}` and `${v[0]}` have the same HCLv2 AST). In this change,
we attempt to go back to the hcl2 source and find the string snippet
corresponding to the variable reference.
2021-04-07 16:45:37 -04:00
Mahmood Ali 6de35bd1b7 update hcl2 to latest
Update hcl/v2 to point to https://github.com/hashicorp/hcl/commits/nomad-v2.9.1+tweaks1
2021-04-07 16:16:49 -04:00
Mahmood Ali a190c3cbbe hcl2: add failing tests 2021-04-07 16:15:51 -04:00
Brandon Romano d375fcb60c
Merge pull request #10311 from hashicorp/br.stackmenu
Updates stackmenu to latest
2021-04-07 09:36:12 -07:00
Luiz Aoqui b32bf2cd85
docs: add missing `nomad job run` CLI flags (#10277) 2021-04-07 12:07:33 -04:00
Tim Gross 7d16e49a14 CSI: fix wrong output struct for snapshot list endpoint 2021-04-07 12:00:33 -04:00
Tim Gross d2d12b201c CSI: fix URL for volume snapshot list 2021-04-07 12:00:33 -04:00
Tim Gross e4f34a96e3 CSI: deletes with API don't have request body
Our API client `delete` method doesn't include a request body, but accepts an
interface for the response. We were accidentally putting the request body into
the response, which doesn't get picked up in unit tests because we're not
reading the (always empty) response body anyways.
2021-04-07 12:00:33 -04:00
Tim Gross 35ee06137e CSI: fix index error on formatting function for volume snapshots 2021-04-07 12:00:33 -04:00
Tim Gross 34a7b9da5c CSI: fix wrong RPC name on ListSnapshots 2021-04-07 12:00:33 -04:00
Tim Gross 8af5bd1ad4 CSI: fix decoding error on snapshot create
Consumers of the CSI HTTP API are expecting a response object and not a slice
of snapshots. Fix the return value.
2021-04-07 12:00:33 -04:00
Tim Gross d2e479505c CSI: capability check ListVolumes at RPC for nicer error messages
The plugin stub object does not include fine-grained capability checks, which
means `nomad volume status -verbose` will return ugly and verbose error
"Unimplemented" messages from the plugin if it does not support the CSI
`ListVolumes` RPC. Return a nicer error message from our RPC handler instead.
2021-04-07 12:00:22 -04:00
Tim Gross 69363705a8 CSI: fix HTTP routing for external volume list
The HTTP router did not correctly route `/v1/volumes/external` without being
explicitly added to the top-level router. Break this out into its own request
handler.
2021-04-07 12:00:22 -04:00
Tim Gross 2e8dc1dee2 CSI: fix early return on error from list external volumes command
If a plugin returns an error, we should continue at the outer scope to query
the next plugin, otherwise we just retry the plugin we got an error
on (potentially infinitely if it's an invalid request like an unsupported
plugin).
2021-04-07 12:00:22 -04:00
Tim Gross 70f5363a89 docs: update CSI create/register fields
Add new `access_mode`/`attachment_mode` fields. Make it more clear which set
of fields belong to create vs register. Update the example spec that's
generated by `volume init`.
2021-04-07 11:24:09 -04:00
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