Commit Graph

20149 Commits

Author SHA1 Message Date
Seth Hoenig
f5806ee0b0 Merge pull request #9472 from hashicorp/f-connect-upstream-datacenter
consul/connect: enable setting datacenter in upstream
2020-11-30 12:29:05 -06:00
Seth Hoenig
8faf997065 docs: better clarify connect upstream datacenter 2020-11-30 12:28:08 -06:00
Seth Hoenig
ce32e31195 consul/connect: enable setting datacenter in connect upstream
Before, upstreams could only be defined using the default datacenter.
Now, the `datacenter` field can be set in a connect upstream definition,
informing consul of the desire for an instance of the upstream service
in the specified datacenter. The field is optional and continues to
default to the local datacenter.

Closes #8964
2020-11-30 10:38:30 -06:00
Chris Piwarski
57fe67ce53 command: Fix node help error 2020-11-30 11:12:06 -05:00
Seth Hoenig
cfb9c8c465 docs: note manual jobspec parsing generally no longer required 2020-11-30 09:46:40 -06:00
Mark Lewis
a0f1174a8c Update migrate.mdx 2020-11-30 10:35:25 -05:00
Mahmood Ali
77e5f8c8db docs: add sidebar title for cidrsubnets (#9469) 2020-11-30 10:34:51 -05:00
Seth Hoenig
8f4a3d65b6 Merge pull request #9468 from hashicorp/b-fix-hcl2-doc-typo
docs: spell preceding the normal way
2020-11-30 09:30:56 -06:00
Seth Hoenig
9a7a82e09b docs: spell preceding the normal way 2020-11-30 09:29:24 -06:00
Seth Hoenig
dbb0d2f600 Merge pull request #9454 from hashicorp/f-add-ig-demo-e2e
e2e: add e2e test for consul connect ingress gateway demo
2020-11-30 09:01:42 -06:00
Seth Hoenig
78416c6e3e e2e: use test framework Assertions in connect tests 2020-11-30 08:48:40 -06:00
Buck Doyle
5efc15954a Add DAS namespaces toggle and fix empty card bug (#9337)
This builds on filtering to allow the optimize page to show recommendations
for the active namespace vs all namespaces. If turning off the toggle causes
the summary from the active card to become excluded from the filtered list,
the active summary changes, as with the facets.

It also includes a fix for this bug:
https://github.com/hashicorp/nomad/pull/9294#pullrequestreview-527748994
2020-11-30 08:18:44 -06:00
Buck Doyle
40084e4a9a Add query parameter to override Mirage scenario (#9380) 2020-11-30 08:12:15 -06:00
Mark Lewis
7a98e742d7 Update network.mdx 2020-11-30 08:53:17 -05:00
Mahmood Ali
15cbc40a70 Docs for HCL2 (#9322)
Add more detailed HCL2 docs, mostly lifted from Packer with tweaks for Nomad.

The function docs are basically verbatim taken from Packer with basic string substitutions. I commented out some for_each details as the examples are mostly driven towards Packer resources. I'll iterate on those with better Nomad examples.
2020-11-29 20:36:41 -05:00
James Rasell
775465f5c5 Merge pull request #9459 from hashicorp/ml4-patch-3
Update ephemeral_disk.mdx
2020-11-27 11:56:22 +01:00
James Rasell
f812f2443b Merge pull request #9460 from hashicorp/ml4-patch-4
Update group.mdx
2020-11-27 11:44:01 +01:00
James Rasell
963cb6900e Merge pull request #9458 from hashicorp/ml4-patch-2-1
Update device.mdx
2020-11-27 11:36:02 +01:00
James Rasell
dff8d5f2bf Merge pull request #9457 from hashicorp/ml4-patch-1
Update csi_plugin.mdx
2020-11-27 11:32:44 +01:00
James Rasell
c9b5ac7772 Merge pull request #9455 from Quiq/azure-more-fingerprinting
Add "compute/zone" to Azure fingerprinting
2020-11-27 09:12:49 +01:00
Mark Lewis
49405c6db1 Update group.mdx
Typo
2020-11-27 07:37:44 +00:00
Mark Lewis
db47617c84 Update ephemeral_disk.mdx
Document says size is an `int`, but snippet shows string type.
2020-11-27 07:16:01 +00:00
Mark Lewis
aee1dd9913 Update device.mdx
Fixed typos
2020-11-27 07:10:04 +00:00
Mark Lewis
952872db39 Update csi_plugin.mdx
typo
2020-11-27 06:56:13 +00:00
Roman Vynar
4bbe50bc53 Add compute/zone to Azure fingerprinting 2020-11-26 13:26:51 +02:00
Seth Hoenig
9e912ab938 e2e: add e2e test for consul connect ingress gateway demo
Add the ingress gateway example from the noamd connect examples
to the e2e Connect suite. Includes the ACLs enabled version,
which means the nomad server consul acl policy will require
operator=write permission.
2020-11-25 16:54:02 -06:00
Tim Gross
49a8ce68ea changelog entries for CSI 2020-11-25 16:44:20 -05:00
Tim Gross
8351c3f9d6 csi/api: populate ReadAllocs/WriteAllocs fields (#9377)
The API is missing values for `ReadAllocs` and `WriteAllocs` fields, resulting
in allocation claims not being populated in the web UI. These fields mirror
the fields in `nomad/structs.CSIVolume`. Returning a separate list of stubs
for read and write would be ideal, but this can't be done without either
bloating the API response with repeated full `Allocation` data, or causing a
panic in previous versions of the CLI.

The `nomad/structs` fields are persisted with nil values and are populated
during RPC, so we'll do the same in the HTTP API and populate the `ReadAllocs`
and `WriteAllocs` fields with a map of allocation IDs, but with null
values. The web UI will then create its `ReadAllocations` and
`WriteAllocations` fields by mapping from those IDs to the values in
`Allocations`, instead of flattening the map into a list.
2020-11-25 16:44:06 -05:00
Seth Hoenig
bda5049aa2 Merge pull request #9452 from hashicorp/f-e2e-print-consulacls-string
e2e: print consulacls scripts output as string
2020-11-25 15:06:48 -06:00
Seth Hoenig
a1976cbd05 e2e: print consulacls scripts output as string
The clean up in #8908 inadvertently caused the output from the scripts
involved in the Consul ACL bootstrap process to be printed as a big blob
of bytes, which is slightly less useful than the text version.
2020-11-25 15:03:33 -06:00
Mahmood Ali
6d57a1c69b use comment ignores (#9448)
Use targetted ignore comments for the cases where we are bound by
backward compatibility.

I've left some file based linters, especially when the file is riddled
with linter voilations (e.g. enum names), or if it's a property of the
file (e.g. package and file names).

I encountered an odd behavior related to RPC_REQUEST_RESPONSE_UNIQUE and
RPC_REQUEST_STANDARD_NAME.  Apparently, if they target a `stream` type,
we must separate them into separate lines so that the ignore comment
targets the type specifically.
2020-11-25 16:03:01 -05:00
Tim Gross
101ae734e8 csi/ui: show Node Only for volumes when controllers aren't required (#9416)
Plugin health for controllers should show "Node Only" in the UI only when both
conditions are true: controllers are not required, and no controllers have
registered themselves (0 expected controllers). This accounts for "monolith"
plugins which might register as both controllers and nodes but not necessarily
have `ControllerRequired = true` because they don't implement the Controller
RPC endpoints we need (this requirement was added in #7844)

This changeset includes the following fixes:

* Update the Plugins tab of the UI so that monolith plugins don't show "Node
  Only" once they've registered.
* Add the missing "Node Only" logic to the Volumes tab of the UI.
2020-11-25 14:50:33 -05:00
Mahmood Ali
8dc7cc0539 Merge pull request #9414 from hashicorp/b-tweak-buf-linter
Parameterize buf compatibility check
2020-11-25 12:19:10 -05:00
Tim Gross
c2aaa5179f CSI: fix transaction handling in state store (#9438)
When making updates to CSI plugins, the state store methods that have open
write transactions were querying the state store using the same methods used
by the CSI RPC endpoint, but these method creates their own top-level read
transactions. During concurrent plugin updates (as happens when a plugin job
is stopped), this can cause write skew in the plugin counts.

* Refactor the CSIPlugin query methods to have an implementation method that
accepts a transaction, which can be called with either a read txn or a write
txn.
* Refactor the CSIVolume query methods to have an implementation method that
accepts a transaction, which can be called with either a read txn or a write
txn.
* CSI volumes need to be "denormalized" with their plugins and (optionally)
allocations. Read-only RPC endpoints should take a snapshot so that we can
make multiple state store method calls with a consistent view.
2020-11-25 11:15:57 -05:00
Tim Gross
0019fac69d docs: enumerate required cgroups for exec driver 2020-11-25 09:41:37 -05:00
Mahmood Ali
edaa16589b honor task user when execing into raw_exec task (#9439)
Fix #9210 .

This update the executor so it honors the User when using nomad alloc exec. The bug was that the exec task didn't honor the init command when execing.
2020-11-25 09:34:10 -05:00
Tim Gross
c83352fde4 E2E: CSI driver provisioning (#9443)
* e2e/csi: wait longer for plugins to become healthy

Plugins are Docker containers, and as such sometimes we get delays in startup
due to pulling from the registry and this is a source of test flakiness. Give
the plugins a little longer to start up.

* e2e/csi: version bump for AWS EBS plugins
2020-11-25 09:05:22 -05:00
Seth Hoenig
289d91df2e Merge pull request #8743 from hashicorp/f-task_network_warning
Validate and document 0.12 mbits/network deprecations
2020-11-23 15:36:18 -06:00
Drew Bailey
ddb7e8299d Events/mv structs (#9430)
* move structs to structs/event.go to avoid import cycle
2020-11-23 14:01:10 -05:00
Seth Hoenig
1a327fbc21 docs: update changelog with group/task network labels fix 2020-11-23 12:56:54 -06:00
Seth Hoenig
01cd271229 nomad/structs: validate deprecated task.resource.network port labels
Enable users to submit jobs that still make use of the deprecated
task.resources.network stanza. Such jobs can be submitted, but
will emit a warning.
2020-11-23 12:40:40 -06:00
Tim Gross
9591b2b29d e2e: prevent Ubuntu startup race conditions (#9428)
The cloud-init configuration runs on boot, which can result in a race
condition between that and service startup. This has caused provisioning
failures because Nomad expects the userdata to have configured a host volume
directory. Diagnosing this was also compounded by a warning being fired by
systemd for the Nomad unit file.

* Update the location of the `StartLimitIntervalSec` field to it's
  post-systemd-230 location.
* Ensure that the weekly AMI build is up-to-date to reduce the risk of
  unexpected system software changes.
* Move the host volume to a directory we can set up at AMI build time rather
  than in userdata.
2020-11-23 12:29:08 -05:00
Seth Hoenig
d5a422e320 api: safely access legacy MBits field 2020-11-23 10:36:10 -06:00
Nick Ethier
7d1f294baf api: don't break public API 2020-11-23 10:36:10 -06:00
Nick Ethier
c2e75a3a91 vendor: sync api 2020-11-23 10:33:28 -06:00
Nick Ethier
5ffa75c1d3 remove references to default mbits 2020-11-23 10:32:13 -06:00
Nick Ethier
1c715a10b7 e2e: update jobs to use new network stanza format 2020-11-23 10:25:30 -06:00
Nick Ethier
f8aabc8bd2 command: use correct port mapping syntax in examples 2020-11-23 10:25:30 -06:00
Nick Ethier
1c14f69853 command: remove task network usage from init examples 2020-11-23 10:25:11 -06:00
Nick Ethier
b12d8a29f1 mock: add default host network 2020-11-23 10:11:00 -06:00