Commit Graph

174 Commits

Author SHA1 Message Date
Buck Doyle 543fb24764
Fix allocation count in CSI volumes table (#9515)
This closes #9495. As detailed in there, the collection query GET
/v1/volumes?type=csi doesn’t return ReadAllocs and WriteAllocs, so the #
Allocs cell was always showing 0 upon first load because it was derived
from the lengths of those arrays. This uses the heretofore-ignored
CurrentReaders and CurrentWriters values to calculate the total instead.

The single-resource query GET /v1/volume/csi%2F:id doesn’t return
CurrentReaders and CurrentWriters that absence doesn’t override the
stored values when visiting an individual item.

Thanks to @apollo13 for reporting this and to @tgross for the API logs
and suggestion.
2020-12-07 08:51:41 -06:00
Buck Doyle ba147a4fca
Add query parameter to override Mirage scenario (#9380) 2020-11-30 08:12:15 -06:00
Tim Gross 4e79ddea45
csi/api: populate ReadAllocs/WriteAllocs fields (#9377)
The API is missing values for `ReadAllocs` and `WriteAllocs` fields, resulting
in allocation claims not being populated in the web UI. These fields mirror
the fields in `nomad/structs.CSIVolume`. Returning a separate list of stubs
for read and write would be ideal, but this can't be done without either
bloating the API response with repeated full `Allocation` data, or causing a
panic in previous versions of the CLI.

The `nomad/structs` fields are persisted with nil values and are populated
during RPC, so we'll do the same in the HTTP API and populate the `ReadAllocs`
and `WriteAllocs` fields with a map of allocation IDs, but with null
values. The web UI will then create its `ReadAllocations` and
`WriteAllocations` fields by mapping from those IDs to the values in
`Allocations`, instead of flattening the map into a list.
2020-11-25 16:44:06 -05:00
Michael Lange f543137ec9 Revert "Temporarily remove poststop from the UI"
This reverts commit f8a505ea2f9def2a7ce7a93e6d0529e1b5da4894.
2020-11-12 09:16:52 -08:00
Buck Doyle 8b5b2116ec
Fix job detail crash when recommendations off (#9269)
Without this, visiting any job detail page on Nomad OSS would crash with
an error like this:

Error: Ember Data Request GET
/v1/recommendations?job=ping%F0%9F%A5%B3&namespace=default returned a
404 Payload (text/xml)

The problem was twofold.

1. The recommendation ability didn’t include anything about checking
whether the feature was present. This adds a request to
/v1/operator/license on application load to determine which features are
present and store them in the system service. The ability now looks for
'Dynamic Application Sizing' in that feature list.

2. Second, I didn’t check permissions at all in the job-fetching or job
detail templates.
2020-11-06 08:21:38 -06:00
Buck Doyle 31b4ed7a6d
Add DAS UI code from enterprise (#9192)
This is a few combined iterations on the DAS feature.
2020-10-29 07:46:42 -05:00
Michael Lange bae7002c73 Show the nomad agent version of the agent the UI is served from 2020-10-25 23:52:06 -07:00
Buck Doyle 8aacab513b
Add logged Faker seed when none is set in tests (#9140)
This will hopefully make it easier to reproduce test failures
that happen intermittently, especially in CI.
2020-10-22 13:45:51 -05:00
Michael Lange f3300bcbf0 Remove the scenarios I didn't need/didn't get to 2020-10-15 11:45:59 -07:00
Michael Lange 4f537c8511 Update scenarios to use new resources code 2020-10-15 02:54:16 -07:00
Michael Lange 64fc738733 Migrate to the new resources properties for allocs and nodes 2020-10-15 02:54:16 -07:00
Michael Lange 5b55f3c740 Medium scale topo scenario 2020-10-15 02:54:14 -07:00
Michael Lange cab4e618fc Add cluster details to the topology page 2020-10-15 02:54:13 -07:00
Michael Lange 49736aed46 Tweak topo scenario 2020-10-15 02:54:13 -07:00
Michael Lange 78ae8fd78b Fix factory bug that made it so pending allocs had no resources 2020-10-15 02:54:13 -07:00
Michael Lange f0a096119f Small cluster example scenario for the topo viz 2020-10-15 02:54:13 -07:00
Michael Lange 7604597041 Acceptance test coverage for the submit time sorting on the periodic and parameterized detail pages 2020-09-19 12:37:38 -07:00
Michael Lange 0f2fd905d8 Derive allocation Resources property from TaskResources 2020-09-04 13:46:50 -07:00
Michael Lange edd904c1c4 Allow for custom resource requirements for jobs that are recognized by allocations
The job factory will now accept an array of resourceSpecs that is a shorthand
notation for memory, cpu, disk, and iops requirements.

These specs get passed down to task groups. The task group factory will
split the resource requirements near evenly (there is variance
threshold) across all expected tasks.

Allocations then construct task-resource objects based on the resources
from the matching task.
2020-09-04 13:46:49 -07:00
Michael Lange f9864930ce Parameterize generateResources to enable property overrides 2020-09-04 13:46:35 -07:00
Michael Lange fc31f80880 Temporarily remove poststop from the UI
Since poststart and poststop are shipping separately, we can't ship them
both in the UI at the same time.
2020-08-31 19:32:38 -07:00
Buck Doyle 7ed43b0332
Merge branch 'master' into f-ui/poststart-poststop 2020-08-28 10:15:18 -05:00
Michael Lange 25bb975749 Clean up erroneous and redundant mirage things 2020-08-27 17:58:24 -07:00
Buck Doyle de3504a738 Add poststart and poststop lifecycle phases 2020-08-26 09:55:42 -05:00
Nick Ethier 3cd5f46613
Update UI to use new allocated ports fields (#8631)
* nomad: canonicalize alloc shared resources to populate ports

* ui: network ports

* ui: remove unused task network references and update tests with new shared ports model

* ui: lint

* ui: revert auto formatting

* ui: remove unused page objects

* structs: remove unrelated test from bad conflict resolution

* ui: formatting
2020-08-20 11:07:13 -04:00
Michael Lange 39583e0ce1 Force mock error scale events to be annotations 2020-08-05 12:02:22 -07:00
Michael Lange 4b7f431981 Acceptance tests for scaling events 2020-07-29 19:07:24 -07:00
Michael Lange 8a995a0db8 Make scale event properties more conditional and serialized correctly 2020-07-29 19:07:24 -07:00
Michael Lange 765077eb03 Model job scaling and events in Mirage 2020-07-29 19:07:24 -07:00
Michael Lange ac056b14db
Merge pull request #8218 from hashicorp/b-ui/plugin-allocation-healthy-flakiness
UI: Add cycling to factory healthy flags
2020-06-19 14:39:47 -07:00
Buck Doyle 0dd9ffdab3 Add cycling to factory healthy flags
This is meant to address the plugin test failure seen here:
https://app.circleci.com/pipelines/github/hashicorp/nomad/10015/workflows/ace5d615-db03-4cfc-86b2-31e9e00473ec/jobs/77014/tests

I believe the problem was that on rare occasions, the set
of mock storage controllers and nodes were all unhealthy,
so the facet test had no rows to iterate through. Since
there are always three of each, this guarantees some
healthy ones will be present.
2020-06-19 15:43:32 -05:00
Michael Lange 689dd92aa8 Mirage updates for task group scaling and scaling post endpoint 2020-06-18 22:08:28 -07:00
Michael Lange c62db754a3 Server monitor page 2020-06-16 10:23:36 -07:00
Michael Lange c080def72e Test coverage for the client monitor page 2020-06-16 10:23:36 -07:00
Buck Doyle 9c0f85d7b6
UI: add filesystem browsing for allocations (#7951)
This partially addresses #7799.

Task state filesystems are contained within a subdirectory of their
parent allocation, so almost everything that existed for browsing task
state filesystems was applicable to browsing allocations, just without
the task name prepended to the path. I aimed to push this differential
handling into as few contained places as possible.

The tests also have significant overlap, so this includes an extracted
behavior to run the same tests for allocations and task states.
2020-06-01 08:15:59 -05:00
Michael Lange 388bb138c2 Always lower case headers now 2020-05-21 10:35:40 -07:00
Michael Lange 22cc9bec74 Work around a mirage bug 2020-05-18 17:23:55 -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 ee2d1eeb39 Introduce shallow to plugin factories to speed up tests 2020-05-07 17:29:42 -07:00
Michael Lange 11a42b6075 Acceptance test for PluginDetail 2020-05-06 17:36:45 -07:00
Michael Lange 517db723cd Sort allocations on the plugin detail page 2020-05-06 17:21:49 -07:00
Michael Lange 210f6cdb00 Update storage controller mirage code to accommodate EDMF's lack of relationships 2020-05-06 17:21:46 -07:00
Michael Lange ffcaef6b22 Model out the rest of the CSI Plugin properties 2020-05-06 17:21:44 -07:00
Michael Lange 034eeb1ddb
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
Michael Lange 91b97e0170 Stabilize job and allocation job versions in fixtures 2020-05-01 14:29:24 -07:00
Jasmine Dahilig a9004faa11
UI: Add representations for task lifecycles (#7659)
This adds details about task lifecycles to allocations, task groups,
and tasks. It includes a live-updating timeline-like chart on allocations.
2020-04-30 08:15:19 -05:00
Michael Lange e8e41c5757 Acceptance tests for the volumes list page 2020-04-03 19:28:12 -07:00
Michael Lange 59427662d0 Handle namespaces in the mirage handler for volumes 2020-04-03 19:28:10 -07:00
Michael Lange 01341530e7 Add a volume facet to the clients list page 2020-03-30 17:33:44 -07:00
Michael Lange 1bd6a69067
UI: Support for CSI (#7446)
Closes #7197 #7199

Note: Test coverage is limited to adapter and serializer unit tests. All
acceptance tests have been stubbed and all features have been manually
tested end-to-end.

This represents Phase 1 of #6993 which is the core workflow of CSI in
the UI. It includes a couple new pages for viewing all external volumes
as well as the allocations associated with each. It also updates
existing volume related views on job and allocation pages to handle both
Host Volumes and CSI Volumes.
2020-03-25 07:51:26 -05:00