Commit Graph

612 Commits

Author SHA1 Message Date
Kamoltat
f06da20dff pybind/mgr/progress: disable pg recovery event by default
The progress module disabled the pg recovery event by default
since the event is expensive and has interrupted other serviceis
when there is OSDs being marked in/out from the the cluster.

To turn the event on manually:

ceph config set mgr mgr/progress/allow_pg_recovery_event true

Updated qa/tasks/mgr/test_progress.py to enable
the pg recovery event when testing the progress module.

Signed-off-by: Kamoltat <ksirivad@redhat.com>
2022-02-03 17:51:42 +00:00
Aashish Sharma
f771cd492c mgr/dashboard: Improve notifications for osd nearfull, full
This PR adds some visual hints for osds that are near full or full

Fixes: https://tracker.ceph.com/issues/53334
Signed-off-by: Aashish Sharma <aasharma@redhat.com>
2022-01-19 16:35:27 +05:30
Ernesto Puerta
197987a5a8
Merge pull request #42603 from cypherean/feedback_frontend
mgr/dashboard: report ceph tracker bug/feature through GUI

Reviewed-by: Alfonso Martínez <almartin@redhat.com>
Reviewed-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Nizamudeen A <nia@redhat.com>
Reviewed-by: Pere Diaz Bou <pdiazbou@redhat.com>
Reviewed-by: Volker Theile <vtheile@suse.com>
2022-01-18 19:47:13 +01:00
Avan Thakkar
ed2b4e7a56 mgr/dashboard: report ceph tracker bug/feature through GUI
Fixes: https://tracker.ceph.com/issues/44851
Signed-off-by: Shreya Sharma <shreyasharma.ss305@gmail.com>
Signed-off-by: Avan Thakkar <athakkar@redhat.com>
2022-01-17 19:45:31 +05:30
Pere Diaz Bou
15dfa71cf7 mgr: TTLCache basic implementation
Signed-off-by: Pere Diaz Bou <pdiazbou@redhat.com>
Fixes: https://tracker.ceph.com/issues/48388
2022-01-05 10:11:58 +01:00
Laura Flores
92fcfbb464
Merge pull request #43411 from ljflores/wip-mgr-command-cleanup
mon: simplify 'mgr module ls' output
2021-11-10 14:09:51 -06:00
Alfonso Martínez
58a6ab2147 mgr/dashboard: NFS exports: API + UI: integration with mgr/nfs; cleanups
mgr/dashboard: move NFS_GANESHA_SUPPORTED_FSALS to mgr_module.py

Importing from nfs module throws AttributeError because as a side effect the dashboard module is impersonating the nfs module.
https://gist.github.com/varshar16/61ac26426bbe5f5f562ebb14bcd0f548

mgr/dashboard: 'Create NFS export' form: list clusters from nfs module

mgr/dashboard: frontend+backend cleanups for NFS export

Removed all code and references related to daemons. UI cleanup and adopted unit-testing for
nfs-epxort create form for CEPHFS backend. Cleanup for export list/get/create/set/delete endpoints.

mgr/dashboard: rm set-ganesha ref + update docs

Remove existing set-ganesha-clusters-rados-pool-namespace references as
they are no longer required. Moreover, nfs doc in dashboard doc is
updated accordingly to the current nfs status.

mgr/dashboard: add nfs-export e2e test coverage

mgr/dashboard: 'Create NFS export' form: remove RGW user id field.

- Improve bucket typeahead behavior.
- Increase version for bucket list endpoint.
- Some refactoring.

mgr/dashboard: 'Create NFS export' form: allow RGW backend only when default realm is selected.

When RGW multisite is configured, the NFS module can only handle buckets in the default realm.

mgr/dashboard: 'Create service' form: fix NFS service creation.

After https://github.com/ceph/ceph/pull/42073, NFS pool and namespace are not customizable.

mgr/dashboard: 'Create NFS export' form: add bucket validation.

- Allow only existing buckets.
- Refactoring:
  - Moved bucket validator from bucket form to cd-validators.ts
  - Split bucket validator into 2: bucket name validator and bucket existence (that checks either existence or non-existence).

mgr/dashboard: 'Create NFS export' form: path validation refactor: allow only existing paths.

Fixes: https://tracker.ceph.com/issues/46493
Fixes: https://tracker.ceph.com/issues/51479
Signed-off-by: Alfonso Martínez <almartin@redhat.com>
Signed-off-by: Avan Thakkar <athakkar@redhat.com>
Signed-off-by: Pere Diaz Bou <pdiazbou@redhat.com>
2021-10-18 12:58:54 +02:00
Laura Flores
bb0a39b7d9 qa/tasks/mgr: update tests that use mgr module ls to specify the json format
Signed-off-by: Laura Flores <lflores@redhat.com>
2021-10-14 23:59:47 +00:00
Avan Thakkar
6644a00a2c mgr/dashboard: introduce gather facts in host list
Fixes: https://tracker.ceph.com/issues/52017
Signed-off-by: Avan Thakkar <athakkar@redhat.com>
2021-10-13 16:02:51 +05:30
Avan Thakkar
b9f38cadc4 mgr/dashboard: Create Cluster Workflow welcome screen and e2e tests
A module option called CLUSTER_STATUS has two option. INSTALLED
AND POST_INSTALLED. When CLUSTER_STATUS is INSTALLED it will allow to show the
create-cluster-wizard after login the initial time.  After the cluster
creation is succesfull this option is set to POST_INSTALLED
Also has the e2e codes for the Review Section

Fixes: https://tracker.ceph.com/issues/50336
Signed-off-by: Avan Thakkar <athakkar@redhat.com>
Signed-off-by: Nizamudeen A <nia@redhat.com>
2021-10-13 15:52:14 +05:30
Ernesto Puerta
df89e6a174
Merge pull request #43256 from rhcs-dashboard/fix-48845-master
qa/mgr/dashboard/test_pool: don't check HEALTH_OK

Reviewed-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Deepika Upadhyay <dupadhya@redhat.com>
Reviewed-by: Nizamudeen A <nia@redhat.com>
2021-10-06 21:49:12 +02:00
Ernesto Puerta
2283cb068b
qa/mgr/dashboard/test_pool: don't check HEALTH_OK
Fixes: https://tracker.ceph.com/issues/48845
Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
2021-09-30 14:16:46 +02:00
Ernesto Puerta
156defa48e
Merge pull request #43255 from rhcs-dashboard/fix-49344-master
qa/mgr/dashboard: add extra wait to test

Reviewed-by: Alfonso Martínez <almartin@redhat.com>
Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Deepika Upadhyay <dupadhya@redhat.com>
Reviewed-by: Nizamudeen A <nia@redhat.com>
2021-09-29 20:23:23 +02:00
Avan Thakkar
88a8732215 mgr/dashboard: make modified API endpoints backward compatible
Fixes: https://tracker.ceph.com/issues/52480
Signed-off-by: Avan Thakkar <athakkar@redhat.com>

Introducing APIVersion class to handle versioning for API-endpints and making
them backward compatible.
2021-09-24 18:48:35 +05:30
Ernesto Puerta
9ff778cdaa
qa/mgr/dashboard: add extra wait to test
Fixes: https://tracker.ceph.com/issues/49344
Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
2021-09-22 14:11:23 +02:00
Avan Thakkar
95543bb150 mgr/dashboard: stats=false not working when listing buckets
Fixes: https://tracker.ceph.com/issues/51154
Signed-off-by: Avan Thakkar <athakkar@redhat.com>
2021-08-23 15:57:54 +05:30
Alfonso Martínez
a682b9d7a4 mgr/dashboard: set rgw credentials: fix api tests
Fixes: https://tracker.ceph.com/issues/44605
Signed-off-by: Alfonso Martínez <almartin@redhat.com>
2021-08-11 08:59:13 +02:00
Alfonso Martínez
6e20ef1dd3 mgr/dashboard: connect-rgw: rename to set-rgw-credentials; refactoring
- Rename the dashboard command to better reflect its behavior.
- Rename '_radosgw_admin' method to 'send_rgwadmin_command' for consistency with
  'send_mon_command' and move it to the mgr_module.py .
- Cleanup: remove unneeded rgw settings.
- Better error handling and test coverage.

Fixes: https://tracker.ceph.com/issues/44605
Signed-off-by: Alfonso Martínez <almartin@redhat.com>
2021-08-10 14:06:03 +02:00
Brad Hubbard
434b325c40
Merge pull request #42442 from badone/wip-insights-reports-non-persistent-storage
Don't persist report data

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
2021-07-29 09:19:32 +10:00
Neha Ojha
c9ad86e9c5
Merge pull request #42438 from tchaikov/wip-qa-test_module_selftest
qa/tasks/mgr: clean crash reports before waiting for clean

Reviewed-by: Neha Ojha <nojha@redhat.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2021-07-23 15:39:14 -07:00
Brad Hubbard
32d1cca2d9 qa/tasks/mgr/test_insights: Remove test for persistent checks
This test makes no sense if we are no longer persisting the store.

Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
2021-07-22 15:02:01 +10:00
Neha Ojha
c9f8846b7f
Merge pull request #41907 from kamoltat/wip-ksirivad-progress-time-interval
pybind/mgr/progress: introduce 5 second sleep interval

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2021-07-21 16:53:38 -07:00
Kefu Chai
ec8a40b08f qa/tasks/mgr: clean crash reports before waiting for clean
otherwise we have following warning in health report

{"status":"HEALTH_WARN","checks":{"RECENT_MGR_MODULE_CRASH":{"severity":"HEALTH_WARN","summary":{"message":"1 mgr modules have recently crashed","count":1},"muted":false}},"mutes":[]}

and it does not disappear after the test waits for 30 seconds.
and the tasks.mgr.test_module_selftest.TestModuleSelftest test
fails like:

2021-07-21T09:59:52.560 INFO:tasks.cephfs_test_runner:======================================================================
2021-07-21T09:59:52.561 INFO:tasks.cephfs_test_runner:ERROR: test_module_commands (tasks.mgr.test_module_selftest.TestModuleSelftest)
2021-07-21T09:59:52.561 INFO:tasks.cephfs_test_runner:----------------------------------------------------------------------
2021-07-21T09:59:52.561 INFO:tasks.cephfs_test_runner:Traceback (most recent call last):
2021-07-21T09:59:52.562 INFO:tasks.cephfs_test_runner:  File "/home/teuthworker/src/git.ceph.com_ceph-c_6a5d5abc027f706687dec92f92ff6fc6f074d2ae/qa/tasks/mgr/test_module_selftest.py", line 201, in
test_mo
dule_commands
2021-07-21T09:59:52.562 INFO:tasks.cephfs_test_runner:    self.wait_for_health_clear(timeout=30)
2021-07-21T09:59:52.562 INFO:tasks.cephfs_test_runner:  File "/home/teuthworker/src/git.ceph.com_ceph-c_6a5d5abc027f706687dec92f92ff6fc6f074d2ae/qa/tasks/ceph_test_case.py", line 172, in
wait_for_health_c
lear
2021-07-21T09:59:52.563 INFO:tasks.cephfs_test_runner:    self.wait_until_true(is_clear, timeout)
2021-07-21T09:59:52.563 INFO:tasks.cephfs_test_runner:  File "/home/teuthworker/src/git.ceph.com_ceph-c_6a5d5abc027f706687dec92f92ff6fc6f074d2ae/qa/tasks/ceph_test_case.py", line 209, in
wait_until_true
2021-07-21T09:59:52.563 INFO:tasks.cephfs_test_runner:    raise TestTimeoutError("Timed out after {0}s and {1} retries".format(elapsed, retry_count))
2021-07-21T09:59:52.564 INFO:tasks.cephfs_test_runner:tasks.ceph_test_case.TestTimeoutError: Timed out after 30s and 0 retries

in this change, the crash reports are nuked right after
we see the warning, so that we can have a clean health
report.

Fixes: https://tracker.ceph.com/issues/51743
Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-07-21 22:46:18 +08:00
Ernesto Puerta
64dbe17fdb
Merge pull request #42188 from votdev/issue_51408_motd
mgr/dashboard: Add configurable MOTD or wall notification

Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Nizamudeen A <nia@redhat.com>
Reviewed-by: Paul Cuzner <pcuzner@redhat.com>
Reviewed-by: Tatjana Dehler <tdehler@suse.com>
Reviewed-by: sebastian-philipp <NOT@FOUND>
Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Volker Theile <vtheile@suse.com>
2021-07-19 19:56:50 +02:00
Josh Durgin
adb0454599
Merge pull request #42074 from ljflores/wip-lflores-perf-channel
mgr/telemetry: add new 'perf' channel that shares aggregated perf counter metrics of a cluster

Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Tatjana Dehler <tdehler@suse.com>
Reviewed-by: Yaarit Hatuka <yaarithatuka@gmail.com>
2021-07-19 07:59:32 -07:00
Sage Weil
a1ee80fcf1 qa/tasks/mgr/test_orchestrator_cli: fix test
Signed-off-by: Sage Weil <sage@newdream.net>
2021-07-14 16:20:11 -04:00
Volker Theile
f7f163e75c mgr/dashboard: Add configurable MOTD or wall notification
Fixes: https://tracker.ceph.com/issues/51408

Signed-off-by: Volker Theile <vtheile@suse.com>
2021-07-14 10:48:49 +02:00
Kamoltat
5f33f2f6e0 mgr/test_progress.py: Delay recover in test_progress
Changes some the tests in teuthology to make
the test more deterministic.
Using:

`ceph osd set norecover` and
`ceph osd set nobackfill` when marking osds in
or out. As this will delay the recovery and make
sure it the test cases get the chance to check
that there is actually events poping up in
the progress module.

took out test_osd_cannot_recover from
tasks/mgr/test_progress.py since it is no longer
a relevant test case since recovery will get
triggered regardless if pg is unmoved.

Ignoring `OSDMAP_FLAGS` in teuthology
because we are using norecover and nobackfill
to delay the recovery process, therefore, it
will create a health warning and fails the
teuthology test.

Signed-off-by: Kamoltat <ksirivad@redhat.com>
2021-07-13 19:33:20 +00:00
Laura Flores
0072e2ad65 qa/tasks/mgr/dashboard: add perf channel to qa tests
Modified test_mgr_module.py to acknowledge new perf channel.

Signed-off-by: Laura Flores <lflores@redhat.com>
2021-07-02 14:21:42 +00:00
Sage Weil
4d91a3d493 mgr/dashboard: remove max/min_size and ruleset
Signed-off-by: Sage Weil <sage@newdream.net>
Signed-off-by: Avan Thakkar <athakkar@redhat.com>
2021-07-02 00:10:14 +05:30
Ernesto Puerta
6676352414
Merge pull request #41758 from rhcs-dashboard/support-multiple-crush-trees
mgr/dashboard: crushmap tree doesn't display crush type other than root

Reviewed-by: Waad Alkhoury <walkhour@redhat.com>
Reviewed-by: Aashish Sharma <aasharma@redhat.com>
Reviewed-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Pere Diaz Bou <pdiazbou@redhat.com>
2021-06-18 20:04:16 +02:00
Nizamudeen A
ea89b60e3f mgr/dashboard: Fix 500 error while exiting out of maintenance
When you add a host in maintenance mode and then exit the maintenance
mode, a 500 server error will popup which will interrupt the whole
exit maintenance process and leave the host in an unknown/offline state.
It happened when I was setting the status of the host through the
HostSpec(). With this change, I am using the enter_maintenance api of
the orch to enable the maintenance.

Fixes: https://tracker.ceph.com/issues/51218
Signed-off-by: Nizamudeen A <nia@redhat.com>
2021-06-17 02:44:46 +05:30
Kefu Chai
75b91d49b8
Merge pull request #39624 from sebastian-philipp/mypy-812
src,qa: Upgrade to mypy 0.901

Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2021-06-14 22:53:02 +08:00
Patrick Donnelly
0d9032771c
qa: fix api test failures
"device_health_metrics" pool is gone -- .mgr pool is in.

I don't think the pool removal code in some test cases is necessary any
longer with recent changes to remove those warnings; so that code is
gone too.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2021-06-11 19:35:17 -07:00
Kefu Chai
7513b24aa5
Merge pull request #40480 from kamoltat/wip-ksirivad-fix-bug-49988
pybind/mgr/progress: Disregard unreported pgs

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2021-06-12 08:37:35 +08:00
Kamoltat
4b00f1c2bd pybind/mg/progress: Disregard unreported pgs
The global recovery event progress calculations only
takes into account pgs with `reported_epoch < start_epoch_of_event`
but sometimes the pgs doesn't get move before or after the creation
of the global recovery event, therefore this might result in a bug
where the global event gets stuck forever unless there is another
event that specifically makes the pgs that get stuck moves and updates
its `reported_epoch`.

Therefore, we decided to disregard pgs that are in active+clean state
but has `reported_epoch < start_epoch_of_event`.

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

Signed-off-by: Kamoltat <ksirivad@redhat.com>
2021-06-09 15:11:32 +00:00
Sebastian Wagner
1f6b4744b5 qa: Upgrade to mypy 0.901
mypy 0.9 now requires stub packages

Signed-off-by: Sebastian Wagner <sewagner@redhat.com>
2021-06-09 12:53:21 +02:00
Avan Thakkar
de1e0ccd7a mgr/dashboard: crushmap tree doesn't display crush type other than root
Fixes: https://tracker.ceph.com/issues/50971
Signed-off-by: Avan Thakkar <athakkar@redhat.com>
2021-06-08 20:04:00 +05:30
Nizamudeen A
7c1df692f2 mgr/dashboard: Include Network address and labels on Host Creation form
The ability to create host by specifying network address and also create
labels.

https://tracker.ceph.com/issues/50318
Signed-off-by: Nizamudeen A <nia@redhat.com>
2021-06-07 14:47:09 +05:30
Sridhar Seshasayee
328271d587 qa/tasks: Enhance wait_until_true() to check & retry recovery progress
With mclock scheduler enabled, the recovery throughput is throttled based
on factors like the type of mclock profile enabled, the OSD capacity among
others. Due to this the recovery times may vary and therefore the existing
timeout of 120 secs may not be sufficient.

To address the above, a new method called _is_inprogress_or_complete() is
introduced in the TestProgress Class that checks if the event with the
specified 'id' is in progress by checking the 'progress' key of the
progress command response. This method also handles the corner case where
the event completes just before it's called.

The existing wait_until_true() method in the CephTestCase Class is
modified to accept another function argument called "check_fn". This is
set to the _is_inprogress_or_complete() function described earlier in the
"test_turn_off_module" test that has been observed to fail due to the
reasons already described above. A retry mechanism of a maximum of 5
attempts is introduced after the first timeout is hit. This means that
the wait can extend up to a maximum of 600 secs (120 secs * 5) as long as
there is recovery progress reported by the 'ceph progress' command result.

Signed-off-by: Sridhar Seshasayee <sseshasa@redhat.com>
2021-06-02 14:19:48 +05:30
Avan Thakkar
e90ce333c6 mgr/dashboard: fix bucket versioning when locking is enabled
Fixes: https://tracker.ceph.com/issues/50545
Signed-off-by: Avan Thakkar <athakkar@redhat.com>
2021-05-05 17:24:41 +05:30
Sage Weil
a2c9333a0b qa/tasks/mgr/test_dashboard: skip test_standby if mgr_standby_modules=false
Signed-off-by: Sage Weil <sage@newdream.net>
2021-04-16 16:00:31 -04:00
Jos Collin
90ec86d8ff
qa: Update the mdsmap schema in mgr/dashboard/test_health.py
Fixed the error:
tasks.mgr.dashboard.helper._ValError: In `input['fs_map']['filesystems'][0]['mdsmap']`: unknown keys: {'flags_state'}
Traceback (most recent call last):
File "/home/jenkins-build/build/workspace/ceph-api/qa/tasks/mgr/dashboard/test_health.py", line 273, in test_full_health
self.assertSchema(data, schema)

Fixes: https://tracker.ceph.com/issues/48683
Signed-off-by: Jos Collin <jcollin@redhat.com>
2021-04-09 17:34:19 +05:30
Kefu Chai
39b2b5edc0 qa/tasks/mgr: skip test_diskprediction_local on python>=3.8
query the python version before trying to test diskprediction_local

Fixes: https://tracker.ceph.com/issues/50196
Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-04-07 21:27:44 +08:00
Avan Thakkar
9456884c29 mgr/dashboard: Display users current quota usage
Fixes: https://tracker.ceph.com/issues/45965

Signed-off-by: Avan Thakkar <athakkar@redhat.com>
2021-03-18 18:48:37 +05:30
Alfonso Martínez
4b96bb51e8 mgr/dashboard: fix issues related with PyJWT versions >=2.0.0
Fixes: https://tracker.ceph.com/issues/49574
Signed-off-by: Alfonso Martínez <almartin@redhat.com>
2021-03-03 15:36:06 +01:00
Sage Weil
7853a0ed8e Merge PR #39429 into master
* refs/pull/39429/head:
	qa/tasks/mgr/dashboard: identify cluster in telemetry test

Reviewed-by: Yaarit Hatuka <yaarithatuka@gmail.com>
Reviewed-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
2021-02-26 12:20:20 -05:00
Alfonso Martínez
94fe271b06 mgr/dashboard: select any object gateway on local cluster.
Dashboard backend settings:
- Refactoring: now accepting more than 1 type of value.
- RGW_API_ACCESS_KEY & RGW_API_SECRET_KEY accept string (backward compatibility: legacy behavior) as well as dictionary of strings for connecting multiple daemons.
- Ease of use: deprecated: mgr/dashboard/RGW_API_USER_ID: not useful anymore (kept for backward compatibility).

UI/UX:
- Created context component (to be shown only on rgw-related routes) for selecting operating daemon.
- Daemon selector only shown if there is more than 1 daemon running on a local cluster (to reduce cognitive load).

Fixes: https://tracker.ceph.com/issues/47375
Signed-off-by: Alfonso Martínez <almartin@redhat.com>
2021-02-24 08:21:11 +01:00
Sage Weil
e754044d51 Merge PR #39596 into master
* refs/pull/39596/head:
	qa/tasks/mgr/dashboard: add wear_level to devices schema

Reviewed-by: Alfonso Martínez <almartin@redhat.com>
Reviewed-by: Nizamudeen A <nia@redhat.com>
2021-02-23 10:50:59 -05:00
Sage Weil
6f6792cf51 qa/tasks/mgr/dashboard: add wear_level to devices schema
Signed-off-by: Sage Weil <sage@newdream.net>
2021-02-22 10:32:29 -06:00