Commit Graph

19641 Commits

Author SHA1 Message Date
Chris Baker 9370fe3d16
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 c9f7744b0f updated changelog for 9080 2020-10-13 20:18:39 +00:00
Chris Baker 1d35578bed removed backwards-compatible/untagged metrics deprecated in 0.7 2020-10-13 20:18:39 +00:00
Buck Doyle 517bc3c17b
Change htmlSafe prototype calls to imports (#9075) 2020-10-13 11:50:28 -05:00
Seth Hoenig cb1999b9df
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 ed13e5723f 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 98a70d789e
docs: inclusive language configuration changes (#9069) 2020-10-13 08:02:29 -04:00
Seth Hoenig 5a3748ca82
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 723fc38cf1 docs: tweak changelog ordering 2020-10-12 18:35:26 -05:00
Tim Gross 4335d847a4
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 d45be0b5a6
client: add NetworkStatus to Allocation (#8657) 2020-10-12 13:43:04 -04:00
Yoan Blanc 891accb89a
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 a7e481c623
docs: fix link in docker driver docs (#9066) 2020-10-12 08:17:07 -04:00
Jimmy Merritello abaac1d72f
[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 9b4917ae5f 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 ec1e75d9f4 csi: remove stray TODO comment
This item was completed in #8626
2020-10-09 11:03:51 -04:00
Tim Gross b5abf4ec9d csi: fix incorrect comment on csi_hook context lifetime 2020-10-09 11:03:51 -04:00
Tim Gross ecec432653
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 67817068e0
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 ccc52c9896 docs: fix linter typos in docs 2020-10-08 13:01:33 -05:00
Seth Hoenig 9b555fe6d5 env_aws: fixup test case node attr detection 2020-10-08 12:59:07 -05:00
Ryan Oaks 09048d834f
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 e693d15a5b 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 29a5454894
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 c03ec5f77b Update redirects to use a broader catch-all for routes ending in .html 2020-10-08 10:48:58 -04:00
Tim Gross e8c13a2307
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 16913bf3a1
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 51bccb9f16
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 98bdb9ee2e Update docs site to deploy to Vercel instead of Netlify 2020-10-07 13:49:05 -04:00
Tim Gross 82749bd6a6
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 3ceb5b36b1
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 55824909b6
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 3f5ecd6f42 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 fac7fb5d5d
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 d2fe895216
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 561637c063
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 67b4161411 added comment to operator metrics function 2020-10-06 11:22:10 -04:00
James Rasell ed7eb77bc7
changelog: add entries for #9023 and #9025 2020-10-06 17:16:55 +02:00
Seth Hoenig 6cffbecb3a
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 18aa30c00f metrics return bytes instead of string for more flexibility 2020-10-06 10:49:15 -04:00
davemay99 19a075cf47 update deprecated syntax per GH-9027 2020-10-06 09:47:16 -04:00
davemay99 7160c26f04 sync vendored modules 2020-10-06 09:16:52 -04:00
Drew Bailey a1cc07d4a4
make sync to align vendor/ with go.mod (#9032) 2020-10-06 08:30:32 -04:00
James Rasell b7dac9020f
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 552d1b2ed4
cli: ensure scaling policy target doesn't have trailing comma 2020-10-06 12:18:17 +02:00
James Rasell 564adc1678
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 ffe6533ad1
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 603cc1776c Add metrics command / output to debug bundle 2020-10-05 22:30:01 -04:00
Pierre Cauchois 1efe05f516 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 0c5ae5769f
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