Commit Graph

20909 Commits

Author SHA1 Message Date
Mahmood Ali
274e795be5 Merge pull request #10145 from hashicorp/b-periodic-init-status
periodic: always reset periodic children status
2021-03-26 09:19:08 -04:00
James Rasell
db3761782b Merge pull request #10230 from hashicorp/f-add-allocation-terminal-status-funcs-api
api: add Allocation client and server terminal status funcs.
2021-03-26 08:03:37 +01:00
Mahmood Ali
d81df3dd1a dispatched parameterized job should clear status too 2021-03-25 15:14:21 -04:00
Drew Bailey
15cf77ad66 e2e allow setting an enterprise license environment variable (#10233)
* allow setting an enterprise license environment variable

* update comment

* address pr comments
2021-03-25 14:35:55 -04:00
Taylor Dolezal
554f69394c Change enable to enabled 2021-03-25 14:10:54 -04:00
Michael Lange
c4a7728e03 Merge pull request #10208 from hashicorp/f-ui/use-new-chart-stuff
UI: Showed host reservations and allocation utilization by task on existing stats charts
2021-03-25 09:18:42 -07:00
Mahmood Ali
032945b718 Add a test for parameterized summary counts 2021-03-25 11:27:09 -04:00
Mahmood Ali
15fd4f3a8e periodic: always reset periodic children status
Fixes a bug where Nomad reports negative or incorrect running children
counts for periodic jobs.

The periodic dispatcher derives a child job without reseting the status.
If the periodic job has a `running` status, the derived job will start
as `running` status and transition to `pending`.  Since this is
unexpected transition, the counting in StateStore.setJobSummary gets out of sync and
result in negative/incorrect values.

Note that this only affects periodic jobs after a leader transition.
During the first job registration, the job is added with `pending` or
`""` status. However, after a leader transition, the new leader
repopulates the dispatcher heap with `"running"` status and triggers the
bug.
2021-03-25 11:27:09 -04:00
James Rasell
788f9f23a0 api: add Allocation client and server terminal status funcs. 2021-03-25 08:52:59 +01:00
Michael Lange
c15bf65ef0 Remove errant log line 2021-03-24 15:34:46 -07:00
Michael Lange
d9426df7af Correctly sort tasks in alloc stat tracker so the main task takes precedence 2021-03-24 15:10:46 -07:00
Michael Lange
1d8bc393cf Guard against empty data when determining active linechart data 2021-03-24 15:09:47 -07:00
Michael Lange
ebd91a9a78 Fix line-wrapping issue with chart tooltips 2021-03-24 14:13:30 -07:00
Michael Lange
2b1449ce88 Use more explicit branching of reserved amounts based on metric type 2021-03-24 13:55:18 -07:00
Michael Lange
b009fc1f97 Remove old primary metric 2021-03-24 13:52:52 -07:00
Michael Lange
5191693be9 Update topology info box primary metric 2021-03-24 13:52:52 -07:00
Michael Lange
91521d6256 Updated old tests 2021-03-24 13:52:52 -07:00
Michael Lange
ead08e2ec6 Tests for PrimaryMetric::Task 2021-03-24 13:52:52 -07:00
Michael Lange
e3a1106f9d Tests for PrimaryMetric::Allocation 2021-03-24 13:52:52 -07:00
Michael Lange
2ed5b28805 Tests for PrimaryMetric::Node 2021-03-24 13:52:52 -07:00
Michael Lange
295354262a Remove now unused chartClass arg from LineChart 2021-03-24 13:52:52 -07:00
Michael Lange
17cf4ad20e Improved language around what the client stat charts represent 2021-03-24 13:52:52 -07:00
Michael Lange
7b73460769 New PrimaryMetric::Task component 2021-03-24 13:52:51 -07:00
Michael Lange
745a55bd42 Apply the new multi-line primary metric to the alloc index page 2021-03-24 13:52:51 -07:00
Michael Lange
df116888c8 Memoize the tracker and the series properties to avoid repeat computation
In addition to this computation being wasteful, it introduces a bug
where the allocation on a stats tracker can update twice in one render,
which isn't allowed in Glimmer (ironically, Glimmmer's lack of
auto-memoization introduced the issue).
2021-03-24 13:52:51 -07:00
Michael Lange
4f27bee77c Refactored multi-series allocation variant of the primary metric component 2021-03-24 13:52:51 -07:00
Michael Lange
d72eaa139c Refactor stats-time-series to allow for multiple series 2021-03-24 13:52:51 -07:00
Michael Lange
8ab301408f Sort and index multi-series data correctly in line chart
- Sorting must be done on copies to preserve orders.
 - Indices should be reversed since rendering is also reversed (the back
   layer (the tallest) is rendered first to create the stacking effect).
2021-03-24 13:52:51 -07:00
Michael Lange
8ae76455fb Stacked percentages of tasks for alloc charts
This leverages the existing pre-processing being done in the
allocation-stats-tracker to also create additive percentages relative to
the allocation resources vs. the task resources.

This can then be used in a chart to create a stacked area representation
of consumption.
2021-03-24 13:52:51 -07:00
Michael Lange
a6a9df5b4b Simple bind helper
This binds a function to a target before passing it along to another
component. It's normal to expect to get to use `this` within functions
on components and controllers, but (sans actions) that doesn't happen
automatically.
2021-03-24 13:52:51 -07:00
Michael Lange
d6b72c14e2 Refactor PrimaryMetric into parts/purposes
Currently, PrimaryMetric is already overloaded on multiple dimensions:
metric and resource type.

This refactor will use multiple components as a form of control flow
instead spidering conditionals, which are only getting worse as the
charts for each resource type diverge.
2021-03-24 13:52:51 -07:00
Michael Lange
ce7f6d0905 Compute and render reserved annotations for client stats 2021-03-24 13:52:30 -07:00
Michael Lange
febecbb94e Pass the LineChart named blocks through to callers of StatsTimeSeries 2021-03-24 13:52:30 -07:00
Tim Gross
85c983da3c E2E: bump AWS CSI driver versions 2021-03-24 14:17:38 -04:00
Daniel Santos
26ba3fa9d3 Update /v1/job API docs with namespace parameter 2021-03-24 09:31:39 -04:00
Drew Bailey
4484d361ee configuration and oss components for licensing (#10216)
* configuration and oss components for licensing

* vendor sync
2021-03-23 09:08:14 -04:00
Tim Gross
7f1bbc4999 E2E: CSI test should use expected unique-volume name 2021-03-23 08:34:17 -04:00
Mahmood Ali
76d513897a Update changelog with v0.12.11 (#10214) 2021-03-23 08:28:44 -04:00
Mahmood Ali
e64e6bd970 testing: default nomad test nodes to 1.0.0 (#10213) 2021-03-23 08:24:26 -04:00
Tim Gross
7c7569674c CSI: unique volume per allocation
Add a `PerAlloc` field to volume requests that directs the scheduler to test
feasibility for volumes with a source ID that includes the allocation index
suffix (ex. `[0]`), rather than the exact source ID.

Read the `PerAlloc` field when making the volume claim at the client to
determine if the allocation index suffix (ex. `[0]`) should be added to the
volume source ID.
2021-03-18 15:35:11 -04:00
Tim Gross
a1eaad9cf7 CSI: remove prefix matching from CSIVolumeByID and fix CLI prefix matching (#10158)
Callers of `CSIVolumeByID` are generally assuming they should receive a single
volume. This potentially results in feasibility checking being performed
against the wrong volume if a volume's ID is a prefix substring of other
volume (for example: "test" and "testing").

Removing the incorrect prefix matching from `CSIVolumeByID` breaks prefix
matching in the command line client. Add the required elements for prefix
matching to the commands and API.
2021-03-18 14:32:40 -04:00
Tim Gross
618d64ba37 csi: volume init command
Create a convenience command for generating example CSI volume specifications,
similar to the existing `nomad job init` or `nomad quota init` commands.
2021-03-18 14:24:40 -04:00
Dave May
9138d374d6 docs: add missing dashes to operator debug Usage (#10192) 2021-03-17 15:13:04 -04:00
Seth Hoenig
7b8364d459 Merge pull request #10103 from AndrewChubatiuk/service-portlabel-interpolation-fix
fixed service interpolation for sidecar tasks
2021-03-17 10:40:48 -05:00
Charlie Voiselle
d914990e5f Fixup uses of sanity (#10187)
* Fixup uses of `sanity`
* Remove unnecessary comments.

These checks are better explained by earlier comments about
the context of the test. Per @tgross, moved the tests together
to better reinforce the overall shared context.

* Update nomad/fsm_test.go
2021-03-16 18:05:08 -04:00
Tim Gross
e200caae45 docs: clarify HCL is parsed in CLI 2021-03-15 15:41:43 -04:00
davemay99
b2207d70f7 CHANGELOG: Add missing 0.12.10 version 2021-03-15 08:35:03 -04:00
Florian Apolloner
8b3ea4ea9a docker: support configuring default log driver in plugin options 2021-03-12 16:04:33 -05:00
Luiz Aoqui
9d7054e00c Merge pull request #10171 from hashicorp/docs-set-ports-on-jobspec
docs: add ports to jobspec overview example
2021-03-12 14:55:19 -05:00
Luiz Aoqui
e873675a5b docs: add ports to jobspec overview example 2021-03-12 13:36:39 -05:00