Commit Graph

34 Commits

Author SHA1 Message Date
Lenz Grimmer
10cb89241f
Merge pull request #37568 from s0nea/wip-dashboard-qa-linting
Reviewed-by: Alfonso Martínez <almartin@redhat.com>
Reviewed-by: Tiago Melo <tmelo@suse.com>
Reviewed-by: Volker Theile <vtheile@suse.com>
2020-10-26 11:27:23 +01:00
Tatjana Dehler
1b67691492 mgr/dashboard/qa: add pylint check
Fixes: https://tracker.ceph.com/issues/47757
Signed-off-by: Tatjana Dehler <tdehler@suse.com>
2020-10-22 14:12:14 +02:00
Tatjana Dehler
1474259b65 mgr/dashboard/qa: add isort check
Add isort check to the QA test files and
fix issues.

Fixes: https://tracker.ceph.com/issues/47757
Signed-off-by: Tatjana Dehler <tdehler@suse.com>
2020-10-22 14:12:14 +02:00
Tatjana Dehler
bc3d1997bd mgr/dashboard/qa: add flake8 linting
Add flake8 linting to the QA test files and
fix issues.

Fixes: https://tracker.ceph.com/issues/47757
Signed-off-by: Tatjana Dehler <tdehler@suse.com>
2020-10-22 14:12:14 +02:00
Tatjana Dehler
3639332f34 mgr/dashboard: assign flags to single OSDs
Add the possibility to assign the flags ['noup',
'nodown', 'noin', 'noout'] to single OSDs.

Fixes: https://tracker.ceph.com/issues/40739
Signed-off-by: Tatjana Dehler <tdehler@suse.com>
2020-10-21 15:11:23 +02:00
Lenz Grimmer
fac25773b6
Merge pull request #37192 from rhcs-dashboard/fix-46898-master
mgr/dashboard/api: move/create OSD histogram in separate endpoint

Reviewed-by: Alfonso Martínez <almartin@redhat.com>
Reviewed-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Laura Paduano <lpaduano@suse.com>
2020-09-23 11:01:06 +02:00
Aashish Sharma
1c812e0d61 mgr/dashboard/api: move/create OSD histogram in separate endpoint
Added a separate endpoint for osd/histogram - api/osd/{svc_id}/histogram

Fixes:https://tracker.ceph.com/issues/46898
Signed-off-by: Aashish Sharma <aasharma@redhat.com>
2020-09-18 16:11:04 +05:30
Fabrizio D'Angelo
ff92dd4776 mgr/dashboard: Consolidate Osd mark endpoints
Instead of 4 different GET requests, there is now one PUT request
that parses the desired action in the request body.
A description was added to describe the usage.

* Osd flag endpoints were grouped with Osd endpoints
* A few mypy issues were also resolved

Fixes: https://tracker.ceph.com/issues/46181

Signed-off-by: Avan Thakkar <athakkar@redhat.com>
(cherry picked from commit f67d5aa8fa30859d15d314ef5fbb3d4cda87cd5b)
(cherry picked from commit dcc2ceb0a0ce30f67aee8d8096d6e1714d3e56e7)
(cherry picked from commit 5ee7f8c9b731fe249daeec6f114cf6e9c998af66)
2020-09-04 19:31:24 +05:30
anurag
ff7c7ae40d mgr/dashboard: Remove histogram component
This commit is intended for code cleanup of Histogram component.

Fixes: https://tracker.ceph.com/issues/26954
Signed-off-by: Aashish Sharma <aasharma@redhat.com>
2020-08-27 14:10:42 +05:30
Aashish Sharma
a30de22468 mgr/dashboard: increase API test coverage in API controllers
Added test cases for the missing endpoints

Fixes: https://tracker.ceph.com/issues/45901
Signed-off-by: Aashish Sharma <aasharma@redhat.com>
2020-07-06 10:39:44 +05:30
Aashish Sharma
e51dfa79e8 mgr/dashboard: increase API test coverage in API controllers
Added test cases for the missing endpoints

Fixes: https://tracker.ceph.com/issues/45901
Signed-off-by: Aashish Sharma <aasharma@redhat.com>
2020-06-26 14:35:10 +05:30
Aashish Sharma
8e30fd6e91 mgr/dashboard: increase API test coverage in API controllers
Added test cases for the missing endpoints
Fixes: https://tracker.ceph.com/issues/45901
Signed-off-by: Aashish Sharma <aasharma@redhat.com>
2020-06-25 16:43:10 +05:30
Aashish Sharma
4a2fcc54ab mgr/dashboard/api: To increase test coverage in API controllers
Added test cases for the missing endpoints

Fixes: https://tracker.ceph.com/issues/45901
Signed-off-by: Aashish Sharma <aasharma@redhat.com>
2020-06-22 12:35:05 +05:30
Kefu Chai
b0bdbc3414 qa/tasks/mgr: partial revert of 'import with full path'
this change partially reverts #34139

using relative import helps with readability and ease the pain to write
down the full parent module name

in #34139, all relative imports were replaced with full path, because we
were using following code to verify if the code is python3 compatible:

```
  mod_spec = importlib.util.spec_from_file_location(mod_name, path)
  mod = importlib.util.module_from_spec(mod_spec)
  mod_spec.loader.exec_module(mod)
```

but this does not work with submodule which can import using relative
import without specifying the name of the package and its parent module.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-03-26 14:37:06 +08:00
Kefu Chai
947a74349d qa: import with full path
to be py3 compatible

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-03-24 18:27:55 +08:00
Kiefer Chang
6009d2d654
mgr/dashboard: adapt create_osds interface change
Support the parameter change of create_osds since
https://github.com/ceph/ceph/pull/33922.

Fixes: https://tracker.ceph.com/issues/44632
Signed-off-by: Kiefer Chang <kiefer.chang@suse.com>
2020-03-17 16:07:45 +08:00
Kiefer Chang
320bbeec11
mgr/dashboard: support multiple DriveGroups when creating OSDs
The `create_osds` call in orchestrator uses multiple named DriveGroups as
the parameter. Adapt the change in Dashboard.

Some minor polishes:
- Use task manager to wrap the operation.
- The submit button in Preview modal is changed from `Add` to `Create`.
- POST `/api/osd` to create OSDs:
  - Bare OSDs for OSD service container
    {
        "method": "bare",
        "data": {
            "uuid": "xxxx",
            "svc_id": 5
        }
    }

  - OSDs with devices (DriveGroups)

    {
        "method": "drive_groups",
        "data": {
            < drive group spec here>
        }
    }
- `/orchestrator/osd` endpoint is removed.

Fixes: https://tracker.ceph.com/issues/43615
Signed-off-by: Kiefer Chang <kiefer.chang@suse.com>
2020-03-06 11:15:18 +08:00
Tatjana Dehler
6ffb3e4097 mgr/dashboard: wait for PG unknown state to be cleared
Give the cluster some time to recover from the unknown
PG state before checking if the OSD is safe to destroy.

Fixes: https://tracker.ceph.com/issues/43912
Signed-off-by: Tatjana Dehler <tdehler@suse.com>
2020-02-03 11:58:10 +01:00
Kefu Chai
570f18f4c8 qa: add "path" to "device" output schema
"path" was added by 2c0fd7d868, so update
the test accordingly

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-12-27 00:25:51 +08:00
Lenz Grimmer
4b977d7584
mgr/dashboard: Add support for device management (#30759)
mgr/dashboard: Add support for device management

Reviewed-by: Kiefer Chang <kiefer.chang@suse.com>
Reviewed-by: Ricardo Dias <rdias@suse.com>
Reviewed-by: Tiago Melo <tmelo@suse.com>
Reviewed-by: Volker Theile <vtheile@suse.com>
2019-11-06 12:32:35 +00:00
Patrick Seidensal
3eb67129c7 mgr/dashboard: Add support for device management
Adds two tabs named 'Devices' on the host and OSD page. The host
respectively OSD needs to be selected before the tab will be shown next
to the other tabs below the table where the host or OSD has been
selected. It will display the graphical representation of `ceph device
ls`, filtered by the selected host or OSD.

Fixes: https://tracker.ceph.com/issues/39352

Signed-off-by: Patrick Seidensal <pseidensal@suse.com>
2019-10-25 12:10:32 +02:00
Tiago Melo
83b0d0d50f mgr/dashboard: Fix OSD's safe_to_destroy method
We were passing the wrong value in "send_command".

Changed the ids path param to a query param.

Signed-off-by: Tiago Melo <tmelo@suse.com>
2019-10-18 10:23:54 +00:00
Ernesto Puerta
3569829014
mgr: change perf-counter precision to float
Instead of integer nsecs, as added in
https://github.com/ceph/ceph/pull/28882, this recovers second units, but
with double (potentially nsec precision). This will fix some issues
caused by the mixing of second-based and nsec-based timestamps
(https://github.com/ceph/ceph/pull/28603).

Fixes: https://tracker.ceph.com/issues/41867
Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
2019-09-27 15:00:24 +02:00
Patrick Nawracay
1419346886 mgr/dashboard: Implement OSD purge
Removes the `remove` functionality from the UI.

Fixes: http://tracker.ceph.com/issues/35811

Signed-off-by: Patrick Nawracay <pnawracay@suse.com>
2019-02-18 07:18:09 +00:00
Tatjana Dehler
613ea569f3 mgr/dashboard: Provide all four 'mandatory' flags
Fixes: https://tracker.ceph.com/issues/37857
Signed-off-by: Tatjana Dehler <tdehler@suse.com>
2019-01-11 10:52:06 +01:00
Patrick Nawracay
09f2bb4c9a mgr/dashboard: Fix failing QA test: test_safe_to_destroy
The behavior of `safe-to-destroy` has changed in
432f194355 (PR#24799) and the backend
needs to be adapted accordingly.

Fixes: http://tracker.ceph.com/issues/37290

Signed-off-by: Patrick Nawracay <pnawracay@suse.com>
2018-11-19 14:02:14 +01:00
Patrick Nawracay
079cfeae4d mgr/dashboard: Cleanup
Signed-off-by: Patrick Nawracay <pnawracay@suse.com>
2018-09-12 10:16:54 +02:00
Patrick Nawracay
49ab1315a3 mgr/dashboard: Fix flaky QA tests
Signed-off-by: Patrick Nawracay <pnawracay@suse.com>
2018-09-12 10:16:54 +02:00
Patrick Nawracay
e71466cc49 mgr/dashboard: Add support for managing individual OSD settings (backend)
Add options to mark OSDs in/out/down/reweight/lost/remove/destroy/create

Fixes: http://tracker.ceph.com/issues/24270

Signed-off-by: Patrick Nawracay <pnawracay@suse.com>
2018-09-03 12:51:04 +02:00
Ricardo Dias
01a1a1ff84
qa/tasks/mgr/dashboard: Adapted tests to work with new authentication system
Signed-off-by: Ricardo Dias <rdias@suse.com>
2018-06-26 12:28:54 +01:00
Patrick Nawracay
d7de1fa067 mgr/dashboard/backend: Enable get/set of cluster-wide OSD settings
Add ability to list, set and unset cluster-wide OSD flags.

Flags can be listed and changed through the `/api/osd/flags` API
resource. By using a GET request, the list is retrieved. By using a PUT
request, the flags are updated (all at once). Flags not contained in the
data of the PUT are removed, additional once are added. Note that the
PUT requests require a JSON body with the data contained as value of the
'flags' key like so:

    {"flags": ["flag1", "flag2", ...]}

Fixes: http://tracker.ceph.com/issues/24056

Signed-off-by: Patrick Nawracay <pnawracay@suse.com>
2018-06-15 10:26:29 +02:00
Tiago Melo
2783b021ec mgr/dashboard: Add scrub methods to OSD controller and service
Signed-off-by: Tiago Melo <tmelo@suse.com>
2018-06-04 14:49:54 +01:00
Sebastian Wagner
012be1dc86 qa/tasks/mgr/dashboard: Imroved JSON validation
Refactored `OsdTest` to make use of `self.assertSchema()`

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2018-04-09 16:42:33 +02:00
Ricardo Dias
aa205a6731
mgr/dashboard: renamed dashboard_v2 to dashboard
Signed-off-by: Ricardo Dias <rdias@suse.com>
2018-03-16 07:23:08 +00:00