Commit Graph

18046 Commits

Author SHA1 Message Date
Michael Lange
70fe2b3484 Add a subnav to the volumes page 2020-05-06 17:21:43 -07:00
Michael Lange
572cf0d467 Update plugin model and serializer to match final API 2020-05-06 17:21:42 -07:00
Michael Lange
83baebc841 Add constraints table to the volume detail page 2020-05-06 17:21:42 -07:00
Tim Gross
9990650b52 periodic GC for CSI plugins (#7878)
This changeset implements a periodic garbage collection of unused CSI
plugins. Plugins are self-cleaning when the last allocation for a
plugin is stopped, but this feature will cover any missing edge cases
and ensure that upgrades from 0.11.0 and 0.11.1 get any stray plugins
cleaned up.
2020-05-06 16:49:12 -04:00
Buck Doyle
d87fe88be7 Migrate page objects away from jQuery (#7843)
This is part of #7834’s jQuery removal goal. It addresses a couple of jQuery-related deprecation warnings and also uses “native events mode” for ember-cli-page-object, which is needed so it doesn’t have to use jQuery via the Ember global.
2020-05-06 15:14:12 -05:00
Jeff Escalante
edc8454819 update to latest nextjs-scripts 2020-05-06 16:12:34 -04:00
Jeff Escalante
6f3a00b2ce fix some highlighting issues 2020-05-06 16:12:34 -04:00
Jeff Escalante
73a1b12148 update deps 2020-05-06 16:12:34 -04:00
Jeff Escalante
e219658558 switch themes 2020-05-06 16:12:34 -04:00
Jeff Escalante
cb57d44197 initial stab at prism highlighting 2020-05-06 16:12:34 -04:00
Buck Doyle
bd8d418705 UI: Remove Ember Freestyle (#7839)
This completes the migration to Storybook by replacing the colour palette and typeface components that I left out.
2020-05-06 15:11:15 -05:00
Michael Lange
d9aaaa0107 Merge pull request #7855 from hashicorp/b-ui/alloc-wrong-reserved-resources
UI: Make allocation reference own task group instead of job's task group when job versions don't match
2020-05-06 10:08:37 -07:00
Mahmood Ali
16d076d542 Merge pull request #7874 from hashicorp/b-ui/node-status-running-allocs
ui: only count running allocations in client view
2020-05-06 12:12:17 -04:00
Tim Gross
5d03307c63 reorder volume claim batch request raft message (#7871)
For backwards compatibility during upgrades, new raft message types
need to come at the end of the enum.
2020-05-06 08:57:51 -04:00
Mahmood Ali
2ca8758494 ui: only count running allocations in client view
In the client view list, only show running allocations count for each
client, rather than include already completed tasks.

This is done for two reasons:

First, consitency with the CLI: `nomad node status --allocs` only
shows running allocs.

Second, and more importantly, the count is useful to estimate how loaded
the clients are.  Allocs that have completed (but not GCed yet) have
very little value to operators.
2020-05-05 21:31:58 -04:00
Tim Gross
1531db809f csi: fix plugin counts on node update (#7844)
In this changeset:

* If a Nomad client node is running both a controller and a node
  plugin (which is a common case), then if only the controller or the
  node is removed, the plugin was not being updated with the correct
  counts.
* The existing test for plugin cleanup didn't go back to the state
  store, which normally is ok but is complicated in this case by
  denormalization which changes the behavior. This commit makes the
  test more comprehensive.
* Set "controller required" when plugin has `PUBLISH_READONLY`. All
  known controllers that support `PUBLISH_READONLY` also support
  `PUBLISH_UNPUBLISH_VOLUME` but we shouldn't assume this.
* Only create plugins when the allocs for those plugins are
  healthy. If we allow a plugin to be created for the first time when
  the alloc is not healthy, then we'll recreate deleted plugins when
  the job's allocs all get marked terminal.
* Terminal plugin alloc updates should cleanup the plugin. The client
  fingerprint can't tell if the plugin is unhealthy intentionally (for
  the case of updates or job stop). Allocations that are
  server-terminal should delete themselves from the plugin and trigger
  a plugin self-GC, the same as an unused node.
2020-05-05 15:39:57 -04:00
Tim Gross
1585d343f1 csi: fix mount validation (#7869)
Several of the CSI `VolumeCapability` methods return pointers, which
we were then comparing to pointers in the request rather than
dereferencing them and comparing their contents.

This changeset does a more fine-grained comparison of the request vs
the capabilities, and adds better error messaging.
2020-05-05 15:13:07 -04:00
Drew Bailey
0c86b7a084 Merge pull request #7867 from hashicorp/license-command-updates
update license command output to reflect api changes
2020-05-05 14:10:22 -04:00
Tim Gross
058a8daac3 docstring improvements and typo fixes (#7862) 2020-05-05 10:30:50 -04:00
Drew Bailey
d5f99a06e2 update license command output to reflect api changes 2020-05-05 10:28:58 -04:00
Juan Larriba
65f09ed119 Run Linux Images (LCOW) and Windows Containers side by side (#7850)
Makes it possible to run Linux Containers On Windows with Nomad alongside Windows Containers. Fingerprint prevents only to run Nomad in Windows 10 with Linux Containers
2020-05-04 13:08:47 -04:00
Tim Gross
b3d43b8e66 volumewatcher: remove spurious nil-check (#7858)
The nil-check here is left-over from an earlier approach that didn't
get merged. It doesn't do anything for us now as we can't ever pass it
`nil` and if we leave it in the `getVolume` call it guards will panic
anyways.
2020-05-04 12:28:32 -04:00
Mahmood Ali
a763cdc3ea Merge pull request #7856 from Renerick/patch-1
Fix URL schema in `drain` documentation
2020-05-03 13:51:05 -04:00
Denis Palashevskiy
82b9000403 Fix URL schema in drain documentation 2020-05-03 20:50:40 +04:00
Michael Schurter
b8fc23f00d Merge pull request #7846 from hashicorp/changli0617-patch-1
Update _app.js for Nomad Virtual Day
2020-05-01 14:33:23 -07:00
Michael Lange
59636adace Add embedded task group to allocation to reference when allocation is historical 2020-05-01 14:30:02 -07:00
Michael Lange
113cd4c6ef Stabilize job and allocation job versions in fixtures 2020-05-01 14:29:24 -07:00
Michael Lange
2c82dc9060 Comment why the allocation has to be reloaded 2020-05-01 14:27:53 -07:00
Mahmood Ali
c7f58e5940 Merge pull request #7851 from hashicorp/spread-configuration-followup
Follow up fix for spread
2020-05-01 13:48:31 -04:00
Mahmood Ali
60aa516db8 missed fixing one invocation 2020-05-01 13:38:46 -04:00
Tim Gross
36e4b74de9 e2e: csi test can purge target job (#7823) 2020-05-01 13:25:50 -04:00
Mahmood Ali
f5775de313 Merge pull request #7810 from hashicorp/spread-configuration
spread scheduling algorithm
2020-05-01 13:15:19 -04:00
Mahmood Ali
9962b9fe7a changelog and fix typo 2020-05-01 13:14:20 -04:00
Mahmood Ali
5078e0cfed tests and some clean up 2020-05-01 13:13:30 -04:00
Charlie Voiselle
1af6a2adf1 Wiring algorithm to scheduler calls 2020-05-01 13:13:29 -04:00
Charlie Voiselle
6571ccefbc Add SchedulerAlgorithm to SchedulerConfig 2020-05-01 13:13:29 -04:00
Lang Martin
3477f2e87a client/heartbeatstop: don't store client state, use timeout
In order to minimize this change while keeping a simple version of the
behavior, we set `lastOk` to the current time less the intial server
connection timeout. If the client starts and never contacts the
server, it will stop all configured tasks after the initial server
connection grace period, on the assumption that we've been out of
touch longer than any configured `stop_after_client_disconnect`.

The more complex state behavior might be justified later, but we
should learn about failure modes first.
2020-05-01 12:35:49 -04:00
Lang Martin
7405961144 client/heartbeatstop: destroy allocs when disconnected from servers
- track lastHeartbeat, the client local time of the last successful
  heartbeat round trip
- track allocations with `stop_after_client_disconnect` configured
- trigger allocation destroy (which handles cleanup)
- restore heartbeat/killable allocs tracking when allocs are recovered from disk
- on client restart, stop those allocs after a grace period if the
  servers are still partioned
2020-05-01 12:35:49 -04:00
Drew Bailey
e313694c18 Merge pull request #7847 from hashicorp/ent-license-404
temporarily test for 404 until endpoint is ready
2020-05-01 11:31:10 -04:00
Drew Bailey
a5d75f71a6 temporarily test for 404 until endpoint is ready 2020-05-01 11:24:37 -04:00
Drew Bailey
1bb731bdc5 Merge pull request #7778 from hashicorp/license-cli
License cli
2020-05-01 08:51:40 -04:00
changli0617
e223f11a3f Update _app.js 2020-04-30 15:25:43 -07:00
Michael Schurter
cbcd3eb06a Merge pull request #7730 from hashicorp/b-reserved-scoring
core: fix node reservation scoring
2020-04-30 14:48:36 -07:00
Michael Schurter
e3cba0c5be Merge branch 'master' into b-reserved-scoring 2020-04-30 14:48:14 -07:00
Michael Schurter
26d34f088e Update website/pages/docs/upgrade/upgrade-specific.mdx
Co-authored-by: Alex Dadgar <alex@hashicorp.com>
2020-04-30 14:47:12 -07:00
Tim Gross
f592dd9021 csi: check returned volume capability validation (#7831)
This changeset corrects handling of the `ValidationVolumeCapabilities`
response:

* The CSI spec for the `ValidationVolumeCapabilities` requires that
  plugins only set the `Confirmed` field if they've validated all
  capabilities. The Nomad client improperly assumes that the lack of a
  `Confirmed` field should be treated as a failure. This breaks the
  Azure and Linode block storage plugins, which don't set this
  optional field.

* The CSI spec also requires that the orchestrator check the validation
  responses to guard against older versions of a plugin reporting
  "valid" for newer fields it doesn't understand.
2020-04-30 17:12:32 -04:00
Tim Gross
5731be4b79 csi: restore long timeout for controller plugins (#7840)
During MVP development, we reduced the timeout for controller plugins
to avoid long hangs in GC workers. But now that this work has been
moved to the volume watcher, we can restore the original timeout which
is better suited for the characteristic timescales of some cloud
provider APIs and better matches the behavior of k8s.
2020-04-30 17:12:05 -04:00
Tim Gross
610e0a6762 csi: ensure Read/WriteAllocs aren't released early (#7841)
We should only remove the `ReadAllocs`/`WriteAllocs` values for a
volume after the claim has entered the "ready to free"
state. The volume will eventually be released as expected. But
querying the volume API will show the volume is released before the
controller unpublish has finished and this can cause a race with
starting new jobs.

Test updates are to cover cases where we're dropping claims but not
running through the whole reaping process.
2020-04-30 17:11:31 -04:00
Drew Bailey
5372a52223 properly format license output 2020-04-30 14:46:26 -04:00
Drew Bailey
105345ab60 allow test to check if server is enterprise 2020-04-30 14:46:21 -04:00