Commit Graph

19649 Commits

Author SHA1 Message Date
Tim Gross
b63d3ffc54 e2e: eliminate race condition causing rescheduling test flake (#9085)
The autorevert test checks for reverted allocations to be placed and running
before checking the deployment status, but the deployment can be completed and
marked "successful" before we check it for "running" status. Instead, just
wait for it to be marked "successful" and assert we have the expected count of
deployment statuses.
2020-10-14 11:35:30 -04:00
Tim Gross
554bdcc0ca e2e: use AMI filter for Ubuntu packer image (#9086)
Instead of hard-coding the base AMI for our Packer image for Ubuntu, use the
latest from Canonical so that we always have their current kernel patches.
2020-10-14 11:22:33 -04:00
Nick Ethier
5ddb88227e e2e/networking: use correct dc (#9088) 2020-10-14 11:14:09 -04:00
Seth Hoenig
b2edd17373 Merge pull request #9087 from hashicorp/docs-more-cl
docs: more connect changelog updates
2020-10-14 10:13:43 -05:00
Seth Hoenig
867ea69c93 docs: more connect changelog updates 2020-10-14 10:06:53 -05:00
Turtle Kalus
33cc888850 Use latest AMI for Ubuntu Xenial based on search (#9076)
Also, remove public share for ami build.
2020-10-14 11:01:54 -04:00
Tim Gross
b8cd187a41 e2e: add flag to opt-in to creating EBS/EFS volumes (#9082)
For everyday developer use, we don't need volumes for testing CSI. Providing a
flag to opt-in speeds up deploying dev clusters and slightly reduces infra costs.

Skip CSI test if missing volume specs.
2020-10-14 10:29:33 -04:00
Tim Gross
4314e81e78 E2E: vault secrets (#9081)
* rename vault API compatibility test for clarity
* exercise vault secrets lease renewal
2020-10-14 08:43:28 -04:00
Chris Baker
512fa09652 Merge pull request #9080 from hashicorp/f-remove-deprecated-metrics
removed backwards-compatible/untagged metrics deprecated in 0.7
2020-10-13 16:29:43 -05:00
Chris Baker
40c119c3d4 updated changelog for 9080 2020-10-13 20:18:39 +00:00
Chris Baker
797543ad4b removed backwards-compatible/untagged metrics deprecated in 0.7 2020-10-13 20:18:39 +00:00
Buck Doyle
74c14dfe55 Change htmlSafe prototype calls to imports (#9075) 2020-10-13 11:50:28 -05:00
Seth Hoenig
2214381825 Merge pull request #8945 from hashicorp/f-auto-sidecar
consul/connect: dynamically select envoy sidecar at runtime
2020-10-13 09:41:16 -05:00
Seth Hoenig
bdeb73cd2c consul/connect: dynamically select envoy sidecar at runtime
As newer versions of Consul are released, the minimum version of Envoy
it supports as a sidecar proxy also gets bumped. Starting with the upcoming
Consul v1.9.X series, Envoy v1.11.X will no longer be supported. Current
versions of Nomad hardcode a version of Envoy v1.11.2 to be used as the
default implementation of Connect sidecar proxy.

This PR introduces a change such that each Nomad Client will query its
local Consul for a list of Envoy proxies that it supports (https://github.com/hashicorp/consul/pull/8545)
and then launch the Connect sidecar proxy task using the latest supported version
of Envoy. If the `SupportedProxies` API component is not available from
Consul, Nomad will fallback to the old version of Envoy supported by old
versions of Consul.

Setting the meta configuration option `meta.connect.sidecar_image` or
setting the `connect.sidecar_task` stanza will take precedence as is
the current behavior for sidecar proxies.

Setting the meta configuration option `meta.connect.gateway_image`
will take precedence as is the current behavior for connect gateways.

`meta.connect.sidecar_image` and `meta.connect.gateway_image` may make
use of the special `${NOMAD_envoy_version}` variable interpolation, which
resolves to the newest version of Envoy supported by the Consul agent.

Addresses #8585 #7665
2020-10-13 09:14:12 -05:00
Tim Gross
405e9d874c docs: inclusive language configuration changes (#9069) 2020-10-13 08:02:29 -04:00
Seth Hoenig
d3a51279af Merge pull request #9038 from hashicorp/f-ec2-table
env_aws: get ec2 cpu perf data from AWS API
2020-10-12 18:55:33 -05:00
Seth Hoenig
1f782b3ce6 docs: tweak changelog ordering 2020-10-12 18:35:26 -05:00
Tim Gross
c1c09e1b65 Allow job Version to start at non-zero value (#9071)
Stop coercing version of new job to 0 in the state_store, so that we can add
regions to a multi-region deployment. Send new version, rather than existing
version, to MRD to accomodate version-choosing logic changes in ENT.

Co-authored-by: Chris Baker <1675087+cgbaker@users.noreply.github.com>
2020-10-12 13:59:48 -04:00
Nick Ethier
756aa11654 client: add NetworkStatus to Allocation (#8657) 2020-10-12 13:43:04 -04:00
Yoan Blanc
c14c616194 use allow/deny instead of the colored alternatives (#9019)
Signed-off-by: Yoan Blanc <yoan@dosimple.ch>
2020-10-12 08:47:05 -04:00
Lens0021
b849db7dca docs: fix link in docker driver docs (#9066) 2020-10-12 08:17:07 -04:00
Jimmy Merritello
1b6a9ca517 [Website] Add new HashiStackMenu (#9042)
* Add new HashiStackMenu

* Bump version

* Bump HSM version and rm meganav styles
2020-10-09 10:39:08 -05:00
Tim Gross
3c3e54a273 csi: volumewatcher only needs one pass to collect past claims
If a volume GC and a `nomad volume detach` command land concurrently, we can
end up with multiple claims without an allocation, which results in extra
no-op work when finding claims to collect as past claims.
2020-10-09 11:03:51 -04:00
Tim Gross
6228cae337 csi: remove stray TODO comment
This item was completed in #8626
2020-10-09 11:03:51 -04:00
Tim Gross
1ce58e8000 csi: fix incorrect comment on csi_hook context lifetime 2020-10-09 11:03:51 -04:00
Tim Gross
c08b224a39 csi: allow for volume detach to work with gc'd nodes (#9057)
When we try to prefix match the `nomad volume detach` node ID argument, the
node may have been already GC'd. The volume unpublish workflow gracefully
handles this case so that we can free the claim. So make a best effort to find
a node ID among the volume's claimed allocations, or otherwise just use the
node ID we've been given by the user as-is.
2020-10-09 09:45:03 -04:00
Tim Gross
0fcca28e28 docs: show distinct_hosts constraint for CSI plugins (#9052)
CSI plugins with the same plugin ID and type (controller, node, monolith) will
collide on a host, both in the communication socket and in the dynamic plugin
registry. Until this can be fixed, leave notice to operators in the
documentation.
2020-10-08 16:55:55 -04:00
Seth Hoenig
da344b184a docs: fix linter typos in docs 2020-10-08 13:01:33 -05:00
Seth Hoenig
080b2c4415 env_aws: fixup test case node attr detection 2020-10-08 12:59:07 -05:00
Ryan Oaks
b2b9bd7a0c Merge pull request #9048 from hashicorp/ro.docs-html-redirect-catchall
docs: Update redirects to use a broader catch-all for routes ending in .html
2020-10-08 13:56:18 -04:00
Seth Hoenig
53ab30870b env_aws: get ec2 cpu perf data from AWS API
Previously, Nomad was using a hand-made lookup table for looking
up EC2 CPU performance characteristics (core count + speed = ticks).

This data was incomplete and incorrect depending on region. The AWS
API has the correct data but requires API keys to use (i.e. should not
be queried directly from Nomad).

This change introduces a lookup table generated by a small command line
tool in Nomad's tools module which uses the Amazon AWS API.

Running the tool requires AWS_* environment variables set.
  $ # in nomad/tools/cpuinfo
  $ go run .

Going forward, Nomad can incorporate regeneration of the lookup table
somewhere in the CI pipeline so that we remain up-to-date on the latest
offerings from EC2.

Fixes #7830
2020-10-08 12:01:09 -05:00
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
Ryan Oaks
ec49f056c4 Update redirects to use a broader catch-all for routes ending in .html 2020-10-08 10:48:58 -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