Commit Graph

450 Commits

Author SHA1 Message Date
Kefu Chai
9000afb24b qa/tasks/mgr/orch: s/service ls/ps/
to fix the broken test of "test_load_data". it's a regression introduced
by aacc9a650f

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-02-15 18:41:18 +08:00
Kefu Chai
7d262db114 qa/tasks: call super class's setUp()
to address the regression introduced by
8729281121

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-02-15 12:39:08 +08:00
Kefu Chai
87172bcf63 mgr/dashboard: s/fsid/mirror_uuid/
to fix the broken rbd-mirror test. it's a regression introduced by
7b07e3c9dc

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-02-15 12:29:09 +08:00
Sage Weil
aacc9a650f mgr/orch: service ls -> ps, add DaemonDescription
- We keep ServiceDescription around unmodified (although it will need some
  cleanup later)
- We add DaemonDescription, and clean out the service-related ambiguities
- Add a new list_daemons() method for Orchestrator
- Add a new 'ceph orch ps' command
- In cephadm, drop get_services(), and implement list_daemons()
  - a million changes to make this work
- Adjust health alert and option names

Signed-off-by: Sage Weil <sage@redhat.com>
2020-02-12 11:14:17 -06:00
Sage Weil
95ecaad0d5 mgr/orch: split out daemon_action from service_action
Signed-off-by: Sage Weil <sage@redhat.com>
2020-02-12 11:14:17 -06:00
Kiefer Chang
9fd1743e1d
qa/tasks/mgr/dashboard/test_orchestrator: support addr attribute in inventory
The missing attribute `addr` causes error when loading dummy data.

Fixes: https://tracker.ceph.com/issues/44054
Signed-off-by: Kiefer Chang <kiefer.chang@suse.com>
2020-02-11 23:08:29 +08:00
Sage Weil
20205e70c4 mgr/orch: 'ceph orchestrator ...' -> 'ceph orch ...'
Less typing for all!

Signed-off-by: Sage Weil <sage@redhat.com>
2020-02-09 15:39:57 -06:00
Tatjana Dehler
4515ab32fa
Merge pull request #32546 from votdev/issue_43089_passwd_cmplx_config
mgr/dashboard: Make password policy check configurable

Reviewed-by: Stephan Müller <smueller@suse.com>
Reviewed-by: Tatjana Dehler <tdehler@suse.com>
Reviewed-by: Tiago Melo <tmelo@suse.com>
2020-02-06 09:44:48 +01:00
Kefu Chai
062e0365ea qa/tasks: drop test_cephadm_orchestrator.py
this test will end with a failure like

```
2020-01-30T18:15:15.870 INFO:tasks.ceph.mgr.x.smithi042.stderr:Warning: Permanently added 'smithi042.front.sepia.ceph.com,172.21.15.42' (ECDSA) to the list of known hosts.
2020-01-30T18:15:15.925 INFO:tasks.ceph.mgr.x.smithi042.stderr:Permission denied, please try again.
2020-01-30T18:15:15.932 INFO:tasks.ceph.mgr.x.smithi042.stderr:Permission denied, please try again.
2020-01-30T18:15:15.939 INFO:tasks.ceph.mgr.x.smithi042.stderr:root@smithi042.front.sepia.ceph.com: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
```

because mgr is not able to establish an ssh connection to that host with "root".
please note, the teuthology worker is acting using the "ubuntu" account on the
test node, and by default, "root" does not have its pubkey. and actually
`qa/tasks/cephadm.py` does push the pubkey to all the managed hosts before
testing cephadm.

since `qa/tasks/cephadm.py` is a better test for cephadm, let's just
drop this one.

as suites/rados/cephadm already covers cephadm

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-02-06 09:53:17 +08:00
Kiefer Chang
c9b12e2b66
qa/tasks/mgr/test_orchestrator_cli: support multiple DriveGroups
create_osds interface in Orchestrator supports multiple named DriveGroups
since https://github.com/ceph/ceph/pull/32972. Adapt the changes in
the test.

Fixes: https://tracker.ceph.com/issues/43945
Signed-off-by: Kiefer Chang <kiefer.chang@suse.com>
2020-02-04 14:31:21 +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
Volker Theile
3684d24a43 mgr/dashboard: Make password policy check configurable
Fixes: https://tracker.ceph.com/issues/43089

Signed-off-by: Volker Theile <vtheile@suse.com>
2020-01-31 11:28:17 +01:00
Sage Weil
81fc73b24e Merge PR #32788 into master
* refs/pull/32788/head:
	qa/tasks/mgr/dashboard: set pg_num to 32
	mgr/pg_autoscaler: default to pg_num[_min] = 32

Reviewed-by: Sage Weil <sage@redhat.com>
2020-01-24 08:32:13 -06:00
Neha
d6e720b29e qa/tasks/mgr/dashboard: set pg_num to 32
Signed-off-by: Neha Ojha <nojha@redhat.com>
2020-01-22 16:38:38 +00:00
Volker Theile
944490f34f mgr/dashboard: Clone an existing user role
Fixes: https://tracker.ceph.com/issues/43603

Signed-off-by: Volker Theile <vtheile@suse.com>
2020-01-21 14:51:56 +01:00
Laura Paduano
f22247fd28
Merge pull request #32032 from votdev/issue_43088_passwd_async_validator
mgr/dashboard: Process password complexity checks immediately

Reviewed-by: Lenz Grimmer <lgrimmer@suse.com>
Reviewed-by: Tatjana Dehler <tdehler@suse.com>
Reviewed-by: Stephan Müller <smueller@suse.com>
Reviewed-by: Tiago Melo <tmelo@suse.com>
2020-01-14 11:15:10 +01:00
Kefu Chai
7210d7f951 qa/tasks/mgr: set mgr module option with --force
if mgr is not active, monitor will refuse to set any option consumed by
mgr modules.

the reason the tests pass somtimes is that, we have a racing here:

1. stop all mgr daemons
2. MgrMonitor gets updated and updates its mgr_module_options
accordingly.
3. in TestDashboard.setUp(), we reset the port number for dashboard
using "ceph config set mgr mgr/dashboard/y/ssl_server_port 7789"
4. restart all mgr daemons

but the 2nd step and 3rd step could race with each other, if the 2nd
step happens after 3rd step, the test passes. otherwise it fails.

in this change, "--force" is passed to the "ceph config set" command,
so ConfigMonitor can bypass the sanity test for the option, and just
set this option.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-01-10 13:28:34 +08:00
Kefu Chai
2fe9771842
Merge pull request #32575 from tchaikov/wip-43227
qa/tasks/mgr/dashboard: set pg_num to 16

Reviewed-by: Volker Theile <vtheile@suse.com>
Reviewed-by: Sebastian Wagner <swagner@suse.com>
Reviewed-by: Tatjana Dehler <tdehler@suse.com>
Reviewed-by: Laura Paduano <lpaduano@suse.com>
2020-01-09 23:23:15 +08:00
Kefu Chai
15a5ebdce2 qa/tasks/mgr/dashboard: set pg_num to 16
as the default pg_num is now 16 since 78bf9244, and the minimum pg_num
is also 16 in autoscaler since 78bf9244.

Fixes: https://tracker.ceph.com/issues/43227
Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-01-09 20:54:56 +08:00
Tatjana Dehler
1c18ca31fd
Merge pull request #32234 from votdev/better_orch_exception
mgr/dashboard: Throw a more meaningful exception

Reviewed-by: Sebastian Wagner <swagner@suse.com>
Reviewed-by: Tatjana Dehler <tdehler@suse.com>
Reviewed-by: Tiago Melo <tmelo@suse.com>
2020-01-09 13:41:43 +01:00
Tatjana Dehler
b9094f1e17 mgr/dashboard: fix failing user tests
Choose another future_date_1 date (9 days instead of 10) to
make sure the expiration date will be between future_date_1
and future_date_2. Otherwise the expiration date might be
equal to future_date_1.
Also wait for 10 seconds before the password refresh in
test_pwd_expiration_date_update to prevent date equality.

Fixes: https://tracker.ceph.com/issues/43431
Signed-off-by: Tatjana Dehler <tdehler@suse.com>
2020-01-07 11:56:52 +01:00
Kefu Chai
0150ac9daa
Merge pull request #32518 from tchaikov/wip-orchestrator-service-action-tests
qa/tasks/mgr/test_orchestrator_cli: fix service action tests

Reviewed-by: Thomas Bechtold <tbechtold@suse.com>
Reviewed-by: Sebastian Wagner <swagner@suse.com>
2020-01-07 17:44:10 +08:00
Kefu Chai
ccfaf40491
Merge pull request #32428 from tchaikov/wip-qa-mgr-mon-update
qa/tasks/mgr/test_orchestrator_cli: fix "mon update" test

Reviewed-by: Sebastian Wagner <swagner@suse.com>
2020-01-07 16:29:34 +08:00
Kefu Chai
4c98b3224e qa/tasks/mgr/test_orchestrator_cli: fix service action tests
in b77f0c74a5, "reload"
service[-instance] action was dropped. so replace "reload" with
"restart" in the related tests.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-01-07 16:00:04 +08:00
Volker Theile
bf567f4308 mgr/dashboard: Various fixes
* Remove scope and permission check from UserPasswordPolicy controller again, otherwise the Angular UI validator can't be executed for users without that privilege.
* Remobe obsolete QA test.

Signed-off-by: Volker Theile <vtheile@suse.com>
2020-01-02 11:06:58 +01:00
Tatjana Dehler
7015c2a82b mgr/dashboard: fix REST API test cases
1. Fix the test cases by using the 'assertJsonBody'
   method. The '_post' method doesn't return anything.
   That's why we need to use the 'assertJsonBody'
   method here instead of checking the fields directly.

2. Add the missing scope and permission definition of the
   'validate_password' resource. Otherwise the resource
   is not restricted and 'test_validate_password_invalid_permissions'
   will fail.

3. Re-word error messages. Change 'cannot' to 'must not'.

Signed-off-by: Tatjana Dehler <tdehler@suse.com>
2020-01-02 10:49:37 +01:00
Volker Theile
01c4bcadf6 mgr/dashboard: Process password complexity checks immediately
- Add 'api/user/validate_password' endpoint to check if a
  password meets the password policy. A new controller has
  to be added for 'api/user' which has NO security scope,
  otherwise it wouldn't be possible for users without USER
  privileges to call the endpoint.
- Add Angular async validator to check if the entered password
  meets the policy.

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

Signed-off-by: Volker Theile <vtheile@suse.com>
2020-01-02 10:49:37 +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
Kefu Chai
37fd93d67e qa/tasks/mgr/test_orchestrator_cli: fix "mon update" test
we need at least one of "hosts" and "label" since
1498170aaa

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-12-26 16:31:47 +08:00
Sage Weil
2b2c122fd8 qa/tasks/mgr/test_orchestrator_cli: fix device ls test
No more "$host:" formatting as of 594179f1aa

Signed-off-by: Sage Weil <sage@redhat.com>
2019-12-20 16:14:34 -06:00
Volker Theile
b7a40007ad mgr/dashboard: Use @raise_if_no_orchestrator
Signed-off-by: Volker Theile <vtheile@suse.com>
2019-12-16 12:44:59 +01: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
Sage Weil
cd1c05acbb mgr/ssh -> mgr/cephadm
Signed-off-by: Sage Weil <sage@redhat.com>
2019-12-11 19:14:24 -06: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
Sage Weil
99eb52b68a mgr/orchestrator_cli: make rgw rm take realm+zone
And adjust test accordingly

Signed-off-by: Sage Weil <sage@redhat.com>
2019-12-07 23:41:36 -06:00
Sage Weil
7e1f445422 qa/tasks/mgr/test_orchestrator_cli: fix rgw add test
Signed-off-by: Sage Weil <sage@redhat.com>
2019-12-07 08:14:59 -06:00
Sage Weil
0d1c74a578 Merge PR #32023 into master
* refs/pull/32023/head:
	qa/tasks/mgr/test_orchestrator_cli: test with valid network or IP
	qa/orchestrator: do not test "mon update 3 host1"

Reviewed-by: Sebastian Wagner <swagner@suse.com>
Reviewed-by: Joshua Schmid <jschmid@suse.de>
2019-12-07 08:05:24 -06:00
Sage Weil
fbee608dee qa/tasks/mgr/test_orchestrator_cli: test with valid network or IP
Passing 'network' will fail with

Error EINVAL: Failed to parse host list: '['host1:network', 'host2:network', 'host3:network']': u'network' does not appear to be an IPv4 or IPv6 address

Signed-off-by: Sage Weil <sage@redhat.com>
2019-12-06 21:26:13 -06: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
Kefu Chai
f7b43f6d40 qa/orchestrator: do not test "mon update 3 host1"
as the network in host spec is always required now

Fixes: https://tracker.ceph.com/issues/43132
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-12-05 13:25:54 +08:00
Laura Paduano
c0a409944a
Merge pull request #31906 from s0nea/wip-dashboard-fix-pg-num-warning
mgr/dashboard: fix tests in order to match pg num conventions

Reviewed-by: Alfonso Martínez <almartin@redhat.com>
Reviewed-by: Laura Paduano <lpaduano@suse.com>
2019-12-04 14:20:39 +01:00
Kefu Chai
42579be473 mgr/orchestrator: add optional "format" param for "orchestrator host ls"
and update the test accordingly

Fixes: https://tracker.ceph.com/issues/43078
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-12-02 19:27:57 +08: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
Sebastian Wagner
6abc9e95bd qa/orchestrator: Adapt teuthology test to new completions
Also: Adapt mgr/test_orchestrator to new completions

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2019-11-27 13:38:20 +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
Sebastian Wagner
a70ec42cad mgr/orchestrator: Improve ceph CLI for blink lights
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2019-11-05 13:55:12 +01:00
Sebastian Wagner
157fb06fac mgr/orchestrator: check for DEVICE_{IDENT|FAULT}_ON
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2019-11-05 13:02:29 +01:00
Sebastian Wagner
b14ae26a69 mgr/orchestrator: Add interface and tests to device lights
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2019-11-05 13:02:29 +01: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
Lenz Grimmer
2f4c2440e8
Merge pull request #30478 from votdev/issue_41930_standby_dashboard
mgr/dashboard: Standby Dashboards don't handle all requests properly

Reviewed-by: Alfonso Martínez <almartin@redhat.com>
2019-09-27 09:37:37 +00: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
Volker Theile
9397a581c6 mgr/dashboard: CephFS snapshots/quota REST API
This PR will introduce new endpoints for the CephFS REST API controller:
* ls_dir
* mk_dirs
* rm_dir
* mk_snapshot
* rm_snapshot
* get_quotas
* set_quotas

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

Signed-off-by: Volker Theile <vtheile@suse.com>
2019-09-23 13:59:07 +02:00
Volker Theile
59a7bb209d mgr/dashboard: test_mgr_module QA test has not been adapted to latest controller changes
Fixes: https://tracker.ceph.com/issues/41993

Signed-off-by: Volker Theile <vtheile@suse.com>
2019-09-23 12:54:35 +02:00
Lenz Grimmer
35674ff19c
mgr/dashboard: fix error when linking a bucket to a tenanted u… (#30123)
mgr/dashboard: fix error when linking a bucket to a tenanted user

Reviewed-by: Alfonso Martínez <almartin@redhat.com>
Reviewed-by: Volker Theile <vtheile@suse.com>
2019-09-23 10:49:48 +00:00
Kefu Chai
2687e5f20c qa/tasks/mgr/dashboard/test_health: update schema
see 351a3b9d38

Fixes: https://tracker.ceph.com/issues/41947
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-09-22 20:45:24 +08:00
Volker Theile
29cc91f92d mgr/dashboard: Standby Dashboards don't handle all requests properly
Fixes: https://tracker.ceph.com/issues/41930

Signed-off-by: Volker Theile <vtheile@suse.com>
2019-09-19 16:30:15 +02:00
Kiefer Chang
7866c5fc8f
mgr/dashboard: fix error when linking a bucket to a tenanted user
- Prefix bucket name with '/' when linking bucket to a tenanted user
- Add qa tests

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

Signed-off-by: Kiefer Chang <kiefer.chang@suse.com>
2019-09-19 14:20:51 +08:00
Stephan Müller
aae81f5f6c mgr/dashboard: CephFS tab Component
The problem was that the CephFS details component was entirely responsible for
managing all other tabs besides it's own. Besides that many API requests
were triggered, which now has been reduced to just one request which is
fired inside the tabs component.

I added an endpoint which contains all adaptations that were done in the
frontend before. This limits the request size and increases the
performance (at least a bit).

Fixes: https://tracker.ceph.com/issues/41372
Signed-off-by: Stephan Müller <smueller@suse.com>
2019-09-17 12:16:26 +02:00