Commit Graph

1322 Commits

Author SHA1 Message Date
Yuri Weinstein
6e02660f10
Merge pull request #51275 from mchangir/mon-block-osd-pool-mksnap-for-fs-pools
mon: block osd pool mksnap for fs pools


Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
2023-07-07 17:09:07 -04:00
Venky Shankar
809d475814 Merge PR #49971 into main
* refs/pull/49971/head:
	doc/cephfs: document MDS_CLIENTS_LAGGY health warning
	qa: ignore warnings
	qa: add test cases to check client eviction if an OSD is laggy
	mds,messages: enable beacon to report clients lagginess
	mds: do not evict client on laggy osds
	common: add new config option to defer client eviction
	osd: add method to check for laggy osds

Reviewed-by: Venky Shankar <vshankar@redhat.com>
2023-06-28 10:23:54 +05:30
Venky Shankar
f370b581f6 qa: assign file system affinity for replaced MDS
Otherwise, the MDS that just got replaced can transition to a rank
for another file system and the test cannot deterministically infer
which MDS needs to checked.

Fixes: http://tracker.ceph.com/issues/61764
Signed-off-by: Venky Shankar <vshankar@redhat.com>
2023-06-27 09:23:14 +05:30
Rishabh Dave
67b1935a18
Merge pull request #51132 from lxbsz/wip-59349
qa: wait for 100 seconds to make sure the quota to be enforced

Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Rishabh Dave <ridave@redhat.com>
2023-06-16 17:52:00 +05:30
Xiubo Li
6183c992d7
Merge pull request #51703 from lxbsz/wip-59683
xfstests_dev: install extra packages from powertools repo for xfsprogs
2023-06-13 09:44:24 +08:00
Xiubo Li
4a60f6749a
Merge pull request #50728 from lxbsz/wip-59195
qa: switch to use the merge fragment for fscrypt
2023-06-13 07:39:00 +08:00
Xiubo Li
dedf3aae65 xfstests_dev: install extra packages from powertools repo for xfsprogs
Centos Stream 8 has removed the 'device-mapper-devel', 'libedit-devel'
and 'userspace-rcu-devel' packages from the mirrors and we need to
install it from powertools repo.

Fixes: https://tracker.ceph.com/issues/59683
Signed-off-by: Xiubo Li <xiubli@redhat.com>
2023-06-12 15:08:28 +08:00
Yuri Weinstein
40b9a8b2cc
Merge pull request #50876 from rishabh-d-dave/qa-ceph-man-get-keyring
qa/ceph_manager: preserve newline char at EOF in keyring

Reviewed-by: Dhairya Parmar <dparmar@redhat.com>
2023-05-25 10:49:53 -04:00
Patrick Donnelly
62d1cc0568
Merge PR #50875 into main
* refs/pull/50875/head:
	mon/MDSMonitor: ignore extraneous up:boot messages
	qa: add test case for mds sending multiple boot messages
	qa: support checking for a log message that should not exist

Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Dhairya Parmar <dparmar@redhat.com>
2023-05-25 08:25:34 -04:00
Venky Shankar
7b2968570a Merge PR #49691 into main
* refs/pull/49691/head:
	qa: add test for opening a file via a hard link that is not in the same mds as the inode
	mds: rdlock_path_xlock_dentry supports returning auth target inode

Reviewed-by: Venky Shankar <vshankar@redhat.com>
2023-05-18 12:49:33 +05:30
Dhairya Parmar
51cca9b9dc qa: add test cases to check client eviction if an OSD is laggy
Signed-off-by: Dhairya Parmar <dparmar@redhat.com>
2023-05-17 14:38:31 +05:30
Venky Shankar
8391374c08 Merge PR #51251 into main
* refs/pull/51251/head:
	PendingReleaseNotes: add a note about deleting files from lost+found directory
	qa: add checks that validate removal of entries from lost+found dir
	mds: allow unlink operation under lost+found directory

Reviewed-by: Xiubo Li <xiubli@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2023-05-11 11:21:14 +05:30
Venky Shankar
cc2f423ce1 Merge PR #51201 into main
* refs/pull/51201/head:
	qa: run scrub post file system recovery

Reviewed-by: Dhairya Parmar <dparmar@redhat.com>
Reviewed-by: Kotresh Hiremath Ravishankar <khiremat@redhat.com>
2023-05-11 11:19:13 +05:30
Venky Shankar
4680336650 qa: run scrub post file system recovery
Running file system scrub is recommended post running filesystem
data and metadata recovery. Running scrub isn't covered in tests.

Fixes: http://tracker.ceph.com/issues/59527
Signed-off-by: Venky Shankar <vshankar@redhat.com>

Signed-off-by: Venky Shankar <vshankar@redhat.com>
2023-05-09 22:54:30 -04:00
Milind Changire
ab64bfaaf9
qa: add test to verify blocking of osd pool mksnap for fs pools
Signed-off-by: Milind Changire <mchangir@redhat.com>
2023-05-08 13:23:15 +05:30
Venky Shankar
0252313c87 qa: add checks that validate removal of entries from lost+found dir
Signed-off-by: Venky Shankar <vshankar@redhat.com>
2023-05-06 11:03:09 -04:00
Xiubo Li
d851a9475c qa: fix journal flush failure issue due to the MDS daemon crashes
After the MDS daemon crashing, the journal flush request will fail.

Signed-off-by: Xiubo Li <xiubli@redhat.com>
2023-05-05 18:46:01 +08:00
Xiubo Li
71797091a2 qa: add test support for the alloc ino failing
Fixes: https://tracker.ceph.com/issues/52280
Signed-off-by: Xiubo Li <xiubli@redhat.com>
2023-05-05 18:46:01 +08:00
Venky Shankar
a0ab964b00 Merge PR #51005 into main
* refs/pull/51005/head:
	qa: fix test_nfs_export_creation_at_symlink
	qa: update test cases to check for ENOTDIR instead of EINVAL
	qa: fix test_nfs_export_with_invalid_path
	mgr/nfs: handle exceptions for cephfs_path_is_dir()
	mgr/nfs/utils: changes to helper func to check cephfs path

Reviewed-by: Venky Shankar <vshankar@redhat.com>
2023-05-02 11:28:41 +05:30
Patrick Donnelly
f194b277ec
qa: add test case for mds sending multiple boot messages
Test case for [1].

[1] https://tracker.ceph.com/issues/59318

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2023-05-01 15:02:19 -04:00
Rishabh Dave
3bc21774f4
Merge pull request #51030 from batrick/i59425
qa: check each fs for health

Reviewed-by: Venky Shankar <vshankar@redhat.com>
2023-04-26 19:44:39 +05:30
Dhairya Parmar
7a6ab315bb qa: fix test_nfs_export_creation_at_symlink
Signed-off-by: Dhairya Parmar <dparmar@redhat.com>
2023-04-26 16:59:36 +05:30
Dhairya Parmar
0c8962587f qa: update test cases to check for ENOTDIR instead of EINVAL
- test_nfs_export_creation_at_filepath:
ENOTDIR is raised instead of EINVAL which is better
aligned with the nature of the failure

- test_nfs_export_creation_at_symlink:
ENOTDIR is raised instead of ENOENT since the code
can now check if the path is symlink but won't follow
it.

Signed-off-by: Dhairya Parmar <dparmar@redhat.com>
2023-04-26 15:50:18 +05:30
Dhairya Parmar
5cc0857f41 qa: fix test_nfs_export_with_invalid_path
It actually didn't test the invalid path but still ended with
ENOENT(which is expected in case path is invalid) as the test
didn't create a fs, and it failed saying "FS nfs-cephfs not found"
which too raises ENOENT and thus it always passed.

Signed-off-by: Dhairya Parmar <dparmar@redhat.com>
2023-04-26 15:50:18 +05:30
Rishabh Dave
ac9ca5d14b
Merge pull request #51127 from rishabh-d-dave/fs-qa-caps_helper-bug
qa/cephfs/caps_helper: fix a bug in methods that generate cap string

Reviewed-by: Venky Shankar <vshankar@redhat.com>
2023-04-20 19:27:19 +05:30
Rishabh Dave
f0ffade052 qa/cephfs/cap_tester: simplify CapTester and its instantiation
Class CapTester contains two distinct immiscible group of methods: one
that tests MON caps and other that tests MDS caps. When using CapTester
for the former reason the instantiation neither needs mount object and
the path where files for testing will be created nor it needs to run the
method that creates files for testing rw permissions. When using
this class for latter the case is the exact opposite.

Create 2 separate classes for each of these purpose and class that
inherits both of these classes so that instantiating the class becomes
as simple as it can be.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2023-04-18 20:32:15 +05:30
Xiubo Li
7ebd06441a qa: wait for 100 seconds to make sure the quota to be enforced
The worst case in kclient the dirty caps will be held for 60 seconds,
and also the MDS may defer updating the directory rstat for 5 seconds,
which is per tick, maybe longer if needs to wait for mdlog to flush.

Fixes: https://tracker.ceph.com/issues/59349
Signed-off-by: Xiubo Li <xiubli@redhat.com>
2023-04-18 22:30:09 +08:00
Xiubo Li
ac1de56fcd qa: create a new directory to fill the volume space
When trying to filling the volume space by continuing filling multiple
files, and when flushing the dirty caps back to MDS the MDS will try
to skip updating the parent rstat in 'mds_dirstat_min_interval' to
avoid propagating more often than this. That means the quota changes
couldn't be broadcasted to the clients in time.

So after waiting for 20 seconds, and if we try to write the existing
files only the first file could successfully update the parent quota
realm in MDS, but this won't increase the total size.

Fixes: https://tracker.ceph.com/issues/59349
Signed-off-by: Xiubo Li <xiubli@redhat.com>
2023-04-18 22:30:09 +08:00
Rishabh Dave
95c6daa45b qa/cephfs: update method caps_helper.CapTester.run_cap_tests()
Signed-off-by: Rishabh Dave <ridave@redhat.com>
2023-04-18 19:42:55 +05:30
Rishabh Dave
ea9f13e553 qa/cephfs: move few methods such that they can be reused
Move get_mon_cap_from_keyring() and get_fsnmes_from_moncap() from class
CapTester to main namespace of caps_helper.py so that they can be
imported freely and reused by tests.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2023-04-18 19:42:55 +05:30
Rishabh Dave
ad68a55121 qa/cephfs: improve caps_helper.CapTester.run_mon_cap_tests()
This method checks if the output of the command "ceph fs ls" for client
ID it receives is same as the output printed for client.admin. Don't do
so, limit the test to only checking if "ceph fs ls --id client.x -k
keyring_file" prints fs name for which client.x has permissions.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2023-04-18 19:42:55 +05:30
Rishabh Dave
008dbe91e2 qa/cephfs: improve caps_helper.CapTester
Improvement #1:

CapTester.write_test_files() not only creates the test file but also
does the following for every mount object it receives in parameters -

* carefully produces the path for the test file as per parameters
  received
* generates the unique data for each test file on a CephFS mount
* creates a data structure -- list of lists -- that holds all this
  information along with mount object itself for each mount object so
  that tests can be conducted at a later point

Untangle this mess of code by splitting this method into 3 separate
methods -

1. To produce the path for test file (as per user's need).
2. To generate the data that will be written into the test file.
3. To actually create the test file on CephFS.

Improvement #2:

Remove the internal data structure used for testing -- self.test_set --
and use separate class attributes to store all the data required for
testing instead of a tuple. This serves two purpose -

One, it makes it easy to manipulate all this data from helper methods
and during debugging session, especially while using a PDB session.

And two, make it impossible to have multiple mounts/multiple "test sets"
within same CapTester instance for the sake of simplicity. Users can
instead create two instances of CapTester instances if needed.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2023-04-18 19:42:55 +05:30
Rishabh Dave
e8bdf94b81 qa/cephfs: don't inherit CephFSTestCase in CapTester
Inheritting CephFSTestCase in CapTester just for methods assertEqual()
and assertIn() from class unittest.TestCase is odd and heavy-weight.
Don't inherit CephFSTestCase and use simple assert instead.

Reference: https://github.com/ceph/ceph/pull/50882#discussion_r1160611549.

To avoid code duplication, a couple of similar methods have been added
instead.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2023-04-18 19:34:40 +05:30
Rishabh Dave
64e3dd7e62 qa/cephfs/caps_helper: fix a bug in methods that generate cap string
The tuple was not meant to be passed as a whole but its individual
members are to be passed as a list of positional arguments.

Introduced-by: 87025d15858aa88b22afa9702511ccc7120f8b0b
Signed-off-by: Rishabh Dave <ridave@redhat.com>
2023-04-18 16:28:03 +05:30
Patrick Donnelly
06c90a6c48
qa: check each fs for health
Fixes: https://tracker.ceph.com/issues/59425
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2023-04-11 10:16:53 -04:00
Rishabh Dave
1944977522 qa/ceph_manager: preserve newline char at EOF in keyring
Lack of newline character at the end of keyring file makes CephFS mount
command end with error.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2023-04-11 16:09:21 +05:30
Rishabh Dave
1a7ca489b4 qa/cephfs: minor improvement in caps_helper
Use Python type list instead of tuple since it get's necessary to modify
members of this sequence.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2023-04-11 12:03:49 +05:30
Venky Shankar
bdf4d4677f Merge PR #50844 into main
* refs/pull/50844/head:
	qa: wait for MDSMonitor tick to replace daemons

Reviewed-by: Dhairya Parmar <dparmar@redhat.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
2023-04-06 23:11:38 +05:30
Yuri Weinstein
23a958d647
Merge pull request #47893 from kotreshhr/ceph-mgr-finisher-block
mgr: Add one finisher thread per module

Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Samuel Just <sjust@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Brad Hubbard <bhubbard@redhat.com>
Reviewed-by: Xiubo Li <xiubli@redhat.com>
2023-04-06 09:23:24 -07:00
Patrick Donnelly
69565dbbf1
qa: load file system info if not created
Mounts may create a Filesystem object which does not create the file
system. This causes self.id to be Null when we try to wait for daemons
to be up. Load it just in time!

Fixes: https://tracker.ceph.com/issues/59332
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2023-04-05 18:24:22 -04:00
Rishabh Dave
a2b3bafcfb
Merge pull request #50664 from rishabh-d-dave/fs-qa-caps-helper-mds
qa/cephfs: upgrade gen_mds_cap_str() in caps_helper 

Reviewed-by: Venky Shankar <vshankar@redhat.com>
2023-04-05 19:47:36 +05:30
Rishabh Dave
53ac817bde
Merge pull request #50665 from rishabh-d-dave/fs-qa-test-multifs-auth-simplify
qa/cephfs: simplify some code in test_multifs_auth.py 

Reviewed-by: Venky Shankar <vshankar@redhat.com>
2023-04-05 19:47:06 +05:30
Rishabh Dave
265abc79b3 qa/cephfs: simplify some code in test_multifs_auth.py
test_mutlifs_auth.TestMDSCaps._create_client() not only creates a client
but also generate caps strings for the client as per the parameter this
method receives and and then writes the keyring to all remote machines.
This creates confusion when reading code on test methods in TestMDSCaps.
Let's re-arrange this code such that this confusion is avoided.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2023-04-05 16:07:46 +05:30
Patrick Donnelly
1814570b8f
qa: wait for MDSMonitor tick to replace daemons
Fixes: https://tracker.ceph.com/issues/59297
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2023-04-03 12:10:56 -04:00
Rishabh Dave
989f7ecee5
Merge pull request #46905 from lxbsz/wip-quota
mds: align quota.max_bytes to 4MB or 4KB

Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Milind Changire <mchangir@redhat.com>
Reviewed-by: Kotresh HR <khiremat@redhat.com>
Reviewed-by: Anthony D'Atri <anthony.datri@gmail.com>
Reviewed-by: Rishabh Dave <ridave@redhat.com>
2023-04-01 00:12:19 +05:30
Zhansong Gao
9945f3b51f qa: add test for opening a file via a hard link that is not in the same mds as the inode
Signed-off-by: Zhansong Gao <zhsgao@hotmail.com>
2023-03-31 18:29:13 +08:00
Venky Shankar
365895fb2d Merge PR #49460 into main
* refs/pull/49460/head:
	qa: fix issue with fn unable to fetch port and ip
	qa: fix helper function _check_nfs_cluster_status()
	qa: fix testcase 'test_cluster_set_user_config_with_non_existing_clusterid'
	qa: fix cluster creation failure in test_nfs.py
	qa: test export creation at filepath and symlink
	qa: added test case test_nfs_export_with_invalid_path
	mgr/nfs: disallow non-existent paths when creating export
	mgr/nfs/tests: mock check_cephfs_path
	mgr/nfs/utils: add helper func to check cephfs path

Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Rishabh Dave <ridave@redhat.com>
2023-03-31 09:32:37 +05:30
dparmar18
310286fa18 qa: fix issue with fn unable to fetch port and ip
_get_port_ip_info() fails to fetch port and ip due to empty 'backend' key:

2023-02-24T20:49:09.084 DEBUG:teuthology.orchestra.run.smithi042:> sudo adjust-ulimits ceph-coverage /home/ubuntu/cephtest/archive/coverage timeout 120 ceph --cluster ceph nfs cluster info test
2023-02-24T20:49:09.471 INFO:teuthology.orchestra.run.smithi042.stdout:{
2023-02-24T20:49:09.472 INFO:teuthology.orchestra.run.smithi042.stdout:  "test": {
2023-02-24T20:49:09.472 INFO:teuthology.orchestra.run.smithi042.stdout:    "backend": [],
2023-02-24T20:49:09.472 INFO:teuthology.orchestra.run.smithi042.stdout:    "virtual_ip": null
2023-02-24T20:49:09.472 INFO:teuthology.orchestra.run.smithi042.stdout:  }
2023-02-24T20:49:09.472 INFO:teuthology.orchestra.run.smithi042.stdout:}

it then raises:

2023-02-24T20:49:10.323 INFO:tasks.cephfs_test_runner:    info_output = json.loads(self._nfs_cmd('cluster', 'info', self.cluster_id))['test']['backend'][0]
2023-02-24T20:49:10.323 INFO:tasks.cephfs_test_runner:IndexError: list index out of range

Signed-off-by: Dhairya Parmar <dparmar@redhat.com>
2023-03-30 19:29:15 +05:30
dparmar18
503f8679ed qa: fix helper function _check_nfs_cluster_status()
Comment in the code says to wait for two minutes as cluster
creation takes time but actually it's waiting for thirteen
minutes, it's not required to wait this long, i think a minute
here is more than enough, also switched to using safe_while().

Signed-off-by: Dhairya Parmar <dparmar@redhat.com>
2023-03-30 19:29:15 +05:30
dparmar18
3b3fa71edf qa: fix testcase 'test_cluster_set_user_config_with_non_existing_clusterid'
Fixes: https://tracker.ceph.com/issues/58758
Signed-off-by: Dhairya Parmar <dparmar@redhat.com>
2023-03-30 19:29:15 +05:30