Commit Graph

1271 Commits

Author SHA1 Message Date
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
dparmar18
7cb3e58ecb qa: fix cluster creation failure in test_nfs.py
Also adds a function _nfs_complete_cmd() that returns process obj so that stdout/stderr
can be used for evaluation(_nfs_cmd() uses raw_cluster_cmd() that returns just stdout
and it became difficult to time cluster creation errors in _test_create_cluster()).

It takes sometime to update the cluster data, therefore running the command set
(check nfs server status -> nfs cluster create test -> check cluster status) in
a loop (max six iteration with sleep of 5 secs at each iteration) fixes the issue.

Fixes: https://tracker.ceph.com/issues/58744
Signed-off-by: Dhairya Parmar <dparmar@redhat.com>
2023-03-30 19:29:15 +05:30
dparmar18
afaf251d21 qa: test export creation at filepath and symlink
Fixes: https://tracker.ceph.com/issues/58228
Signed-off-by: Dhairya Parmar <dparmar@redhat.com>
2023-03-30 19:29:15 +05:30
dparmar18
b0bb25024d qa: added test case test_nfs_export_with_invalid_path
Fixes: https://tracker.ceph.com/issues/58228
Signed-off-by: Dhairya Parmar <dparmar@redhat.com>
2023-03-30 19:29:15 +05:30
Venky Shankar
aa9a83029a Merge PR #47649 into main
* refs/pull/47649/head:
	mds: adjust MDSRank::command_tag_path invocation of enqueue_scrub()
	doc/scrub: documented stray evaluation using recursive scrub
	qa: added testcases
	mds: make `scrub status` print flag `scrub_mdsdir`
	mds: add scrub_mdsdir to ScrubHeader
	mds: do not dump multiple JSON obj
	mds: evaluate strays while performing scrub on root path
	mds: remove inode from scrub_stack if being purged
	mds: do not scrub inode if it is purging

Reviewed-by: Venky Shankar <vshankar@redhat.com>
2023-03-30 16:13:48 +05:30
Patrick Donnelly
1b4d9077af
qa: add missing scan_links step for data scan recovery
Without, the first field remains corrupt (HEAD).

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2023-03-29 13:02:56 -04:00
Patrick Donnelly
293b90fe63
qa/tasks/cephfs: test damage to dentry's first is caught
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2023-03-29 13:02:56 -04:00
Patrick Donnelly
3ba17390e9
qa/tasks/cephfs: use rank_asok and allow specifying rank
This will use the more efficient:

    ceph tell mds.<fsname>:<rank> ...

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2023-03-29 13:02:56 -04:00
Xiubo Li
ede1afe91c qa: remove the FuseMount/KernelMount check in test_newops.py
Will use the postmerge fragment to check this.

Fixes: https://tracker.ceph.com/issues/57591
Signed-off-by: Xiubo Li <xiubli@redhat.com>
2023-03-29 09:07:58 +08:00
Xiubo Li
585481f343 qa: fscrypt enable xfstests-dev generic/020 test case
Since the https://git.ceph.com/xfstests-dev.git has pulled the
corresponding fix about the long attribute for generic/020 test case,
we can enable it now.

Signed-off-by: Xiubo Li <xiubli@redhat.com>
2023-03-27 14:25:52 +08:00
Rishabh Dave
969a93d0dc qa/cephfs: add more helper methods to caps_helper.py
Add methods that will accept read/write permissions, CephFS names and
CephFS mount point and in return will generate string form of MON, OSD
and MDS caps exactly as it is reported in Ceph keyrings.

Replace similar code in test_multifs_auth.py with calls to these helper
methods.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2023-03-24 11:32:58 +05:30
Rishabh Dave
3203d6005e
Merge pull request #50498 from rishabh-d-dave/fs-qa-caps-helper-minor
qa/cephfs: minor corrections in caps_helper.py

Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Dhairya Parmar <dparmar@redhat.com>
2023-03-17 23:53:27 +05:30
Rishabh Dave
e3c6e15165
Merge pull request #45960 from rishabh-d-dave/xfstests-dev-run-more-tests
qa/cephfs: upgrade xfstests_dev.py to run more tests

Reviewed-by: Xiubo Li <xiubli@redhat.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
2023-03-14 20:13:02 +05:30
Venky Shankar
44f82d2327 Merge PR #50049 into main
* refs/pull/50049/head:
	qa: add cephfs_mirror test case to check root dir modes
	cephfs_mirror: sync snap dir root mode with remote dir

Reviewed-by: Dhairya Parmar <dparmar@redhat.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
2023-03-13 19:22:04 +05:30
Rishabh Dave
1428fb1e73 qa/cephfs: minor corrections in caps_helper.py
Signed-off-by: Rishabh Dave <ridave@redhat.com>
2023-03-13 17:45:57 +05:30
Rishabh Dave
c4ce7221a0 qa/cephfs: run all generic tests from xfstests-dev
Signed-off-by: Rishabh Dave <ridave@redhat.com>
2023-03-13 11:49:48 +05:30
Rishabh Dave
f43e1091c0 qa/cephfs: add helper methods to run tests from xfstests-dev
Signed-off-by: Rishabh Dave <ridave@redhat.com>
2023-03-10 17:52:44 +05:30
Venky Shankar
f2709dd181 Merge PR #49102 into main
* refs/pull/49102/head:
	qa: add test for schedule auto deactivation
	doc/cephfs: add note about path usage in snap-schedule
	mgr/snap_schedule: add debug log for missing or wrong path

Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Rishabh Dave <ridave@redhat.com>
2023-03-10 16:45:35 +05:30
Venky Shankar
2e2e7b9186 Merge PR #49008 into main
* refs/pull/49008/head:
	doc/quota: accept human readable quota value documented
	qa/workunits/fs/quota.sh: use human readable format for ceph.quota.max_bytes
	qa: added three testcases
	mds: accept human readable values for quotas

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Milind Changire <mchangir@redhat.com>
Reviewed-by: Kotresh Hiremath Ravishankar <khiremat@redhat.com>
Reviewed-by: Rishabh Dave <ridave@redhat.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Anthony D Atri <anthony.datri@gmail.com>
2023-03-08 12:36:21 +05:30
Venky Shankar
d78b2305c3 Merge PR #49844 into main
* refs/pull/49844/head:
	qa: enforce string client-id check for testing oldest client tid warning
	qa: optionally check pattern string match in `health detail`

Reviewed-by: Rishabh Dave <ridave@redhat.com>
Reviewed-by: Kotresh Hiremath Ravishankar <khiremat@redhat.com>
2023-03-08 08:08:17 +05:30
Venky Shankar
8f55abb330 Merge PR #49912 into main
* refs/pull/49912/head:
	qa: avoid explicit set to client mountpoint as "/"

Reviewed-by: Xiubo Li <xiubli@redhat.com>
Reviewed-by: Rishabh Dave <ridave@redhat.com>
2023-03-08 08:07:04 +05:30
Milind Changire
7849939852 qa: add cephfs_mirror test case to check root dir modes
Signed-off-by: Milind Changire <mchangir@redhat.com>
2023-03-07 18:09:38 +05:30
Venky Shankar
648c6c7722 Merge PR #48894 into main
* refs/pull/48894/head:
	qa/tasks/cephfs: add "extra data pool" cephfs-data-scan tests
	qa/tasks/cephfs: use cephfs tags when recreating osd caps
	tools/cephfs-data-scan: make data pool command args optional
	tools/cephfs-data-scan: support for multi-datapool
	cls/cephfs: extend accumulate_inode_metadata client method to store pool id

Reviewed-by: Venky Shankar <vshankar@redhat.com>
2023-03-06 09:42:32 +05:30
dparmar18
632c8b04cc qa: added testcases
- test_stray_evaluation_with_scrub
this assures that evaluating strays with scrub works fine and no
crash is detected.

- test_flag_scrub_mdsdir
test the new flag to scrub ~mdsdir at CephFS root

Fixes: https://tracker.ceph.com/issues/51824
Signed-off-by: Dhairya Parmar <dparmar@redhat.com>
2023-03-03 11:44:55 +05:30
Venky Shankar
7f65724a25 Merge PR #49756 into main
* refs/pull/49756/head:
	qa: add test for 'dump dir'
	mds: add a command to dump directory information

Reviewed-by: Kotresh Hiremath Ravishankar <khiremat@redhat.com>
Reviewed-by: Rishabh Dave <ridave@redhat.com>
Reviewed-by: Dhairya Parmar <dparmar@redhat.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
2023-03-02 19:41:10 +05:30
Venky Shankar
1426cdfaab Merge PR #50217 into main
* refs/pull/50217/head:
	qa: enable the xfstests generic/317 test case
	qa: make the xfstests tmp directories to be readable and excutable

Reviewed-by: Rishabh Dave <ridave@redhat.com>
Reviewed-by: Dhairya Parmar <dparmar@redhat.com>
2023-03-02 11:04:33 +05:30
Mykola Golub
0c88aaa0a3 qa/tasks/cephfs: add "extra data pool" cephfs-data-scan tests
Signed-off-by: Mykola Golub <mykola.golub@clyso.com>
2023-03-01 12:50:49 +02:00
Mykola Golub
6a384b5d7f qa/tasks/cephfs: use cephfs tags when recreating osd caps
to make it work when an extra data pool is added

Signed-off-by: Mykola Golub <mykola.golub@clyso.com>
2023-03-01 12:50:33 +02:00
Venky Shankar
cca84e653d Merge PR #48720 into main
* refs/pull/48720/head:
	qa: fix api failure issue caused during a dashboard test
	PendingReleaseNotes: noted new MDSMap field refuse_client_session
	qa: added two testcases
	client: do not initiate session if flag refuse_client_session is set
	mds: do not reconnect when refuse_client_session is set
	mds: add new feature to block clients from establishing sessions

Reviewed-by: Rishabh Dave <ridave@redhat.com>
Reviewed-by: Kotresh Hiremath Ravishankar <khiremat@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Milind Changire <mchangir@redhat.com>
Reviewed-by: Ramana Raja <rraja@redhat.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
2023-03-01 07:54:18 +05:30
Xiubo Li
b150aec6a6 qa: enable the xfstests generic/317 test case
Since the permission denied bug has been fixed, just add the 317
test back.

Fixes: https://tracker.ceph.com/issues/58760
Signed-off-by: Xiubo Li <xiubli@redhat.com>
2023-02-28 22:02:56 +08:00
Xiubo Li
8852b4d610 qa: make the xfstests tmp directories to be readable and excutable
The user namespace test case will excute some commands as the other
user. And the temporary direcotry now has the rx permission for
other users by default. The test then will fail otherwise.

Fixes: https://tracker.ceph.com/issues/58760
Signed-off-by: Xiubo Li <xiubli@redhat.com>
2023-02-28 22:02:56 +08:00
Rishabh Dave
b88e917461 qa/cephfs: upgrade xfstests_dev.py for FUSE mounts
Add support for testing CephFS mounted with FUSE using xfstests-dev.

Fixes: https://tracker.ceph.com/issues/55354
Signed-off-by: Rishabh Dave <ridave@redhat.com>
2023-02-25 16:03:45 +05:30
Milind Changire
3fda85ec45 qa: add test for schedule auto deactivation
Signed-off-by: Milind Changire <mchangir@redhat.com>
2023-02-24 06:46:46 +05:30
Rishabh Dave
fec9be184d qa/cephfs: add 'rhel' to family of RH OS in xfstest_dev.py
The string returned by get_system_type() for RHEL 8.4 recently wasn't
one of the strings that xfstests_dev.py expects. The string returned
this time was instead "rhel". Add this string to the list of strings
that xfstests_dev.py expects for Red Hat OS family so that this failure
won't occur again in future. Also log the detected distro and version so
that it is easier to debug when this issue occurs next time.

Fixes: https://tracker.ceph.com/issues/58726
Signed-off-by: Rishabh Dave <ridave@redhat.com>
2023-02-23 22:31:27 +05:30
Rishabh Dave
4017bfa2c5
Merge pull request #46574 from rishabh-d-dave/xfstests-dev-improvements
qa/cephfs: improvements for xfstests_dev.py

Reviewed-by: Xiubo Li <xiubli@redhat.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
2023-02-23 17:08:53 +05:30
dparmar18
9a462f78fd qa: added three testcases
- test_human_readable_quota_values
- test_human_readable_quota_invalid_values
- test_disable_enable_human_readable_quota_values

Fixes: https://tracker.ceph.com/issues/55940
Signed-off-by: Dhairya Parmar <dparmar@redhat.com>
2023-02-23 16:50:06 +05:30
Venky Shankar
da7928adab Merge PR #50196 into main
* refs/pull/50196/head:
	qa: export DIFF_LENGTH env parameter to print the full git diff

Reviewed-by: Dhairya Parmar <dparmar@redhat.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
2023-02-23 11:16:21 +05:30
Rishabh Dave
92aaaf7b57 qa/cephfs: save results dir from xfstests-dev repo
The "results" directory in xfstests-dev repo contains logs that are
created by it during execution of its tests. Copying this directory to
Ceph log directory saves it from being erased during tear down conducted
by teuthology test runner. These logs allow deeper inspection in to the
cause of failure of tests.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2023-02-22 20:44:29 +05:30
Rishabh Dave
053a1fb851 qa/cephfs: don't create symlinks for xfstests-dev
Signed-off-by: Rishabh Dave <ridave@redhat.com>
2023-02-22 20:29:02 +05:30
Rishabh Dave
18465b8f56 qa/cephfs: modify user creation code for xfstests-dev
Create user "fsgqa2" and, since xfstests-dev's README uses option "-m"
while creating user "fsgqa", do the same in our codebase.

Creating user "fsgqa2" is optional along with other users according to
xfstests-dev's README. Create all these users is a preventive step since
tests needing user/users maybe skipped during execution.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2023-02-22 20:29:02 +05:30
Rishabh Dave
392e278749 qa/cephfs: log xfstests-dev local.config
Log contents of xfstests-dev repo config file "local.config" to make
debugging easier.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2023-02-22 20:29:02 +05:30
Rishabh Dave
4d75730200 qa/cephfs: minor changes in xfstests_dev.py
In xfstests-dev repo, local.config options "SCRATCH_DEV" and
"SCRATCH_MNT" were enabled in commit
2ba6b87105 but TODO comment for the
wasn't deleted. Let's delete that and use format string instead of
format function on regular string.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2023-02-22 20:29:02 +05:30
Rishabh Dave
49c7a79f8a qa/cephfs: make it easier to use xfstests-dev using vstart_runner
The intention of this re-arrangement is to make it easier for developers
to use an already cloned and built xfstests-dev repo  with
vstart_runner.py.

The re-arrangements are -

* move tearDown() closer to setUp() (so that devs can
  enable/disable parts of them easily),

* carve out separate methods (so that these codeblocks can be disabled
  in a single go) for -
  ** deleting groups and users,
  ** deleting xfstests-dev and xfsprogs-dev repo and
  ** building xfstests-dev repo

* carve out method for deleting xfstests-dev and xfsprogs-dev repos

* add self.xfstests_repo_path comment (for devs to set path to
  xfstests-dev repo), and,

* add a note showing how to use already cloned and built xfstests-dev
  repo

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2023-02-22 20:07:48 +05:30
Rishabh Dave
4a00b2bbb1 qa/cephfs: use standard name for logging variable
Signed-off-by: Rishabh Dave <ridave@redhat.com>
2023-02-22 20:03:05 +05:30
Venky Shankar
ae6f1b18be Merge PR #50175 into main
* refs/pull/50175/head:
	cephfs: upgrade cephfs-shell's path wherever necessary

Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Dhairya Parmar <dparmar@redhat.com>
2023-02-22 19:47:43 +05:30
Xiubo Li
0f9d3f2d3d qa: export DIFF_LENGTH env parameter to print the full git diff
From the xfstests-dev's README doc set DIFF_LENGTH to 0 will print
the full diff instead of the default 10.

This will be very helpful to debug the test failures, or we will
lose many valuable debug infomation.

Signed-off-by: Xiubo Li <xiubli@redhat.com>
2023-02-22 14:15:14 +08:00
Venky Shankar
86b90286cd Merge PR #49934 into main
* refs/pull/49934/head:
	qa: add test_fscrypt_dummy_encryption test case support
	qa: add 'options' parameter support for write_local_config
	qa: add ceph.exclude file to exclude individual tests
	qa: add require_kernel_mount helper support
	qa: rename test_fscrypt to test_fscrypt_encrypt

Reviewed-by: Dhairya Parmar <dparmar@redhat.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
2023-02-22 11:41:44 +05:30