Commit Graph

275 Commits

Author SHA1 Message Date
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
Venky Shankar
aec1d90b36 test: add basic purge queue validation test
.. and since we have async subvolume deletes now, check
trash directory for emptiness in other tests.

Fixes: http://tracker.ceph.com/issues/40036
Signed-off-by: Venky Shankar <vshankar@redhat.com>
2019-07-07 23:58:16 -04:00
Venky Shankar
ae470a64ec test: cleanup removing all subvolumes before removing subvolume group
Test `test_subvolume_create_with_desired_mode_in_group()` creates three
subvolume in a subvolume group. During cleanup, it only removed two of
the three subvolumes. This causes failure when removing the subvolume
group since it's not empty.

Signed-off-by: Venky Shankar <vshankar@redhat.com>
2019-07-07 23:58:16 -04:00
Patrick Donnelly
0e25e4bb4e
Merge PR #27073 into master
* refs/pull/27073/head:
	qa/tasks: Check MDS failover during mon_thrash
	qa/tasks: Compare two FSStatuses
	qa/suites/fs: renamed default.yaml to mds.yaml
	qa/suites/fs: mon_thrash test for fs
	qa/tasks: Fix typo in the comment

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2019-07-01 15:31:55 -07:00
Patrick Donnelly
fcd0c82e30
Merge PR #28642 into master
* refs/pull/28642/head:
	mds: check last laggy before marking unresponsive client stale
	mds: remove the code that skip evicting the only client

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2019-07-01 14:56:54 -07:00
Venky Shankar
c404a30f5b
Merge pull request #28706 from ajarr/wip-fs-subvolumes-enhancements
mgr/volumes: minor enhancements and fixes
2019-06-27 19:38:49 +05:30
Ramana Raja
5c00cc30a1 mgr/volumes: allow setting mode
... of fs subvolumes and subvolume groups during their creation.

Fixes: https://tracker.ceph.com/issues/40299
Signed-off-by: Ramana Raja <rraja@redhat.com>
2019-06-27 02:07:56 +05:30
Ramana Raja
22ed891528 mgr/volumes: allow setting data pool layout
... of fs subvolumes and subvolume groups during their creation.

Fixes: https://tracker.ceph.com/issues/40431
Signed-off-by: Ramana Raja <rraja@redhat.com>
2019-06-27 01:36:33 +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
Patrick Donnelly
f26493cc25
Merge PR #28194 into master
* refs/pull/28194/head:
	test_volume_client: declare only one default for python version
	test_volume_client: don't shadow class variable

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2019-06-20 06:27:04 -07: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
Patrick Donnelly
ff1f04f4d5
qa: elide python version config
This test doesn't actually use the config and cephfs-shell is py3 only.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2019-06-19 18:22:51 -07:00
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
Yan, Zheng
cd29206974 mds: remove the code that skip evicting the only client
There is already logic that defer marking unresponsive client stale.
No reason to defer evicting the only stale client.

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
2019-06-19 14:28:31 +08:00
Patrick Donnelly
c28ae6970f
Merge PR #27856 into master
* refs/pull/27856/head:
	test: remove fs/test-volume.sh workunit
	test: port fs/volume related tests to python

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2019-06-12 14:27:07 -07:00
Patrick Donnelly
9e1771472b
Merge PR #28221 into master
* refs/pull/28221/head:
	qa/tasks/cephfs/test_volume_client: print py2 or py3 which the test case runs

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Rishabh Dave <ridave@redhat.com>
2019-06-12 14:15:30 -07:00
Venky Shankar
d92840b59e test: port fs/volume related tests to python
... and add subvolume related tests.

Signed-off-by: Venky Shankar <vshankar@redhat.com>
2019-06-12 12:43:17 -04:00
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
Yan, Zheng
1c8be588e3 qa/cephfs: update tests for stale session handling
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
2019-06-08 21:15:14 +08:00
Patrick Donnelly
38fc69d0fa
Merge PR #28171 into master
* refs/pull/28171/head:
	test_volume_client: simplify test_get_authorized_ids()

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2019-06-07 21:20:18 -07:00
Patrick Donnelly
2c2cf856b2
Merge PR #28293 into master
* refs/pull/28293/head:
	mds: avoid passing null to SessionmMap::hit_session()
	qa/cephfs: add test for blacklisted client eviction
	mds: fix 'is session in blacklist' check in Server::apply_blacklist()

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2019-06-07 21:16:14 -07:00
Yan, Zheng
4fd0202fdf qa/cephfs: fix test_evict_client
explictly kill stale session, otherwise session count check is racy.

Fixes: https://tracker.ceph.com/issues/40173
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
2019-06-05 22:04:22 +08:00
Yan, Zheng
89759654c1 qa/cephfs: add test for blacklisted client eviction
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
2019-06-05 21:05: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
Patrick Donnelly
8e7be2cc4a
Merge PR #27377 into master
* refs/pull/27377/head:
	qa: fs Ignore getfattr errors for ceph.dir.pin

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2019-05-14 13:14:21 -07:00
Patrick Donnelly
d35396ca07
Merge PR #27872 into master
* refs/pull/27872/head:
	cephfs-shell: teuthology tests

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2019-05-14 12:50:28 -07: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
Sidharth Anupkrishnan
9f40c783db qa: fs Ignore getfattr errors for ceph.dir.pin
Signed-off-by: Sidharth Anupkrishnan <sanupkri@redhat.com>
2019-05-09 18:46:21 +05:30
Milind Changire
73ada8d1d9 cephfs-shell: teuthology tests
* mkdir
* get
* put

Fixes: http://tracker.ceph.com/issues/39526
Signed-off-by: Milind Changire <mchangir@redhat.com>
2019-05-09 11:37:31 +05:30
Patrick Donnelly
1071f73c76
qa: use skipTest method instead of exception
This is the recommended method to skip a test according to [1]. It also lets us
avoid an unnecessary import.

[1] https://docs.python.org/2/library/unittest.html#unittest.TestCase.skipTest

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2019-04-24 09:38:52 -07:00
Rishabh Dave
39417e47de qa: add a method to test if a file can be created
Signed-off-by: Rishabh Dave <ridave@redhat.com>
2019-04-17 23:58:22 +05:30
Rishabh Dave
e9bc9f84e5 qa: add a method to create an empty file with any user
Signed-off-by: Rishabh Dave <ridave@redhat.com>
2019-04-17 23:58:22 +05:30
Rishabh Dave
d90c0a0e81 qa: add stdin parameter to run_shell
Signed-off-by: Rishabh Dave <ridave@redhat.com>
2019-04-17 23:58:22 +05:30
Jos Collin
f46fec8c1d
qa/tasks: Compare two FSStatuses
Compare two FSStatuses to detect MDS failover

Fixes: http://tracker.ceph.com/issues/17309
Signed-off-by: Jos Collin <jcollin@redhat.com>
2019-04-12 12:08:42 +05:30
Rishabh Dave
3e0a1361f7 qa: allow keeping sudo in command arguments
sudo cannot be omitted from the given command's arguments, when running
passwd, chown and, specially, when sudo is used for running the given
command as different user.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2019-04-09 21:03:31 +05:30
Rishabh Dave
5df2b82c4f qa: make execution abortion optional for command ran through run_shell()
Signed-off-by: Rishabh Dave <ridave@redhat.com>
2019-04-09 21:03:31 +05:30
Patrick Donnelly
95714b5c7c
qa: decouple session map test from simple msgr
Instead of looking at the number of threads (used by the simple messenger) to
judge the coming and going of connections, use the (async) messenger perf
counters.

Plus some other minor improvements.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2019-04-08 11:50:17 -07:00
Patrick Donnelly
4f3df2cc82
Merge PR #26893 into master
* refs/pull/26893/head:
	qa: unmount clients prior to marking fs down

Reviewed-by: Zheng Yan <zyan@redhat.com>
2019-03-12 10:47:53 -07:00
Patrick Donnelly
9aaf6118a4
qa: unmount clients prior to marking fs down
Evicted RHEL7.5 clients may hang.

Fixes: http://tracker.ceph.com/issues/38677
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2019-03-11 09:15:37 -07:00
Yan, Zheng
8e81bd74c5 qa/cephfs: relax min_caps_per_client check
new kernel client proactively release caps. caps count can go below
mds_min_caps_per_client

Fixes: http://tracker.ceph.com/issues/38270
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
2019-03-07 21:32:20 +08:00
Patrick Donnelly
06e7b12d24
Merge PR #26699 into master
* refs/pull/26699/head:
	qa: unmount clients before deleting fs

Reviewed-by: Zheng Yan <zyan@redhat.com>
2019-03-01 06:46:46 -08:00
Patrick Donnelly
a20a61f476
qa: unmount clients before deleting fs
Client unmount during test cleanup will hang if the file system was deleted.

Fixes: http://tracker.ceph.com/issues/38518
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2019-02-28 09:02:33 -08:00
Patrick Donnelly
4fa4eda9ee
qa: update discontinous map test to use mds freezing
and stop using standby_for_*.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2019-02-27 21:39:17 -08:00
Patrick Donnelly
8cbdad9f9b
qa: update testing for standby-replay
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2019-02-27 21:39:12 -08:00
Patrick Donnelly
b28dcd9d75
qa: config recall settings to test cache drop
If we use the defaults, the MDS/client will recall/release everything quickly.
We want it to take time to see things like the timeout get hit.

Fixes: http://tracker.ceph.com/issues/38348
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2019-02-18 16:28:37 -08:00