Commit Graph

249 Commits

Author SHA1 Message Date
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
1143de2ff8
mgr/dashboard: CephFS quota management (#31811)
mgr/dashboard: CephFS quota management

Reviewed-by: Patrick Seidensal <pnawracay@suse.com>
Reviewed-by: Ricardo Marques <rimarques@suse.com>
Reviewed-by: Tatjana Dehler <tdehler@suse.com>
Reviewed-by: Volker Theile <vtheile@suse.com>
2019-12-16 09:55:36 +00:00
Lenz Grimmer
efdcbcc6e1
mgr/dashboard: add password expiration date (#30939)
mgr/dashboard: add password expiration date

Reviewed-by: Ricardo Marques <rimarques@suse.com>
Reviewed-by: Tiago Melo <tmelo@suse.com>
2019-12-16 09:49:16 +00:00
Stephan Müller
16bae1a3e3 mgr/dashboard: CephFS quota management
Now both CephFS quotas can be changed with a validation against the next
tree maximum in the file tree, that prevents setting the quotas in a way
that would not be usable.

Fixes: https://tracker.ceph.com/issues/38287
Signed-off-by: Stephan Müller <smueller@suse.com>
2019-12-13 15:15:34 +01:00
Tatjana Dehler
0221241909 mgr/dashboard: add password expiration date
Add a 'pwd_expiration_date' field to the User object to be able
to set password expiration date per user.

There are two options to set a password expiration date for a
user:

1. Set the 'USER_PWD_EXPIRATION_SPAN' setting. If defined
   the expiration date of the password will be calculated
   automatically based on the given value. It will also be
   updated automatically when the user changes the password.
2. Set an expiration date by setting the 'pwdExpirationDate'
   field when creating a user.

Add two more settings in addition: USER_PWD_EXPIRATION_WARNING_1
and USER_PWD_EXPIRATION_WARNING_2. These two settings are
defining the amount of days to notify the user that his password
will expiration soon.

It's not possible to set the 'pwd_expiration_date' field to a
date in the past.

If the password of a user is already expired he is no longer
allowed to log into the dashboard.

Fixes: https://tracker.ceph.com/issues/40329
Signed-off-by: Tatjana Dehler <tdehler@suse.com>
2019-12-13 08:53:05 +01:00
Thomas Bechtold
0127cd1e88 qa: Enable flake8 tox and fix failures
There were a couple of problems found by flake8 in the qa/
directory (most of them fixed now). Enabling flake8 during the usual
check runs hopefully avoids adding new issues in the future.

Signed-off-by: Thomas Bechtold <tbechtold@suse.com>
2019-12-12 10:21:01 +01:00
Tatjana Dehler
6a988938ac qa/tasks/mgr/dashboard/test_health: update schema
Fixes: https://tracker.ceph.com/issues/43195
Signed-off-by: Tatjana Dehler <tdehler@suse.com>
2019-12-09 16:12:12 +01:00
Lenz Grimmer
64009101f8
mgr/dashboard: adapt to create_osds parameters change (#31928)
mgr/dashboard: adapt to create_osds parameters change

Reviewed-by: Laura Paduano <lpaduano@suse.com>
Reviewed-by: Sebastian Wagner <swagner@suse.com>
2019-12-06 14:57:27 +00:00
Jason Dillaman
10e9132bf8 mgr/dashboard: new controller for RBD mirroring peer bootstrapping
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2019-12-05 09:32:42 -05:00
Jason Dillaman
849b64d11a mgr/dashboard: new controller for RBD mirroring site name
This allows setting and retrieving the current site name for
RBD mirroring. This is a global property of the cluster.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2019-12-05 09:32:42 -05:00
Jason Dillaman
19272432a2 mgr/dashboard: fix broken rbd-mirror dashboard API test case
Fixes: https://tracker.ceph.com/issues/42512
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2019-12-05 09:32:41 -05:00
Lenz Grimmer
3bdbf94e44
mgr/dashboard: Check password complexity in Dashboard CLI comm… (#31916)
mgr/dashboard: Check password complexity in Dashboard CLI commands

Reviewed-by: Ricardo Marques <rimarques@suse.com>
Reviewed-by: Tatjana Dehler <tdehler@suse.com>
2019-12-05 09:46:14 +00:00
Tatjana Dehler
ee46e58e5d mgr/dashboard: fix tests in order to match pg num conventions
Update the tests test_ganesha and test_rbd_mirroring in order
to match the PG num conventions. It prevents the health warning
'POOL_PG_NUM_NOT_POWER_OF_TWO' from being shown.

Signed-off-by: Tatjana Dehler <tdehler@suse.com>
2019-12-02 09:56:28 +01:00
Kiefer Chang
b414bf5610
mgr/dashboard: adapt to create_osds parameters change
Parameters of `create_osds` are changed after PR:
https://github.com/ceph/ceph/pull/30262.
Adapt dashboard backend to the change. Also a new test for creating OSDs
is added in backend QA.

Fixes: https://tracker.ceph.com/issues/43074
Signed-off-by: Kiefer Chang <kiefer.chang@suse.com>
2019-12-02 12:36:13 +08:00
Volker Theile
6f0b3179b9 mgr/dashboard: Check password complexity in Dashboard CLI commands
- Refactor parts of the existing password complexity code.
- Check password complexity when setting password via Dashboard CLI commands.
- Add ability to force setting a password via CLI. This is useful in vstart environments or wherever it is necessary to disable the password complexity check.

Signed-off-by: Volker Theile <vtheile@suse.com>
2019-11-29 11:12:55 +01:00
Laura Paduano
b0057c02ba
Merge pull request #31720 from rhcs-dashboard/fix-42708-master
mgr/dashboard: remove traceback/version assertions

Reviewed-by: Alfonso Martínez <almartin@redhat.com>
Reviewed-by: Sebastian Wagner <sebastian.wagner@suse.com>
Reviewed-by: Volker Theile <vtheile@suse.com>
2019-11-28 11:36:32 +01:00
Ernesto Puerta
93bf7ddde1
mgr/dashboard: remove traceback/version assertions
Debug mode (https://github.com/ceph/ceph/pull/30522) by default hides
Cherrypy version and Python traceback on Error responses. Both can be
displayed optionally.

Some QA tests expect these two fields to be present in the error
responses and fail otherwise.

Fixes: https://tracker.ceph.com/issues/42708
Fixes: https://github.com/ceph/ceph/pull/30522
Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
2019-11-19 11:37:58 +01:00
Stephan Müller
de933cd3c8 mgr/dashboard: Fix pool renaming functionality
The problem was that, if a pool was renamed the routine to update tried
to work on the old pool name and didn't used the info that the pool got
renamed, therefore an error occurred in the UI saying that the pool
could not be found.

Fixes: https://tracker.ceph.com/issues/42776
Signed-off-by: Stephan Müller <smueller@suse.com>
2019-11-13 17:25:30 +01:00
Stephan Müller
ca46c9941b mgr/dashboard: Fix pg_num counts in pool API tests
To prevent the not a number of two cluster health warning, all created
pools now have a pg_num that is a power of two.

Fixes: https://tracker.ceph.com/issues/42776
Signed-off-by: Stephan Müller <smueller@suse.com>
2019-11-13 17:25:29 +01:00
Stephan Müller
96fd06b7db mgr/dashboard: Refactor pool API tests
Renamed "__create_pool" to "__yield_pool" to make it's purpose clearer
and added a description.

Split up create pool test into three different tests.
Used "__yield_pool" for creation tests, too.

Fixes: https://tracker.ceph.com/issues/42776
Signed-off-by: Stephan Müller <smueller@suse.com>
2019-11-13 17:25:29 +01:00
Sebastian Wagner
62ce7af4b1
Merge pull request #30662 from sebastian-philipp/orchestrator-c-v-inventory
python-common, mgr/orchestrator, mgr/dashboard: Use common "Devices"

Reviewed-by: Kiefer Chang <kiefer.chang@suse.com>
Reviewed-by: Patrick Seidensal <pseidensal@suse.com>
2019-11-13 10:03:57 +01:00
Lenz Grimmer
4a28228969
mgr/dashboard: Support RBD namespaces (#30935)
Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Tatjana Dehler <tdehler@suse.com>
2019-11-12 09:50:50 +00:00
Sage Weil
c35b2c3a20 Merge PR #31501 into master
* refs/pull/31501/head:
	ceph-mon: bind to public_addrv if set (before public_addr or public_network)
	common/options: add public_addrv
	common/options: fix ADDRVEC parsing
	ceph-daemon: support --mon-addrv for deploy subcommand

Reviewed-by: Neha Ojha <nojha@redhat.com>
2019-11-11 18:09:29 -06:00
Ricardo Marques
688218cdbb mgr/dashboard: Support RBD namespaces
Fixes: https://tracker.ceph.com/issues/25125

Signed-off-by: Ricardo Marques <rimarques@suse.com>
2019-11-11 15:08:07 +00:00
Sebastian Wagner
f320f02923 mgr/orchestrator: move InventoryDevice to python-common
Adapted:
* `mgr/dashboard`
* `mgr/ansible`
* `mgr/rook`
* `mgr/ssh`
* `mgr/orchestrator_cli`

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
Co-authored--by: Kiefer Chang <kiefer.chang@suse.com>
2019-11-11 10:57:05 +01:00
Sage Weil
4ef7c2504b common/options: add public_addrv
Signed-off-by: Sage Weil <sage@redhat.com>
2019-11-09 15:41:21 -06:00
Ricardo Marques
1a9cd92d23 mgr/dashboard: RBD tests must use pools with power-of-two pg_num
Fixes: https://tracker.ceph.com/issues/42709

Signed-off-by: Ricardo Marques <rimarques@suse.com>
2019-11-08 15:43:58 +00:00
Lenz Grimmer
fe8f786b6e
mgr/dashboard: add missing test_orchestrator suite (#31198)
mgr/dashboard: add missing test_orchestrator suite

Reviewed-by: Kiefer Chang <kiefer.chang@suse.com>
Reviewed-by: Laura Paduano <lpaduano@suse.com>
Reviewed-by: Sebastian Wagner <swagner@suse.com>
Reviewed-by: Volker Theile <vtheile@suse.com>
2019-11-06 14:35:43 +00: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
Lenz Grimmer
03b07c5a57
mgr/dashboard: Fix OSD's safe_to_destroy method (#30499)
mgr/dashboard: Fix OSD's safe_to_destroy method

Reviewed-by: Patrick Seidensal <pnawracay@suse.com>
Reviewed-by: Stephan Müller <smueller@suse.com>
2019-11-05 11:21:16 +00:00
Tatjana Dehler
8244028ca2 mgr/dashboard: add missing test_orchestrator suite
Fixes: https://tracker.ceph.com/issues/42244
Signed-off-by: Tatjana Dehler <tdehler@suse.com>
2019-11-04 13:49:29 +01:00
Stephan Müller
a3a58c691f mgr/dashboard: CephFS directory component
Now it's possible to list directories of a CephFS in a tree view inside
the dashboard.

Currently the tree is not refreshed every 5 seconds as the listing of
directories is a heavier operation.

When a directory is clicked, the dashboard will fetch it's
subdirectories and the subdirectories of it's subdirectories in order to
show if the subdirectories have subdirectories.

The details of a directory show the full path, it's quota values and
the path they originate from and a list of all snapshots.

Fixes: https://tracker.ceph.com/issues/41575
Signed-off-by: Stephan Müller <smueller@suse.com>
2019-10-28 11:49:15 +01: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
Sage Weil
29c97547a9 Merge PR #30859 into master
* refs/pull/30859/head:
	auth: EACCES, not EPERM
	mon: shunt old tell commands from cli interface to asok
	mon: allow mgr to tell mon.foo smart
	mon: include quorum features in quorum_status
	qa/workunits/mon/caps.sh: fix test
	ceph_test_rados_api_cmd: fix MonDescribe test
	Merge branch 'vstart-fs-auth' of git://github.com/batrick/ceph into wip-cleanup-mon-asok
	test/pybind/test_ceph_argparse: fix tests
	vstart: add volume client keys to keyring
	vstart: use fs authorize to create master client key
	vstart: redirect some output to stderr
	vstart: output command strings to stderr
	qa/workunits/cephtool/test.sh: fix 'quorum enter' caller
	qa: change mon_status calls to quorum_status or tell commands
	mon: fix 'heap ...' command
	mon: consolidate 'sync force' commands
	mon: allow asok commands to return an error code
	mon: move 'quorum enter|exit' and 'mon_status' to asok
	mon: fix 'smart' asok command
	mon: remove old 'config set' and 'injectargs'

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2019-10-23 21:05:42 -05:00
Samuel Just
2157ac7d14 osd/: remove legacy schedulers
The consensus seems to be that PrioritizedQueue is strictly worse than
WeightedPriorityQueue.

mClockClientQueue and mClockClassQueue are superceded by
mClockScheduler.

Signed-off-by: Samuel Just <sjust@redhat.com>
2019-10-23 13:33:59 -07: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
Sage Weil
70367de903 qa: change mon_status calls to quorum_status or tell commands
The tests were doing logs of 'ceph mon_status'; change that to
quorum_status or tell.

Signed-off-by: Sage Weil <sage@redhat.com>
2019-10-12 12:05:36 -05:00
Tatjana Dehler
dcb70a3c0d mgr/dashboard: wait a moment after module load
After a dashboard module load we need to wait (10 secs)
for the module to be back again. Otherwise the module
might not be able to answer requests properly. It could
lead to issues in some cases, e.g.: 'Failed to establish
a new connection: [Errno 111] Connection refused'.

Signed-off-by: Tatjana Dehler <tdehler@suse.com>
2019-10-11 10:46:26 +02:00
Tatjana Dehler
a14163a589 mgr/dashboard: reset login to admin user
After logging in with a separate testuser, especially a read-only
user, we need to reset the login to the admin user. This is important
in order to be able to continue with further tests. If not doing so
further tests might fail with the following error response:
{"status": "401 Unauthorized",
 "detail": "You are not authorized to access that resource", ...}

Fixes: https://tracker.ceph.com/issues/42226,
https://tracker.ceph.com/issues/42227
Signed-off-by: Tatjana Dehler <tdehler@suse.com>
2019-10-11 10:46:26 +02:00
Tatjana Dehler
4dd83fd6aa mgr/dashboard: check for correct DashboardException error codes
We need to check for the correct error codes.
Otherwise the integration tests are going to fail.

Fixes: https://tracker.ceph.com/issues/42222
Signed-off-by: Tatjana Dehler <tdehler@suse.com>
2019-10-11 10:46:26 +02:00
Ricardo Marques
d611a6abc3
Merge pull request #30400 from rhcs-dashboard/fix-41867-master
mgr: change perf-counter precision to float

Reviewed-by: Ricardo Dias <rdias@suse.com>
Reviewed-by: Stephan Müller <smueller@suse.com>
2019-10-10 11:45:13 +01:00
Lenz Grimmer
2a143bfd1f
mgr/dashboard: Support minimum password complexity rules (#29532)
mgr/dashboard: Support minimum password complexity rules

Reviewed-by: Stephan Müller <smueller@suse.com>
Reviewed-by: Volker Theile <vtheile@suse.com>
2019-09-27 13:54:17 +00:00
Lenz Grimmer
1892a4e7a5
mgr/dashboard: CephFS snapshots/quota REST API (#30256)
mgr/dashboard: CephFS snapshots/quota REST API

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Kiefer Chang <kiefer.chang@suse.com>
Reviewed-by: Laura Paduano <lpaduano@suse.com>
Reviewed-by: Stephan Müller <smueller@suse.com>
2019-09-27 13:45:28 +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
Kefu Chai
7ae9ffff65
Merge pull request #30517 from tchaikov/wip-test/dashboard/scheme-allow-unknown
qa/tasks/mgr/dashboard/test_health: add "allow_unknown" in mgr_map

Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
2019-09-27 13:36:23 +08:00
Lenz Grimmer
b8951d43e6
Merge pull request #29460 from rhcs-dashboard/bucket-versioning
mgr/dashboard: enable/disable versioning on RGW bucket

Reviewed-by: Volker Theile <vtheile@suse.com>
2019-09-26 15:27:58 +00:00
Lenz Grimmer
36d1e644e1
mgr/dashboard: test_mgr_module QA test has not been adapted to… (#30513)
mgr/dashboard: Adapt test_mgr_module QA test to latest controller changes

Reviewed-by: Alfonso Martínez <almartin@redhat.com>
Reviewed-by: Laura Paduano <lpaduano@suse.com>
2019-09-26 08:48:31 +00:00
Alfonso Martínez
8955809716 mgr/dashboard: enable/disable versioning on RGW bucket
Fixes: https://tracker.ceph.com/issues/40920
Signed-off-by: Alfonso Martínez <almartin@redhat.com>
2019-09-26 08:41:14 +02:00
Kefu Chai
5399337d65 qa/tasks/mgr/dashboard/test_health: add "allow_unknown" in mgr_map
tests/functionalities are not broken if we add more fields to mgr_map.

see also #30507

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-09-23 23:25:16 +08:00
Kefu Chai
b6dc4b020a
Merge pull request #30507 from tchaikov/wip-mgr-features-in-mgrmap
qa/tasks/mgr/dashboard/test_health: update schema

Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Alfonso Martínez <almartin@redhat.com>
2019-09-23 23:18:01 +08:00