Commit Graph

17762 Commits

Author SHA1 Message Date
Buck Doyle
b7999b31fb Add space 2020-04-03 12:21:44 -05:00
Mahmood Ali
cad5261ec1 ui: send authentication ws handshake
Have the UI send the authentication websocket handshake message.
2020-04-03 11:49:22 -04:00
Mahmood Ali
67880310a1 backend: support WS authentication handshake in alloc/exec
The javascript Websocket API doesn't support setting custom headers
(e.g. `X-Nomad-Token`).  This change adds support for having an
authentication handshake message: clients can set `ws_handshake` URL
query parameter to true and send a single handshake message with auth
token first before any other mssage.

This is a backward compatible change: it does not affect nomad CLI path, as it
doesn't set `ws_handshake` parameter.
2020-04-03 11:18:54 -04:00
Seth Hoenig
85fd53cbd1 Merge pull request #7611 from hashicorp/docs-tls-consul-in-changelog
docs: add connect with TLS consul in changelog
2020-04-03 09:01:50 -06:00
Seth Hoenig
b7614b183a docs: add connect w/ tls consul in changelog 2020-04-03 08:57:39 -06:00
Seth Hoenig
222886e488 Merge pull request #7602 from hashicorp/b-connect-bootstrap-tls-config
connect: set consul TLS options on envoy bootstrap
2020-04-03 08:50:36 -06:00
Tim Gross
17ffbde52c e2e: remove gometa from e2eutils (#7610) 2020-04-03 10:22:22 -04:00
Drew Bailey
e577dfe24f Merge pull request #7494 from hashicorp/update-audit-docs
make placement of filter and sinks stanzas clearer
2020-04-03 09:04:49 -04:00
Mahmood Ali
dae4dd1e3b Merge pull request #7608 from hashicorp/b-config-lower-case
Tweak declared hcl key casing in structs
2020-04-03 08:59:31 -04:00
Drew Bailey
43fb779a19 Update website/pages/docs/configuration/audit.mdx
Co-Authored-By: Mahmood Ali <mahmood@hashicorp.com>
2020-04-03 08:53:38 -04:00
Drew Bailey
1a782ba89a make placement of filter and sinks stanzas clearer 2020-04-03 08:43:05 -04:00
Mahmood Ali
20d725c06c Use lowercase for hcl keys
This is not a change in behavior, hcl key matching is case insensitive
as desmonstrated in `command.agent/TestConfig_Parse`
2020-04-03 07:56:00 -04:00
Mahmood Ali
179fefc8b7 agent config parsing tests for scheduler config 2020-04-03 07:54:32 -04:00
Seth Hoenig
cd21586846 Merge pull request #7440 from hashicorp/docs-connect-expose
docs: add documentation for proxy.expose configuration
2020-04-02 16:51:24 -06:00
Seth Hoenig
5d82951cb6 docs: add exposed TG service check examples to expose docs 2020-04-02 16:42:38 -06:00
Tim Gross
253a83e245 csi: internals docs (#7522)
Summarizes the internal RFCs for plugins and volume lifecycles.
2020-04-02 16:05:26 -04:00
Tim Gross
414caf76e5 CSI: move node unmount to server-driven RPCs (#7596)
If a volume-claiming alloc stops and the CSI Node plugin that serves
that alloc's volumes is missing, there's no way for the allocrunner
hook to send the `NodeUnpublish` and `NodeUnstage` RPCs.

This changeset addresses this issue with a redesign of the client-side
for CSI. Rather than unmounting in the alloc runner hook, the alloc
runner hook will simply exit. When the server gets the
`Node.UpdateAlloc` for the terminal allocation that had a volume claim,
it creates a volume claim GC job. This job will made client RPCs to a
new node plugin RPC endpoint, and only once that succeeds, move on to
making the client RPCs to the controller plugin. If the node plugin is
unavailable, the GC job will fail and be requeued.
2020-04-02 16:04:56 -04:00
Buck Doyle
7c1bc8c0c0 UI: Fix confirmation position for right-aligned TSBs (#7590)
Without this, the confirmation text was extending beyond the
edge of the page.
2020-04-02 11:58:29 -05:00
Nick Ethier
054508ac4f Merge pull request #7594 from hashicorp/f-connect-lifecycle
connect: set task lifecycle config for injected sidecar task
2020-04-02 12:51:01 -04:00
Michael Lange
dae5c3f4c9 Merge pull request #7592 from hashicorp/b-ui/csi-flaky-test
UI: Fix flaky Volume serializer test
2020-04-02 09:32:17 -07:00
Seth Hoenig
fb0bd3c25f connect: set consul TLS options on envoy bootstrap
Fixes #6594 #6711 #6714 #7567

e2e testing is still TBD in #6502

Before, we only passed the Nomad agent's configured Consul HTTP
address onto the `consul connect envoy ...` bootstrap command.
This meant any Consul setup with TLS enabled would not work with
Nomad's Connect integration.

This change now sets CLI args and Environment Variables for
configuring TLS options for communicating with Consul when doing
the envoy bootstrap, as described in
https://www.consul.io/docs/commands/connect/envoy.html#usage
2020-04-02 10:30:50 -06:00
Tim Gross
ab8c0e718d e2e: have TF write-out HCL for CSI volume registration (#7599) 2020-04-02 12:16:43 -04:00
Lang Martin
4b070e8e18 csi: volume validate namespace (#7587)
* nomad/state/state_store: enforce that the volume namespace exists

* nomad/csi_endpoint_test: a couple of broken namespaces now

* nomad/csi_endpoint_test: one more test

* nomad/node_endpoint_test: use structs.DefaultNamespace

* nomad/state/state_store_test: use DefaultNamespace
2020-04-02 10:13:41 -04:00
Nick Ethier
9e0d627e43 lint: gofmt 2020-04-01 21:23:47 -04:00
Nick Ethier
b003393cc5 connect: set task lifecycle config for injected sidecar task
fixes #7593
2020-04-01 21:19:41 -04:00
Michael Lange
f6ed101740 Fix flaky serializer test 2020-04-01 14:54:05 -07:00
Charlie Voiselle
df7839fe02 Merge pull request #7561 from hashicorp/docs-link2tdguide
[docs] Adding link to learn track
2020-04-01 17:53:18 -04:00
Mahmood Ali
87fd05a680 Merge pull request #7591 from hashicorp/website-release-0.11.0-beta2
website: link to 0.11.0-beta2 release
2020-04-01 17:47:08 -04:00
Mahmood Ali
02f6a7f8fc website: link to 0.11.0-beta2 release 2020-04-01 17:45:26 -04:00
Chris Baker
d3e7288334 Merge pull request #7572 from hashicorp/f-7422-scaling-events
finalizing scaling API work
2020-04-01 13:49:22 -05:00
Mike Wickett
06ebf0c50f Merge pull request #7586 from hashicorp/mw.update-netlify-redirects
website: update Netlify redirects syntax
2020-04-01 14:40:02 -04:00
Chris Baker
415eafe133 job_endpoint: fixed bad test 2020-04-01 18:11:58 +00:00
Seth Hoenig
7c4e697dcc Merge pull request #7588 from hashicorp/b-unbreak-connect-proxy-nil
connect: fix bug where absent connect.proxy stanza needs default config
2020-04-01 11:34:59 -06:00
Chris Baker
91a9e9cd00 Merge branch 'f-7422-scaling-events' of github.com:hashicorp/nomad into f-7422-scaling-events 2020-04-01 17:28:50 +00:00
Chris Baker
742948e724 added indices to the job scaling events, so we could properly do
blocking queries on the job scaling status
2020-04-01 17:28:19 +00:00
Seth Hoenig
98db449208 connect: fix bug where absent connect.proxy stanza needs default config
In some refactoring, a bug was introduced where if the connect.proxy
stanza in a submitted job was nil, the default proxy configuration
would not be initialized with default values, effectively breaking
Connect.

      connect {
        sidecar_service {} # should work
      }

In contrast, by setting an empty proxy stanza, the config values would
be inserted correctly.

      connect {
        sidecar_service {
	  proxy {} # workaround
	}
      }

This commit restores the original behavior, where having a proxy
stanza present is not required.

The unit test for this case has also been corrected.
2020-04-01 11:19:32 -06:00
Chris Baker
01f0656f95 Update nomad/state/state_store.go
Co-Authored-By: Drew Bailey <2614075+drewbailey@users.noreply.github.com>
2020-04-01 11:56:12 -05:00
Chris Baker
026245b185 Update nomad/state/state_store.go
Co-Authored-By: Drew Bailey <2614075+drewbailey@users.noreply.github.com>
2020-04-01 11:56:01 -05:00
Chris Baker
56e5494e48 Update nomad/job_endpoint.go
Co-Authored-By: Drew Bailey <2614075+drewbailey@users.noreply.github.com>
2020-04-01 11:55:55 -05:00
Chris Baker
10ffa7eee5 scaling api: more testing around the scaling events api 2020-04-01 16:39:23 +00:00
Mike Wickett
389d5711dc website: update netlify redirects syntax 2020-04-01 12:33:34 -04:00
Buck Doyle
88ff339f4d CI: add xUnit reporting for UI tests (#7585)
This surfaces test failures more clearly on CircleCI by adding
testem-multi-reporter to report both via the default TAP reporter
as well as an xUnit reporter whose output is stored as an artefact.
2020-04-01 11:19:44 -05:00
Chris Baker
f23695e07a adding raft and state_store support to track job scaling events
updated ScalingEvent API to record "message string,error bool" instead
of confusing "reason,error *string"
2020-04-01 16:15:14 +00:00
Tim Gross
ec457bf61e set safe default for CSI plugin MaxVolumes (#7583) 2020-04-01 11:08:55 -04:00
Tim Gross
245a4c067a hclfmt test fixtures (#7584) 2020-04-01 10:48:28 -04:00
Seth Hoenig
44f884eb54 docs: add documentation for proxy.expose configuration
This changeset adds documentation changes for the new
`proxy.expose` stanza as well as the `check.expose` parameter.

The examples are centered around proposed changes for the "countdash"
`dashboard-service` in [demo-consul-101](github.com/hashicorp/demo-consul-101/pull/6).
The dashboard service will now serve two additonal endpoints

- `/health/api`
- `/metrics`

which should serve nicely as expose-able paths.
2020-04-01 08:19:21 -06:00
Buck Doyle
502d2734ce UI: Add localStorage persistence of exec command (#7563)
This closes #7469. Trivial thanks to localStorageProperty! 🥳
2020-04-01 08:08:42 -05:00
James Rasell
4b1d68019e Merge pull request #7558 from hashicorp/b-ensure-correct-plugin-version-mapping
plugin: ensure plugin loader maps correct API version to type.
2020-04-01 12:34:24 +02:00
Mahmood Ali
6cd6af4ebc Merge pull request #7578 from hashicorp/b-fix-structs-generation
fix codegen for ugorji/go
2020-03-31 21:33:27 -04:00
Mahmood Ali
e625f07b57 fix codegen for ugorji/go
When generating ugorji/go package, we should use
github.com/hashicorp/go-msgpack/codec instead.

Also fix the reference for codegen_generated
2020-03-31 21:30:21 -04:00