Commit Graph

377 Commits

Author SHA1 Message Date
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
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
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
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