Commit Graph

19617 Commits

Author SHA1 Message Date
Tim Gross
bf62f46a55 csi: loosen ValidateVolumeCapability requirements (#9049)
The CSI specification for `ValidateVolumeCapability` says that we shall
"reconcile successful capability-validation responses by comparing the
validated capabilities with those that it had originally requested" but leaves
the details of that reconcilation unspecified. This API is not implemented in
Kubernetes, so controller plugins don't have a real-world implementation to
verify their behavior against.

We have found that CSI plugins in the wild may return "successful" but
incomplete `VolumeCapability` responses, so we can't require that all
capabilities we expect have been validated, only that the ones that have been
validated match. This appears to violate the CSI specification but until
that's been resolved in upstream we have to loosen our validation
requirements. The tradeoff is that we're more likely to have runtime errors
during `NodeStageVolume` instead of at the time of volume registration.
2020-10-08 12:53:24 -04:00
Tim Gross
024e27e5cc csi: validate mount options during volume registration (#9044)
Volumes using attachment mode `file-system` use the CSI filesystem API when
they're mounted, and can be passed mount options. But `block-device` mode
volumes don't have this option. When RPCs are made to plugins, we are silently
dropping the mount options we don't expect to see, but this results in a poor
operator experience when the mount options aren't honored. This changeset
makes passing mount options to a `block-device` volume a validation error.
2020-10-08 09:23:21 -04:00
Tim Gross
9d1efd5c4b docs: CSI mount_options are available only for filesystem vols (#9043)
The CSI specification allows only the `file-system` attachment mode to have
mount options. The `block-device` mode is left "intentionally empty, for now"
in the protocol. We should be validating against this problem, but our
documentation also had it backwards.

Also adds missing mount_options on group volume.
2020-10-08 08:49:43 -04:00
Ryan Oaks
99b9a8d212 Merge pull request #9036 from hashicorp/ro.docs-vercel-migration
Update docs site to deploy to Vercel instead of Netlify
2020-10-07 13:53:16 -04:00
Ryan Oaks
c1b3e141a5 Update docs site to deploy to Vercel instead of Netlify 2020-10-07 13:49:05 -04:00
Tim Gross
c04e7f6f74 csi: allow volume detach to take a node ID prefix (#9041)
Fixes a bug where the `nomad volume detach` command would not accept a node ID
prefix instead of a full node ID. The volume ID is already prefix matched
server-side.
2020-10-07 11:14:57 -04:00
Tim Gross
7cff2de942 csi: allow more than 1 writer claim for multi-writer mode (#9040)
Fixes a bug where CSI volumes with the `MULTI_NODE_MULTI_WRITER` access mode
were using the same logic as `MULTI_NODE_SINGLE_WRITER` to determine whether
the volume had writer claims available for scheduling.

Extends CSI claim endpoint test to exercise multi-reader and make sure `WriteFreeClaims`
is exercised for multi-writer in feasibility test.
2020-10-07 10:43:23 -04:00
Seth Hoenig
98a7834731 Merge pull request #9039 from hashicorp/f-update-aws-sdk-go
deps: update aws-sdk-go for ec2metadata bugfix
2020-10-06 13:28:00 -05:00
Seth Hoenig
f5a785e68d deps: update aws-sdk-go for ec2metadata bugfix
Newer versions of aws-sdk-go contain a bugfix for retrieving
region vs availability-zone information.
2020-10-06 13:05:29 -05:00
James Rasell
9609ee7ed5 Merge pull request #9037 from hashicorp/f-changelog-entries-9023-9025
changelog: add entries for #9023 and #9025
2020-10-06 18:29:33 +02:00
James Rasell
1132a6c93a Merge pull request #9023 from hashicorp/f-gh-8648
cli: add scale and scaling-events commands to job cmd.
2020-10-06 18:03:41 +02:00
Dave May
abfcb10626 Merge pull request #9034 from hashicorp/dmay-debug-metrics
Add metrics command / output to debug bundle
2020-10-06 11:47:09 -04:00
davemay99
ff1578f0f3 added comment to operator metrics function 2020-10-06 11:22:10 -04:00
James Rasell
1502941975 changelog: add entries for #9023 and #9025 2020-10-06 17:16:55 +02:00
Seth Hoenig
d538559c60 Merge pull request #9033 from pierreca/verify-remove-checks
Do not double-remove checks removed by Consul
2020-10-06 10:16:13 -05:00
davemay99
ec09c593b5 metrics return bytes instead of string for more flexibility 2020-10-06 10:49:15 -04:00
davemay99
e0e3a01404 update deprecated syntax per GH-9027 2020-10-06 09:47:16 -04:00
davemay99
29dbd22395 sync vendored modules 2020-10-06 09:16:52 -04:00
Drew Bailey
3b4a018b21 make sync to align vendor/ with go.mod (#9032) 2020-10-06 08:30:32 -04:00
James Rasell
ca8b4f61a7 Merge pull request #9025 from hashicorp/f-gh-8649
cli: add policy list and info to new scaling cmd.
2020-10-06 12:40:43 +02:00
James Rasell
53b240b3b4 cli: ensure scaling policy target doesn't have trailing comma 2020-10-06 12:18:17 +02:00
James Rasell
c3977fe192 cli: add scale and scaling-events commands to job cmd.
This adds the ability to scale Nomad jobs and view scaling events
via the CLI.
2020-10-06 09:58:46 +02:00
James Rasell
87bfe0e558 Merge pull request #9027 from hashicorp/f-gh-9026
cli: move tests to use NewMockUi func.
2020-10-06 08:28:18 +02:00
davemay99
bf8bdc94f8 Add metrics command / output to debug bundle 2020-10-05 22:30:01 -04:00
Pierre Cauchois
6c5d2c3d85 Do not double-remove checks removed by Consul
When deregistering a service, consul also deregisters the associated
checks. The current state keeps track of all services and all checks
separately and deregisters them in sequence, which leads, whether during
syncs or shutdowns, to check deregistrations happening twice and failing
the second time (generating errors in logs)

This fix includes:
- a fix to the sync logic that just pulls the checks *after* the
services have been synced
- a fix to the shutdown mechanism that gets an updated list of checks
after deregistering the services, so that we get a cleaner check
deregistration process.
2020-10-06 00:30:29 +00:00
Seth Hoenig
933e32a728 Merge pull request #9029 from hashicorp/b-tgs-updates
consul/connect: trigger update as necessary on connect changes
2020-10-05 16:48:04 -05:00
Chris Baker
c195f93c10 Merge pull request #9020 from hashicorp/b-8796-i-do-not-want-no-null-chars
job, task group, and task IDs should not allow null characters
2020-10-05 14:54:02 -05:00
Seth Hoenig
37cd0eced3 consul/connect: trigger update as necessary on connect changes
This PR fixes a long standing bug where submitting jobs with changes
to connect services would not trigger updates as expected. Previously,
service blocks were not considered as sources of destructive updates
since they could be synced with consul non-destructively. With Connect,
task group services that have changes to their connect block or to
the service port should be destructive, since the network plumbing of
the alloc is going to need updating.

Fixes #8596 #7991

Non-destructive half in #7192
2020-10-05 14:53:00 -05:00
Chris Baker
b0c2e5176a updated docs and validation to further prohibit null chars in region, datacenter, and job name 2020-10-05 18:01:50 +00:00
Chris Baker
5062e74b3e updated api tests wrt backwards compat on null chars in IDs 2020-10-05 18:01:50 +00:00
Chris Baker
39c73f1b32 updated job validate to refute job/group/task IDs containing null characters
updated CHANGELOG and upgrade guide
2020-10-05 18:01:49 +00:00
Chris Baker
d4ef12e42e documenting tests around null characters in job id, task group name, and task name 2020-10-05 18:01:49 +00:00
Seth Hoenig
fc10e8fbbd Merge pull request #9008 from luhhujbb/doc-portmap
[doc] fix deprecated port_map example
2020-10-05 12:25:53 -05:00
Tim Gross
311886b664 changelog entry for Consul segment fingerprint (#9015) 2020-10-05 12:35:34 -04:00
Tim Gross
31747e9c44 e2e: extend ConsulTemplate test and fix flakiness (#8997)
Add service discovery integration to the existing consul-template E2E test,
and verify both service and key updates force re-rendering. Fixes flakiness by
using the longer default wait config we use elsewhere.

Removes our last direct dependency on gomega.
2020-10-05 10:51:55 -04:00
Ryan Oaks
97d03887c7 Merge pull request #8991 from hashicorp/ro.docs-formatting
docs: Format docs website code and mdx
2020-10-05 10:31:40 -04:00
James Rasell
f5567b3261 cli: move tests to use NewMockUi func. 2020-10-05 16:07:41 +02:00
Tim Gross
5f87acf6cf e2e: bootstrap vault and provision Nomad with vault tokens (#9010)
Provisions vault with the policies described in the Nomad Vault integration
guide, and drops a configuration file for Nomad vault server configuration
with its token. The vault root token is exposed to the E2E runner so that
tests can write additional policies to vault.
2020-10-05 09:28:37 -04:00
James Rasell
13466a9100 cli: add policy list and info to new scaling cmd.
This adds the ability to detail scaling policies via the CLI.
2020-10-05 15:18:30 +02:00
Kent 'picat' Gruber
ea397cb042 Merge pull request #8998 from hashicorp/keygen-32-bytes
Use 32-byte key for gossip encryption to enable AES-256
2020-10-02 17:17:55 -04:00
Landan Cheruka
e40b9a40b2 fingerprint: changed unique.platform.azure.hostname to unique.platform.azure.name (#9016) 2020-10-02 16:50:12 -04:00
Javier Heredia
5fd9f1b5f5 Add consul segment fingerprint (#7214) 2020-10-02 15:15:59 -04:00
Tim Gross
38d2a80e2f docs: add Consul policy for Consul Namespace support (#9014)
Co-authored-by: Seth Hoenig <shoenig@hashicorp.com>
2020-10-02 15:13:33 -04:00
Charlie Voiselle
4a7502847d Update docker.mdx (#8913) 2020-10-02 14:54:14 -04:00
Fredrik Hoem Grelland
eb7cc6425d configure nomad cluster to use a Consul Namespace [Consul Enterprise] (#8849) 2020-10-02 14:46:36 -04:00
Seth Hoenig
7be0e61068 Merge pull request #9009 from hashicorp/d-docker-signal-docs
docs: document docker signal fix, add tests
2020-10-02 13:22:15 -05:00
Ryan Oaks
0e0f23210e Format docs website code and mdx 2020-10-02 13:31:40 -04:00
Kent 'picat' Gruber
a38e33a9c8 Fix panic in test due to the agent's logger not being initialized yet
So a null logger is used to avoid the problem.
2020-10-02 11:10:27 -04:00
Seth Hoenig
a299b76c5a docs: document docker signal fix, add tests
This PR adds a version specific upgrade note about the docker stop
signal behavior. Also adds test for the signal logic in docker driver.

Closes #8932 which was fixed in #8933
2020-10-02 10:06:43 -05:00
Jean-Baptiste Besselat
d29a3ff58e [doc] fix deprecated port_map example 2020-10-02 14:39:48 +02:00