Commit Graph

22206 Commits

Author SHA1 Message Date
Charlie Voiselle
6e61606eba Make number of scheduler workers reloadable (#11593)
## Development Environment Changes
* Added stringer to build deps

## New HTTP APIs
* Added scheduler worker config API
* Added scheduler worker info API

## New Internals
* (Scheduler)Worker API refactor—Start(), Stop(), Pause(), Resume()
* Update shutdown to use context
* Add mutex for contended server data
    - `workerLock` for the `workers` slice
    - `workerConfigLock` for the `Server.Config.NumSchedulers` and
      `Server.Config.EnabledSchedulers` values

## Other
* Adding docs for scheduler worker api
* Add changelog message

Co-authored-by: Derek Strickland <1111455+DerekStrickland@users.noreply.github.com>
2022-01-06 11:56:13 -05:00
Michael Schurter
d5e8081006 Merge pull request #11744 from hashicorp/b-node-copy
Fix Node.Copy()
2022-01-05 17:01:53 -08:00
Jai
38a375996d Merge pull request #11590 from hashicorp/e-ui/breadcrumbs-service
Refactor:  Breadcrumbs Service
2022-01-05 17:46:48 -05:00
Tim Gross
0ff0fa1ff2 csi: reap unused volume claims at leadership transitions (#11776)
When `volumewatcher.Watcher` starts on the leader, it starts a watch
on every volume and triggers a reap of unused claims on any change to
that volume. But if a reaping is in-flight during leadership
transitions, it will fail and the event that triggered the reap will
be dropped. Perform one reap of unused claims at the start of the
watcher so that leadership transitions don't drop this event.
2022-01-05 11:40:20 -05:00
Arkadiusz
aa21628488 Fix log streaming missing frames (#11721)
Perform one more read after receiving cancel when streaming file from the allocation API
2022-01-04 14:07:16 -05:00
James Rasell
500cef53cb Merge pull request #11762 from hashicorp/b-gh-11681
docs: add 1.2.0 HCLv2 strict parsing upgrade note.
2022-01-04 09:30:09 +01:00
Tim Gross
3320a297df docs: fix attribute name for java version detection (#11764) 2022-01-03 16:50:25 -05:00
James Rasell
b34e652b7d docs: add 1.2.0 HCLv2 strict parsing upgrade note. 2022-01-03 15:41:18 +00:00
Tim Gross
fe7a43e448 docs/tests for multiple HTTP address config (#11760) 2022-01-03 10:17:13 -05:00
Kevin Schoonover
0873e08af1 agent: support multiple http address in addresses.http (#11582) 2022-01-03 09:33:53 -05:00
Tim Gross
78d3f70908 api: paginate deployment list and accept wildcard namespace (#11743)
Add `per_page` and `next_token` handling to `Deployment.List` RPC, and
allow the use of a wildcard namespace for namespace filtering.
2022-01-03 08:36:02 -05:00
Jeff Escalante
578a9a6166 add enterprise downloads page (#11750) 2021-12-25 14:42:12 -05:00
Michael Schurter
e1c8d58cea do not initialize copy's slice if nil in original 2021-12-23 16:40:35 -08:00
Noel Quiles
6ca15bea1e website: Upgrade deps (#11709)
* Update @hashicorp/react-subnav

* Update <Subnav /> & <ProductDownloadsPage />
2021-12-23 16:18:57 -05:00
Michael Schurter
0fdf624eda add changelog for Node.Copy fix 2021-12-23 12:34:05 -08:00
Michael Schurter
ea39088f0a core: fix DNS and CPU Core copying 2021-12-23 12:28:19 -08:00
Michael Schurter
fd1c71dc8d core: match struct field order in Copy() 2021-12-23 12:27:39 -08:00
Jai Bhagat
3bdf6613ef refact: clean-up breadcrumb invocations 2021-12-23 12:41:52 -05:00
Jai Bhagat
b25f5ff89e fix: remove unecessary breadcrumb 2021-12-23 12:33:15 -05:00
Tim Gross
631db25e4a task runner: fix goroutine leak in prestart hook (#11741)
The task runner prestart hooks take a `joincontext` so they have the
option to exit early if either of two contexts are canceled: from
killing the task or client shutdown. Some tasks exit without being
shutdown from the server, so neither of the joined contexts ever gets
canceled and we leak the `joincontext` (48 bytes) and its internal
goroutine. This primarily impacts batch jobs and any task that fails
or completes early such as non-sidecar prestart lifecycle tasks.
Cancel the `joincontext` after the prestart call exits to fix the
leak.
2021-12-23 11:50:51 -05:00
Tim Gross
000354a70e deps: upgrade go-getter to 1.5.10 (#11740)
The `go-getter` library was updated to 1.5.9 in #11481 to pick up a
bug fix for automatically unpacking uncompressed tar archives. But
this version had a regression in git `ref` param behavior and was
patched in 1.5.10.
2021-12-23 10:37:52 -05:00
Luiz Aoqui
5e112a87d8 fix host network reserved port fingerprint (#11728) 2021-12-22 15:29:54 -05:00
Tim Gross
e32f0248ab scheduler: tooling for scheduler benchmarking (#11725)
Adds a package `scheduler/benchmarks` with some examples of profiling
and benchmarking the scheduler, along with helpers for loading
real-world data for profiling.

This tooling comes out of work done for #11712. These test benchmarks
have not been added to CI because these particular profiles are mostly
examples and the runs will add an excessive amount of time to CI runs
for code that rarely changes in a way that has any chance of impacting
performance.
2021-12-22 10:05:44 -05:00
Alex Carpenter
2189a4c55f Merge pull request #11669 from hashicorp/ac.home-redirect
fix: redirects website `/home` to `/`
2021-12-22 09:43:05 -05:00
Luiz Aoqui
5abe0078ca api: support namespace wildcard in CSI volume list (#11724) 2021-12-21 17:19:45 -05:00
Shishir
f2a37a0a03 Add support for setting pids_limit in docker plugin config. (#11526) 2021-12-21 13:31:34 -05:00
Tim Gross
2d4e5b8fe9 scheduler: fix quadratic performance with spread blocks (#11712)
When the scheduler picks a node for each evaluation, the
`LimitIterator` provides at most 2 eligible nodes for the
`MaxScoreIterator` to choose from. This keeps scheduling fast while
producing acceptable results because the results are binpacked.

Jobs with a `spread` block (or node affinity) remove this limit in
order to produce correct spread scoring. This means that every
allocation within a job with a `spread` block is evaluated against
_all_ eligible nodes. Operators of large clusters have reported that
jobs with `spread` blocks that are eligible on a large number of nodes
can take longer than the nack timeout to evaluate (60s). Typical
evaluations are processed in milliseconds.

In practice, it's not necessary to evaluate every eligible node for
every allocation on large clusters, because the `RandomIterator` at
the base of the scheduler stack produces enough variation in each pass
that the likelihood of an uneven spread is negligible. Note that
feasibility is checked before the limit, so this only impacts the
number of _eligible_ nodes available for scoring, not the total number
of nodes.

This changeset sets the iterator limit for "large" `spread` block and
node affinity jobs to be equal to the number of desired
allocations. This brings an example problematic job evaluation down
from ~3min to ~10s. The included tests ensure that we have acceptable
spread results across a variety of large cluster topologies.
2021-12-21 10:10:01 -05:00
Jai Bhagat
c1d292041d chore: clean-up merge conflict after rebase 2021-12-21 07:52:06 -05:00
Jai Bhagat
4d39d887d3 fix: add ember-a11y-testing-audit-call 2021-12-21 07:47:22 -05:00
Jai Bhagat
92fafca000 styling: fix opacity for last child in the list 2021-12-21 07:47:06 -05:00
Jai Bhagat
1a2914b9fe fix: test specs should expect to receive breadcrumb titles 2021-12-21 07:47:06 -05:00
Jai Bhagat
ed49d59ffb style: centering and spacing for titled breadcrumbs 2021-12-21 07:47:05 -05:00
Jai Bhagat
10db60edf6 feat: handle title behavior for job breadcrumb 2021-12-21 07:47:05 -05:00
Jai Bhagat
e1a5760093 refact: add title to breadcrumb generator
All breadcrumbs do not need a title property because some views
drill down by using a tab-based UI (e.g. CSI volumes and the Job Overview)

The goal is to help us identify breadcrumbs that are non-descriptive (i.e.
breadcrumbs that display as an ID).
2021-12-21 07:47:05 -05:00
Jai Bhagat
a262979f4f style: add styling for title on breadcrumbs 2021-12-21 07:47:05 -05:00
Jai Bhagat
0334709bd7 feat: add title to default breadcrumb component 2021-12-21 07:47:05 -05:00
Jai Bhagat
7bf288037a update: add comment to explain loading namespaces in alloc route 2021-12-21 07:47:05 -05:00
Jai Bhagat
dd04270150 fix: delete jobs route - ember creates this for us 2021-12-21 07:47:05 -05:00
Jai Bhagat
fa5096a9ec fix: add in for topology route 2021-12-21 07:47:03 -05:00
Jai Bhagat
5ca9ebe04d fix: update breadcrumb tests according to new breadcrumb structure 2021-12-21 07:46:28 -05:00
Jai Bhagat
0ea0e69f31 refactor: delete unit tests for old breadcrumbs service 2021-12-21 07:46:28 -05:00
Jai Bhagat
4cadf69d5b refactor: delete app-breadcrumbs component file 2021-12-21 07:46:28 -05:00
Jai Bhagat
210d0b309b refactor: remove double each in app breadcrumbs 2021-12-21 07:46:28 -05:00
Jai Bhagat
2cc8a37a83 test: breadcrumbs functionality 2021-12-21 07:46:28 -05:00
Jai Bhagat
972b52ad91 chore: write tests for trigger component 2021-12-21 07:46:28 -05:00
Jai Bhagat
db9d62dcfa fix: handle case for async relationships 2021-12-21 07:46:27 -05:00
Jai Bhagat
b996834af1 fix: resolve parent on job still issue with alloc job async relationship 2021-12-21 07:46:27 -05:00
Jai Bhagat
b1002d6839 feat: create trigger component
Create Trigger Component and deprecate Breadcrumb-Utils pattern.
2021-12-21 07:46:25 -05:00
Jai Bhagat
126c4dfa56 fix: delete old breadcrumbs and replace with bucket 2021-12-21 07:45:24 -05:00
Jai Bhagat
dcc9aa18ad fix: delete state from routes and move to controllers and add renderless component to templates 2021-12-21 07:45:12 -05:00