Commit Graph

21093 Commits

Author SHA1 Message Date
Nick Spain
5924bcfbc3 Update TaskGroup services edited diff test to actually check Body 2021-04-13 09:15:35 -04:00
Nick Spain
9a33655912 Hash Body field as part of ServiceCheck 2021-04-13 09:15:35 -04:00
Nick Spain
7fefc3a08c Update changelog to mention adding the 'body' field 2021-04-13 09:15:35 -04:00
Nick Spain
5cae8f1d84 Document usage of 'body' field 2021-04-13 09:15:35 -04:00
Nick Spain
a1e0784f14 Add a 'body' field to the check stanza
Consul allows specifying the HTTP body to send in a health check. Nomad
uses Consul for health checking so this just plumbs the value through to
where the Consul API is called.

There is no validation that `body` is not used with an incompatible
check method like GET.
2021-04-13 09:15:35 -04:00
Tim Gross
2258c1854b e2e/csi: fix name of column used for snapshot create output parsing 2021-04-13 09:15:19 -04:00
Seth Hoenig
ca89437718 Merge pull request #10367 from hashicorp/up-go-plugin
deps: upgrade go-plugin dependency
2021-04-12 15:05:10 -06:00
Seth Hoenig
ce35ee312a deps: upgrade go-plugin dependency
This PR brings go-plugin up to date from ~v1.0.1 to v1.4.0 (about 18 months)
with a grab-bag of bux fixes.
2021-04-12 14:37:04 -06:00
Tim Gross
1e3e937f57 cli: add help for 'ui -authenticate' flag 2021-04-12 13:56:55 -04:00
Mahmood Ali
1d60aa667f Merge pull request #10276 from hashicorp/b-api-operator-query-meta
api: set operator query meta

Set the query meta for LicenseGet request. It's expected by api consumers to determine the raft index.
2021-04-12 13:30:24 -04:00
Mahmood Ali
55bb727c48 Update macOS image (#10365)
Also, remove protobuf installation: it's not used anymore.
2021-04-12 12:50:12 -04:00
Tim Gross
f9c3e1facf CI: update homebrew before installing protobuf
"Bottles" have been migrated to GitHub packages, so we need to update homebrew
to point to that new source before installing the `protobuf` formula.
2021-04-12 11:49:08 -04:00
Tim Gross
7ba93c2b77 changelog entry for 'nomad ui -authenticate' 2021-04-12 11:01:20 -04:00
Tim Gross
f217503a99 docs: CSI hostpath demo doesn't need docker.volumes.enabled 2021-04-12 10:46:02 -04:00
James Rasell
ee8b8fa8a9 changelog: add entry for #10253 2021-04-12 10:35:33 -04:00
Charlie Voiselle
02a8e6c2ad Fix parameterized <-> non-parameterized job error (#10357)
The error messages are reversed from tests performed above them.  The test uses the `validateJobUpdate()` function, but ignores the text of the error message itself.
2021-04-12 09:27:04 -04:00
Chris Baker
1b453fbaf3 Merge pull request #10352 from hashicorp/schmichael-patch-1
docs: clarify alloc signal behavior
2021-04-09 15:31:28 -05:00
Michael Schurter
e35c5b5b80 docs: clarify alloc signal behavior
The API docs don't make it immediately clear that the alloc signal API signals *all* tasks in an allocation if the `Task` parameter is omitted. You have to dig all the way down into the alloc runner to discover that behavior: https://github.com/hashicorp/nomad/blob/v1.0.4/client/allocrunner/alloc_runner.go#L1189-L1213
2021-04-09 12:57:19 -07:00
Drew Bailey
57b0ed0444 go get on the remote mac instance installs with read-only, allow for … (#10351)
* go get on the remote mac instance installs with read-only, allow for rm step

* Update scripts/release/mac-remote-build

Co-authored-by: Mahmood Ali <mahmood@hashicorp.com>

Co-authored-by: Mahmood Ali <mahmood@hashicorp.com>
2021-04-09 15:50:27 -04:00
Luiz Aoqui
6af44f8432 limit bytes passed to http.DetectContentType (#10348) 2021-04-09 14:37:27 -04:00
Tim Gross
47951aeb53 CSI: ensure page slices are within bounds
Plugins could potentially ignore the `max_entries` field and return a list of
entries that is greater, so we slice the return value in the server RPC to
enforce these value. But page sizes less than the number of entries for the
external CSI ListVolumes and ListSnapshots RPCs could cause a panic, so fix
the boundary checking.
2021-04-09 14:12:38 -04:00
Drew Bailey
050067a749 hclfmt hostpath.hcl 2021-04-09 12:15:49 -04:00
Michael Schurter
a4622e6978 Merge pull request #9895 from hashicorp/b-cni-ipaddr
CNI: add fallback logic if no ip address references sandboxed interface
2021-04-09 08:58:35 -07:00
Tim Gross
f167e90ca5 docs: clean up explanation of volume per_alloc 2021-04-09 11:32:00 -04:00
Tim Gross
842d9d2aa9 CSI: demo for hostpath plugin
A demo for the CSI hostpath plugin, used primarily for development
purposes. This reproduction has been used for testing during our CSI
implementation work, and this changeset makes that public.
2021-04-09 10:46:58 -04:00
Tim Gross
4186242fb1 E2E: remove broken Move-Item call during Windows provisioning
The archive does not include the `pkg/windows_amd64` path and unpacking the
archive happens in the installation directory.
2021-04-09 09:49:42 -04:00
Tim Gross
7681be1ccf CSI: API docs for create and snapshot workflows 2021-04-09 09:49:06 -04:00
Mark Lodato
fa8b43b1b6 Fix typo in general options documentation
There was a small typo of "namespacecs" instead of "namespaces"
2021-04-09 09:44:48 -04:00
Lars Lehtonen
a9c6a40354 nomad/structs: fix diff 2021-04-09 08:21:46 -04:00
Tim Gross
f302d40857 E2E: use remote-exec via TF0.14.7+
The E2E provisioning used local-exec to call ssh in a for loop in a hacky
workaround https://github.com/hashicorp/terraform/issues/25634, which
prevented remote-exec from working on Windows. Move to a newer version of
Terraform that fixes the remote-exec bug to make provisioning more reliable
and observable.

Note that Windows remote-exec needs to include the `powershell` call itself,
unlike Unix-alike remote-exec.
2021-04-08 16:03:06 -04:00
Tim Gross
a24cf6bfd1 CSI: listing from plugins can return EOF
The AWS EBS CSI plugin was observed to return a EOF when we get to the end of
the paging for `ListSnapshots`, counter to specification. Handle this case
gracefully, including for `ListVolumes` (which EBS doesn't support but has
similar semantics).

Also fixes a timestamp formatting bug on `ListSnapshots`
2021-04-08 13:32:19 -04:00
Tim Gross
45f0a3a532 CSI: capability block is required for volume registration 2021-04-08 13:02:24 -04:00
Tim Gross
f133a89ffb E2E: extend CSI test to cover create and snapshot workflows
Split the EBS and EFS tests out into their own test cases:
* EBS exercises the Controller RPCs, including the create/snapshot workflow.
* EFS exercises only the Node RPCs, and assumes we have an existing volume
that gets registered, rather than created.
2021-04-08 12:55:36 -04:00
Michael Schurter
6317407ab6 ar: refactor go-cni results processing & add test
The goal is to always find an interface with an address, preferring
sandbox interfaces, but falling back to the first address found.

A test was added against a known CNI plugin output that was not handled
correctly before.
2021-04-08 09:20:14 -07:00
Mahmood Ali
eb834fe122 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
83a559f677 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
3d012a1f56 Merge pull request #10296 from hashicorp/c-script-tweaks-20210402
makefile cleanup
2021-04-07 16:54:43 -04:00
Mahmood Ali
f4b62eabd0 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
e488493a79 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
b500bdb5cd hcl2: add failing tests 2021-04-07 16:15:51 -04:00
Brandon Romano
97f0ed496c Merge pull request #10311 from hashicorp/br.stackmenu
Updates stackmenu to latest
2021-04-07 09:36:12 -07:00
Luiz Aoqui
9d067de784 docs: add missing nomad job run CLI flags (#10277) 2021-04-07 12:07:33 -04:00
Tim Gross
7fb86fe4d0 CSI: fix wrong output struct for snapshot list endpoint 2021-04-07 12:00:33 -04:00
Tim Gross
c31fd304d5 CSI: fix URL for volume snapshot list 2021-04-07 12:00:33 -04:00
Tim Gross
d61c267e4e 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
5a537147db CSI: fix index error on formatting function for volume snapshots 2021-04-07 12:00:33 -04:00
Tim Gross
bca3aa938b CSI: fix wrong RPC name on ListSnapshots 2021-04-07 12:00:33 -04:00
Tim Gross
6a5fe39c80 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
32fb81dd25 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
ddc73681a3 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