Commit graph

18288 commits

Author SHA1 Message Date
Michael Lange 20f209c4fb Use the AbortController provided by the fetch polyfill 2020-05-21 10:35:39 -07:00
Michael Lange 899d8266f4 Instrument jquery ajax method to see if it is getting called anywhere 2020-05-21 10:35:39 -07:00
Michael Lange d5e8c1ca8c Force the use of fetch despite jquery still being integrated 2020-05-21 10:35:39 -07:00
Buck Doyle b3164e50f7
Add test-timing comparison for UI PRs (#7929)
This runs ember-test-audit for UI PRs to compare how long
the tests take for the base vs the PR. It posts or updates
a comparison of times and test count.

It’s somewhat slow to report back as it runs the test suite
three times to even out variability in a shared environment.
If we end up being unhappy with that slowness, we could try
running the repetitions in parallel as well, but that would
involve more changes to ember-test-audit.
2020-05-21 11:41:13 -05:00
Michael Lange 2edd482a7c
Merge pull request #8024 from hashicorp/f-ui/csi-plugin-allocations
UI: CSI Plugin Allocations Page
2020-05-21 09:16:45 -07:00
Tim Gross aa8927abb4
volumes: return better error messages for unsupported task drivers (#8030)
When an allocation runs for a task driver that can't support volume mounts,
the mounting will fail in a way that can be hard to understand. With host
volumes this usually means failing silently, whereas with CSI the operator
gets inscrutable internals exposed in the `nomad alloc status`.

This changeset adds a MountConfig field to the task driver Capabilities
response. We validate this when the `csi_hook` or `volume_hook` fires and
return a user-friendly error.

Note that we don't currently have a way to get driver capabilities up to the
server, except through attributes. Validating this when the user initially
submits the jobspec would be even better than what we're doing here (and could
be useful for all our other capabilities), but that's out of scope for this
changeset.

Also note that the MountConfig enum starts with "supports all" in order to
support community plugins in a backwards compatible way, rather than cutting
them off from volume mounting unexpectedly.
2020-05-21 09:18:02 -04:00
Michael Lange e263d2821e Prevent sticky query params for plugin alloc filtering 2020-05-20 14:34:16 -07:00
Michael Lange 4588f2b5a3 Show the number of allocations in the the goto links on plugin detail 2020-05-20 14:22:47 -07:00
Tim Gross 72430a4e62
csi: don't pass volume claim releases thru GC eval (#8021)
Following the new volumewatcher in #7794 and performance improvements
to it that landed afterwards, there's no particular reason we should
be threading claim releases through the GC eval rather than writing an
empty `CSIVolumeClaimRequest` with the mode set to
`CSIVolumeClaimRelease`, just as the GC evaluation would do.

Also, by batching up these raft messages, we can reduce the amount of
raft writes by 1 and cross-server RPCs by 1 per volume we release
claims on.
2020-05-20 15:22:51 -04:00
Tim Gross 065fa7af8b
stats_hook: log normal shutdown condition as debug, not error (#8028)
The `stats_hook` writes an Error log every time an allocation becomes
terminal. This is a normal condition, not an error. A real error
condition like a failure to collect the stats is logged later. It just
creates log noise, and this is a particularly bad operator experience
for heavy batch workloads.
2020-05-20 10:28:30 -04:00
Tim Gross 4b4bf84d79
docs: notice to operators about script check timeouts (#8015)
The tasklet passes the timeout for the script check into the task
driver's `Exec`, and its up to the task driver to enforce that via a
golang `context.WithDeadline`. In practice, this deadline is started
before the task driver starts setting up the execution
environment (because we need it to do things like timeout Docker API
calls).

Under even moderate load, the time it takes to set up the execution
context for the script check regularly exceeds a full second or
two. This can cause script checks to unexpected timeout or even never
execute if the context expires before the task driver ever gets a
chance to `execve`.

This changeset adds a notice to operators about setting script check
timeouts with plenty of padding and what to monitor for problems.
2020-05-20 10:28:14 -04:00
Tim Gross 3902709c0a
csi: check for empty arguments on CSI endpoint (#8027)
Some of the CSI RPC endpoints were missing validation that the ID or
the Volume definition was present. This could result in nonsense
`CSIVolume` structs being written to raft during registration. This
changeset corrects that bug and adds validation checks to present
nicer error messages to operators in some other cases.
2020-05-20 10:22:24 -04:00
James Rasell 6db1bc69d0
Merge pull request #8013 from hashicorp/gh-8008
api: return custom error if API attempts to decode empty body.
2020-05-20 09:55:05 +02:00
James Rasell 779d58397a
Merge pull request #8007 from hashicorp/volumes-docs-csi-put-blocking
docs: update CSI PUT operation blocking query support yes->no.
2020-05-20 09:38:38 +02:00
Michael Lange 360a0dfc08 Test coverage for the plugin allocations page 2020-05-19 19:22:12 -07:00
Michael Lange e57d33a6b1 Test coverage for the limited alloc tables and goto links 2020-05-19 18:01:42 -07:00
Michael Lange f683529b29 Limit the length of the alloc tables on the plugin overview page 2020-05-19 17:30:00 -07:00
Michael Lange 993cbe6bdb Add a title to the plugin/allocations page
Typically these filterable list views don't have titles beyond the
breadcrumbs, but since this page has no search bar, the title really
helps balance it out.
2020-05-19 17:29:05 -07:00
Michael Lange 98933e12a0 Expose existing qp serialization util as a helper 2020-05-19 17:28:23 -07:00
Mahmood Ali 1bd4496feb
Merge pull request #8020 from hashicorp/vendor-hcl2-20200519
Update hcl2 vendoring
2020-05-19 16:25:14 -04:00
Mahmood Ali 751f337f1c Update hcl2 vendoring
The hcl2 library has moved from http://github.com/hashicorp/hcl2 to https://github.com/hashicorp/hcl/tree/hcl2.

This updates Nomad's vendoring to start using hcl2 library.  Also
updates some related libraries (e.g. `github.com/zclconf/go-cty/cty` and
`github.com/apparentlymart/go-textseg`).
2020-05-19 15:00:03 -04:00
Charlie Voiselle bde545b4db
Merge pull request #7994 from shantanugadgil/patch-3
update docs to mention spread algorithm
2020-05-19 14:49:19 -04:00
Shantanu Gadgil d5fc981636
Merge branch 'master' into patch-3 2020-05-20 00:16:43 +05:30
Charlie Voiselle 31c71767ec
Merge pull request #7870 from hashicorp/d-fix-version-typo
[docs] Fix version typo
2020-05-19 14:09:53 -04:00
Charlie Voiselle e63346560c
Interlinking API, FAQ, and Config
Creating a FAQ question to provide a home for additional context around
bootstrapping. Linking from API page to `default_server_config`
attribute. Added sample API response to to discuss "Updated: false"
2020-05-19 13:51:47 -04:00
Michael Lange af6846e10e
Merge pull request #7986 from hashicorp/missing-changelog-entry
Add missing bug fix from the changelog for 0.11.2
2020-05-19 09:20:23 -07:00
Michael Lange 7199570d2f
Merge pull request #8006 from hashicorp/f-ui/csi-node-only-support
UI: CSI node only support
2020-05-19 09:08:30 -07:00
Seth Hoenig a6436b5ac6
Merge pull request #8003 from hashicorp/c-use-taskkind
consul/connect: use task kind to get service name
2020-05-19 08:51:21 -06:00
James Rasell ae0fb98c6b
api: return custom error if API attempts to decode empty body. 2020-05-19 15:46:31 +02:00
Charlie Voiselle 15d6f0e80e
Adding info about bootstrap 2020-05-19 09:14:17 -04:00
Michael Lange e611b6fcb9 Add filtering to the plugin allocations page 2020-05-18 23:55:52 -07:00
James Rasell 7bd35dd11c
docs: update CSI PUT operation blocking query support yes->no. 2020-05-19 08:42:48 +02:00
Michael Lange 02ca35e718 Scaffold the plugin allocations page 2020-05-18 23:36:12 -07:00
Michael Lange 3c6983370c Add a subnav to the plugin page 2020-05-18 23:24:02 -07:00
Michael Lange 05da9a51b7 Fix scrunched availability chart bug on double chart layout 2020-05-18 22:48:55 -07:00
Michael Lange c68b737fb5 Add plugin/allocations route 2020-05-18 22:48:23 -07:00
Michael Lange c60b987729
Merge pull request #7983 from spuder/patch-3
Fix typo in changelog
2020-05-18 17:27:35 -07:00
Michael Lange 22cc9bec74 Work around a mirage bug 2020-05-18 17:23:55 -07:00
Michael Lange 49724673d4 Test coverage for node only view of the plugin detail page 2020-05-18 17:23:54 -07:00
Michael Lange eabac917f1 Test coverage for the node-only change to the list view 2020-05-18 15:30:00 -07:00
Michael Lange af5ac78eba Add availability gauges to the plugin page object 2020-05-18 15:30:00 -07:00
Michael Lange 19916dc028 Handle node-only views 2020-05-18 15:30:00 -07:00
Mahmood Ali fcb98d2c54
Merge pull request #8005 from hashicorp/je.fix-shell-snippets
Fix shell-session snippet error
2020-05-18 18:15:09 -04:00
Jeff Escalante 636f174f48
fix shell-session snippet error 2020-05-18 16:53:06 -04:00
Seth Hoenig f6c8db8a8a consul/connect: use task kind to get service name
Fixes #8000

When requesting a Service Identity token from Consul, use the TaskKind
of the Task to get at the service name associated with the task. In
the past using the TaskName worked because it was generated as a sidecar
task with a name that included the service. In the Native context, we
need to get at the service name in a more correct way, i.e. using the
TaskKind which is defined to include the service name.
2020-05-18 13:46:00 -06:00
Charlie Voiselle 2dd34efacc
Alternative treatment
A variation of the treatment that surfaces "spread scheduling" in the example while referring to the API docs as canonical for this setting.
2020-05-18 09:51:16 -04:00
Chris Baker a6a8c385ab
Merge pull request #7992 from hashicorp/docs-website-fix
docs: server configuration metadata was missing a dash
2020-05-18 08:47:40 -05:00
James Rasell 6910c61839
Merge pull request #7995 from hashicorp/tidy-go-mod-api
api: tidy Go module to remove unused modules.
2020-05-18 14:53:19 +02:00
Shantanu Gadgil 32046d6f18
Update server.mdx 2020-05-18 17:54:27 +05:30
Tim Gross 0f1946d395
csi: improve plugin error messages and volume validation (#7984)
Some CSI plugins don't return much for errors over the gRPC socket
above and beyond the bare minimum error codes. This changeset improves
the operator experience by unpacking the error codes when available
and wrapping the error with some user-friendly direction.

Improving these errors also revealed a bad comparison with
`require.Error` when `require.EqualError` should be used in the test
code for plugin errors. This defect in turn was hiding a bug in volume
validation where we're being overly permissive in allowing mount
flags, which is now fixed.
2020-05-18 08:23:17 -04:00