Commit Graph

42 Commits

Author SHA1 Message Date
Ramana Raja
4b2911fc70
Merge pull request #32581 from rishabh-d-dave/wip-djf-15070
mon, cephfs: Add auth caps for CephFS fsids

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Ramana Raja <rraja@redhat.com>
2020-09-12 00:00:52 +05:30
Rishabh Dave
07e493ffb5 qa/cephfs: allow reusing mount objects and add remount method
This commit introduces following two set of changes -

First, make client keyring path, mountpoint on host FS and CephFS and
CephFS's name attributes of the object representing the mount
and update all the mount object creation calls accordingly. Also,
rewrite all the mount object creation to use keyword arguments instead
of positional arguments to avoid mistakes, especially since a new
argument was added in this commit.

Second, add remount method to mount.py so that it's possible to unmount
safely, modify the attributes of the object representing the mount and
mount again based on new state of the object *in a single call*. The
method is placed in mount.py to avoid duplication.

This change has two leads to two more changes: upgrading interface of
mount() and mount_wait() and upgrading testsuites to adapt to these
change.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2020-09-10 17:10:51 +05:30
Kyr Shatskyy
3aaec3fe91 qa/tasks/cephfs: use remote.write_file
Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@suse.com>
2020-09-04 00:02:15 +02:00
Patrick Donnelly
c4f5de0058 *: convert EBLACKLISTED to EBLOCKLISTED
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2020-08-24 19:53:08 +00:00
Sage Weil
dfd01d7653 blacklist -> blocklist
Signed-off-by: Sage Weil <sage@newdream.net>
Signed-off-by: Neha Ojha <nojha@redhat.com>
2020-08-24 19:53:08 +00:00
Kefu Chai
28c7ba68ae
Merge pull request #34732 from lxbsz/fs_fix_new
qa: misc fixes to run for cephfs qa test

Reviewed-by: Kefu Chai <kchai@redhat.com>
2020-04-26 01:46:30 +08:00
Kefu Chai
d07960ef7a
Merge pull request #34578 from lxbsz/volume_client_py3
qa/volume_client: be python3 compatible

Reviewed-by: Ramana Raja <rraja@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2020-04-25 18:58:43 +08:00
Xiubo Li
8921c8e1dc qa/cephfs: switch to mount_wait() to avoid possible umounted assert
For the fuse mount, it sometime will need to wait to a moment to let
the client get ready.

Signed-off-by: Xiubo Li <xiubli@redhat.com>
2020-04-25 06:21:55 -04:00
Xiubo Li
7f57576123 qa/cephfs: fix AssertionError: CommandFailedError not raised under py3
Signed-off-by: Xiubo Li <xiubli@redhat.com>
2020-04-25 06:21:54 -04:00
Xiubo Li
0ed507dfd4 qa/volume_client: fix TestVolumeClient failing under new py3 runtime
The pybind now has dropped the WITH_PYTHON2 option, and for now only
py3 supported.

Fixes: https://tracker.ceph.com/issues/45103
Signed-off-by: Xiubo Li <xiubli@redhat.com>
2020-04-20 07:04:52 -04:00
Xiubo Li
5c24d91327 qa/tasks/cephfs: add mount_wait() support to simplify the code
Mostly we should wait the mountpoint to get ready, especially for
the fuse mountpoint, sometimes it may take a few seconds to get
ready.

Fixes: https://tracker.ceph.com/issues/44044
Signed-off-by: Xiubo Li <xiubli@redhat.com>
2020-04-14 07:47:04 -04:00
Kefu Chai
21d6c5a95b qa/tasks/cephfs: use assertCountEqual if PY3
assertItemsEqual is renamed to assertCountEqual in Python3.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-04-07 21:51:22 +08:00
Sage Weil
3c751fea7f qa/tasks/cephfs: python3
Signed-off-by: Sage Weil <sage@redhat.com>
2019-12-18 21:51:52 -06: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
Patrick Donnelly
be1fa70b84
qa: do not check pg count for new data_isolated volume
We don't need to specify the number of PGs for a new data pool anymore
since b1b821f60812dd36e61be115c5ad8223ab51befe and other related
changes. The related health warnings are also deprecated/gone. So this
no longer needs to be done.

Fixes: b1b821f60812dd36e61be115c5ad8223ab51befe
Fixes: https://tracker.ceph.com/issues/42436
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2019-10-23 11:14:28 -07:00
Patrick Donnelly
64059d6479
Merge PR #28692 into master
* refs/pull/28692/head:
	test_volume_client: add positive test for ceph_volume_client method
	test_volume_client: rename test_put_object_versioned()
	test_volume_client: rewrite test_put_object_versioned
	test_volume_client: use sudo_write_file() form teuthology
	test_volume_client: make test_object_versioned py3 compatible

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2019-07-18 14:03:50 -07:00
Rishabh Dave
9aa9ff01fd test_volume_client: add positive test for ceph_volume_client method
ceph_volume_client.py's put_object_versioned() has only one test. Since
this only test is a negative test it may fail to assure that
put_object_versioned() works as expected with positive inputs even when
it completes successfully. Therefore, write a positive test for better
coverage.

Also, make sure the new test is both python 2 and python3 compatible.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2019-07-13 11:43:03 +05:30
Rishabh Dave
7980e1fb7c test_volume_client: rename test_put_object_versioned()
test_put_object_versioned() is too generic for a negative test that
specifically tests if the version is verified before writing.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2019-07-13 11:43:03 +05:30
Rishabh Dave
37744ecc2b test_volume_client: rewrite test_put_object_versioned
The test's success depends on whether CommandFailedError exception is
raised. This manner of testing is unreliable since there's no way to
check if the exception was raised by the statement (in the embedded
Python program) the test expects to.

This implies that this test's failure may go undetected. This is primary
reason why bugs like tracker #38946 occured despite of having a test.

Fixes: http://tracker.ceph.com/issues/39510
Signed-off-by: Rishabh Dave <ridave@redhat.com>
2019-07-13 11:43:03 +05:30
Rishabh Dave
878c34c701 test_volume_client: use sudo_write_file() form teuthology
Instead of defining another method to write a file as root user in
test_volume_client.py, use the method from teuthology/misc.py.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2019-07-13 11:11:02 +05:30
Rishabh Dave
975b47502d test_volume_client: make test_object_versioned py3 compatible
Convert strings to bytes in the Python program embedded inside this
test. Also, in the process don't lose Python 2 compatibility.

Fixes: http://tracker.ceph.com/issues/39405
Signed-off-by: Rishabh Dave <ridave@redhat.com>
2019-07-13 11:10:58 +05:30
Kefu Chai
90022b35ab
Merge pull request #17619 from liuchang0812/wip-ec-below-min-size
osd: allow EC PGs to do recovery below min_size

Reviewed-by: Neha Ojha <nojha@redhat.com>
Reviewed-by: Greg Farnum <gfarnum@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2019-06-22 12:58:55 +08:00
Rishabh Dave
d78e035432 test_volume_client: declare only one default for python version
Fixes: http://tracker.ceph.com/issues/40460
Signed-off-by: Rishabh Dave <ridave@redhat.com>
2019-06-20 12:18:49 +05:30
Rishabh Dave
4870574473 test_volume_client: don't shadow class variable
Name class and instance variables differently so that the latter doesn't
shadow the former.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2019-06-19 17:50:55 +05:30
Lianne
7c7c7870d3 qa/tasks/cephfs/test_volume_client: print py2 or py3 which the test case runs
Fixes: http://tracker.ceph.com/issues/40184

Signed-off-by: Lianne <liyan.wang@xtaotech.com>
2019-06-11 18:27:06 +08:00
Rishabh Dave
79d62dd874 test_volume_client: simplify test_get_authorized_ids()
Signed-off-by: Rishabh Dave <ridave@redhat.com>
2019-05-20 11:30:07 +02:00
Greg Farnum
0ee63a0450 qa: extend get_pool_property() to allow non-int values
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2019-05-10 10:45:25 +08:00
Patrick Donnelly
a5e3b0512c
qa: test py2 and py3 for volume client
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2018-07-30 16:12:48 -07:00
Rishabh Dave
f28274dc70
qa: make test_volume_client.py py3 compatible
Signed-off-by: Rishabh Dave <ridave@redhat.com>
2018-07-30 16:12:48 -07:00
Rishabh Dave
2f35ade05f
qa/ceph-volume: allow executing python pyloads using python3
Signed-off-by: Rishabh Dave <ridave@redhat.com>
2018-07-30 16:12:48 -07:00
Rishabh Dave
8ab6f84d57 qa/ceph-volume: add a test for put_object_versioned()
Test if the version passed to put_object_versioned() is used to
crosscheck.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2018-06-28 15:25:00 +00:00
Patrick Donnelly
3838674f65 qa: ignore version in auth metadata comp
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2018-05-08 20:15:24 +05:30
Ramana Raja
3a7fdb8b05 ceph_volume_client: allow volumes without namespace isolation
Fixes: https://tracker.ceph.com/issues/23695

Signed-off-by: Ramana Raja <rraja@redhat.com>
2018-05-08 20:15:15 +05:30
Patrick Donnelly
36b51db0e6
qa: fix blacklisted check for test_lifecycle
Caused by: 36f89c5acf0385f13be2f39bc8d30621f4bf0115

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

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2018-05-02 15:13:39 -07:00
Ramana Raja
baf3b88800 ceph_volume_client: fix setting caps for IDs
... that have empty OSD and MDS caps. Don't add a ',' at the
start of OSD and MDS caps.

Fixes: http://tracker.ceph.com/issues/21501
Signed-off-by: Ramana Raja <rraja@redhat.com>
2017-09-29 17:06:05 +05:30
Patrick Donnelly
1aef50a1ed
Merge PR #17697 into master
* refs/remotes/upstream/pull/17697/head:
	pybind/ceph_volume_client: add get, put, and delete object interfaces
	pybind/ceph_volume_client: remove 'compat_version'
	pybind/ceph_volume_client: set the version

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2017-09-28 18:26:06 -07:00
Ramana Raja
d1bd171d6b pybind/ceph_volume_client: add get, put, and delete object interfaces
Wrap low-level rados APIs to allow ceph_volume_client to get, put, and
delete objects. The interfaces would allow OpenStack Manila's
cephfs driver to store config data in a shared storage to implement
highly available Manila deployments. Restrict  write(put) and
read(get) object sizes to 'osd_max_size' config setting.

Signed-off-by: Ramana Raja <rraja@redhat.com>
2017-09-22 16:24:38 +05:30
Sage Weil
986b86fbeb mon: rename mon_pg_warn_max_per_osd -> mon_max_pg_per_osd
Signed-off-by: Sage Weil <sage@redhat.com>
2017-09-14 16:00:31 -04:00
Douglas Fuller
552225f329 qa/cephfs: Fix race in test_volume_client
Signed-off-by: Douglas Fuller <dfuller@redhat.com>
2017-08-04 14:38:50 -04:00
John Spray
ee2683c804 qa: update TestVolumeClient for new blacklisting
Blacklisted clients will now proactively fail
outstanding operations, rather than blocking.

Signed-off-by: John Spray <john.spray@redhat.com>
2017-05-23 05:22:18 -04:00
John Spray
c91ccac6f6 qa: remove outdated TODO in TestVolumeClient
Signed-off-by: John Spray <john.spray@redhat.com>
2017-05-23 05:22:17 -04:00
Sage Weil
c01f2ee0e2 move ceph-qa-suite dirs into qa/ 2016-12-14 11:29:55 -06:00