Commit Graph

1165 Commits

Author SHA1 Message Date
Yongseok Oh
10fb8f1377 qa/cephfs: add bal_rank_mask test cases
Signed-off-by: Yongseok Oh <yongseok.oh@linecorp.com>
2022-10-13 01:39:34 +00:00
Rishabh Dave
d5ab255225
Merge pull request #46988 from rishabh-d-dave/qa-suites-upgraded-client
qa/cephfs: clean up evicted client in 4-compat_client.yaml

Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Jos Collin <jcollin@redhat.com>
Reviewed-by: Xiubo Li <xiubli@redhat.com>
Reviewed-by: Dhairya Parmar <dparmar@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2022-09-02 17:51:25 +05:30
Rishabh Dave
e7b6c9d8c2
Merge pull request #46994 from rishabh-d-dave/qa-caps-helper-upgrade
qa/cephfs: upgrade caps_helper.py

Reviewed-by: Xiubo Li <xiubli@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2022-08-26 18:43:52 +05:30
Venky Shankar
b17f0e5d1e
Merge pull request #46685 from Rethan/perf-limit-dump-loads-depth
mds/MDBalancer: add an arg to limit depth when dump loads for dirfrags

Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Ramana Raja <rraja@redhat.com>
2022-08-24 13:31:28 +05:30
Venky Shankar
d8ba839bcd
Merge pull request #46068 from neesingh-rh/change_perf_stats_o/p_structure
mgr/stats: change in structure of perf_stats o/p

Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Anthony D'Atri <anthony.datri@gmail.com>
Reviewed-by: Jos Collin <jcollin@redhat.com>
2022-08-24 11:13:07 +05:30
Venky Shankar
49e66ed0c6
Merge pull request #47079 from neesingh-rh/fix_56483
mgr/stats: missing clients in perf stats command output.

Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Jos Collin <jcollin@redhat.com>
2022-08-24 09:49:47 +05:30
Venky Shankar
d1ca282f60
Merge pull request #45949 from neesingh-rh/feature-51434
mgr/volumes: Add volume info command

Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Ramana Raja <rraja@redhat.com>
Reviewed-by: Anthony D'Atri <anthony.datri@gmail.com>
Reviewed-by: Jos Collin <jcollin@redhat.com>
Reviewed-by: Nikhilkumar Shelke <nshelke@redhat.com>
2022-08-23 21:33:09 +05:30
Venky Shankar
78871e59c0
Merge pull request #46599 from kotreshhr/rename_config_on_flush
mgr/volumes: Better handle config file on osd full scenario

Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Ramana Raja <rraja@redhat.com>
2022-08-23 13:25:02 +05:30
Venky Shankar
5e1625fa7c
Merge pull request #47063 from lxbsz/wip-56529
mds/client: fail the request if the peer MDS doesn't support getvxattr op

Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Milind Changire <mchangir@redhat.com>
2022-08-23 13:22:09 +05:30
Neeraj Pratap Singh
74489c4f0b qa: add test_non_existing_mds_rank and modify test_query_mds_filter
Fixes: https://tracker.ceph.com/issues/56169
Signed-off-by: Neeraj Pratap Singh <neesingh@redhat.com>
2022-08-22 11:35:37 +05:30
Neeraj Pratap Singh
ff33cccf33 qa: Update the qa tests to be compatible with the new structure of 'perf stats' o/p.
test_client_metrics_and_metadataand other tests has been
updated as earlier it was checking according to the old structure
of perf stats o/p, which has been changed in this PR.

Fixes: https://tracker.ceph.com/issues/56162
Signed-off-by: Neeraj Pratap Singh <neesingh@redhat.com>
2022-08-22 11:31:52 +05:30
Rishabh Dave
c279b47ec9 qa/cephfs: lazy-force unmount clients that have been evicted
Before unmounting check if the client has been evicted and, if so, run
"umount -f -l" for the mount point of the client and cleanup the mount
right after it.

Attempting to unmount, cleanup or operate in any way over mount point
of a evicted client will hang the operation (and thereby our Python
code too). Lazy-force unmount prevents such hangs for our Python code
and also frees the mount point.

This commit also adds code to gather session info for kernel mounts
after mounting is successful. This is a necessity since network address
of session is needed to check if it is blocked by Ceph cluster.

Fixes: https://tracker.ceph.com/issues/56476
Signed-off-by: Rishabh Dave <ridave@redhat.com>
2022-08-19 21:00:00 +05:30
Rishabh Dave
b79853fbe9 qa/cephfs: add a method to check if CephFS mounts have hanged
Signed-off-by: Rishabh Dave <ridave@redhat.com>
2022-08-19 19:40:38 +05:30
Rishabh Dave
cef4c8d832
Merge pull request #45036 from rishabh-d-dave/qa-fix-is_mounted
qa/cephfs: upgrade is_mounted() in mount.py

Reviewed-by: Kotresh HR <khiremat@redhat.com>
Reviewed-by: Dhairya Parmar <dparmar@redhat.com>
Reviewed-by: Nikhilkumar Shelke <nshelke@redhat.com>
Reviewed-by: Ramana Raja <rraja@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Xiubo Li <xiubli@redhat.com>
2022-08-19 18:43:59 +05:30
Rishabh Dave
775ed5fe64
Merge pull request #45869 from neesingh-rh/fix_55234
mgr/snap_schedule: replace .snap with the client configured snap dir name

Reviewed-by: Rishabh Dave <ridave@redhat.com>
Reviewed-by: Kotresh HR <khiremat@redhat.com>
Reviewed-by: Dhairya Parmar <dparmar@redhat.com>
Reviewed-by: Nikhilkumar Shelke <nshelke@redhat.com>
2022-08-19 18:38:51 +05:30
Kotresh HR
aece3b9b28 qa: Validate cleaning of the stale snapshot metadata
Fixes: https://tracker.ceph.com/issues/55976
Signed-off-by: Kotresh HR <khiremat@redhat.com>
2022-08-16 18:27:54 +05:30
Xiubo Li
eae0a16002 qa: add a upgrade test suite from nautilus and test the new getvxattr op
For new OPs the old ceph may will crash the MDSs when receiving
unknow OPs. As a workaround the new clients will check the sessions
feature bits to decide to send the new OPs or not.

Fixes: https://tracker.ceph.com/issues/56529
Signed-off-by: Xiubo Li <xiubli@redhat.com>
2022-08-16 08:30:52 +08:00
Xiubo Li
1387fc7fa0 qa: make filesystem to be compatible with nautilus for blocklist
Old cephs, such as nautilus, will use "blacklist" instead of "blocklist".

Fixes: https://tracker.ceph.com/issues/56529
Signed-off-by: Xiubo Li <xiubli@redhat.com>
2022-08-16 08:30:52 +08:00
Xiubo Li
2a28060adb qa: make filesystem to be compatible with nautilus when creating pools
For old cephs, such as the nautilus, there is no --pg_num_min option.

Fixes: https://tracker.ceph.com/issues/56529
Signed-off-by: Xiubo Li <xiubli@redhat.com>
2022-08-16 08:30:52 +08:00
Venky Shankar
c4d6729fb8
Merge pull request #44710 from joscollin/wip-F40633-dump-recent-extraordinary-events
mds: dump recent log events for extraordinary events

Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Milind Changire <mchangir@redhat.com>
Reviewed-by: Xiubo Li <xiubli@redhat.com>
Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2022-08-12 15:00:49 +05:30
Neeraj Pratap Singh
e717e216ea qa: add test_perf_stats_stale_metrics_with_multiple_filesystem
Fixes: https://tracker.ceph.com/issues/56483
Signed-off-by: Neeraj Pratap Singh <neesingh@redhat.com>
2022-08-05 14:53:17 +05:30
Nikhilkumar Shelke
7b585d4db9 qa: filter internal directories in 'subvolumegroup ls' command
Internal directories: '_nogroup', '_index', '_legacy', '_deleting'
1. Internal directories should be filtered in 'subvolmegroup ls' command.
2. Internal directories should not be accepted as a group name.

Fixes: https://tracker.ceph.com/issues/55762
Signed-off-by: Nikhilkumar Shelke <nshelke@redhat.com>
2022-08-05 14:05:49 +05:30
Neeraj Pratap Singh
eaaea3bea3 qa: test the fs volume info cmd
Fixes: https://tracker.ceph.com/issues/51434
Signed-off-by: Neeraj Pratap Singh <neesingh@redhat.com>
2022-08-05 13:00:25 +05:30
Nikhilkumar Shelke
c0c386b197 docs: minor doc fixes of showing in progress clones for a snapshot
Signed-off-by: Nikhilkumar Shelke <nshelke@redhat.com>
2022-08-04 19:16:39 +05:30
Venky Shankar
bcfc2e2089
Merge pull request #46876 from neesingh-rh/feature_55821
mgr/volumes: add interface to check the presence of subvolumegroups/subvolumes

Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Kotresh HR <khiremat@redhat.com>
Reviewed-by: Nikhilkumar Shelke <nshelke@redhat.com>
Reviewed-by: Anthony D'Atri <anthony.datri@gmail.com>
2022-08-04 18:40:10 +05:30
Kotresh HR
5a33f7e6f6 qa: Fix use of 'sudo' args
https://tracker.ceph.com/issues/56727
Signed-off-by: Kotresh HR <khiremat@redhat.com>
2022-07-30 05:33:23 +05:30
Neeraj Pratap Singh
f182ab4676 qa: add test cases for subvolumegroup/subvolume exist command
Fixes: https://tracker.ceph.com/issues/55821
Signed-off-by: Neeraj Pratap Singh <neesingh@redhat.com>
2022-07-26 16:33:46 +05:30
Patrick Donnelly
5495fe8c42
qa: test for standby-replay removal in MDSMonitor::prepare_beacon
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2022-07-25 09:57:15 -04:00
Kotresh HR
c8416c3f0e qa: Remove unused variable
Signed-off-by: Kotresh HR <khiremat@redhat.com>
2022-07-22 19:20:33 +05:30
Kotresh HR
1d66216902 qa: validate subvolume discover on upgrade
Validate subvolume discover on upgrade from
legacy subvolume to v1. The handcrafted
`.meta' file on legacy subvolume root should
not be used for any subvolume apis like getpath,
authorize.

Signed-off-by: Kotresh HR <khiremat@redhat.com>
2022-07-22 19:20:09 +05:30
Rishabh Dave
9bac23b197 qa/cephfs: improve test_multifs_auth.py
Remove setup_test_env() because removing this methods removes an extra
layer of abstraction which makes tests more readable. Rename
_create_client_and_keyring_file() to just _create_client() and reverse
the order of parameters in remount_with_new_client() and set default
value of cephfs_mntpt to '/'.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2022-07-21 17:53:16 +05:30
Rishabh Dave
34e94e9ae5 qa/cephfs: refactor and upgrade test_single_path_rootsquash
test_single_path_rootsquash instead of using helper methods duplicates
the code from those methods. This commit fixes that and also upgrade
this method since caps_helper was upgraded in previous commits.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2022-07-21 17:53:16 +05:30
Rishabh Dave
dd9579a3a0 qa/cephfs: repair test_admin.FsAuthorize's compatibility
Upgrade test_admin.FsAuthorize to repair its compatibility with
caps_helper.py since caps_hepler.py has been heavily modified in
previous commits.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2022-07-21 17:53:16 +05:30
Rishabh Dave
9d1b5f099b qa/cephfs: repair test_multifs_auth.py compatibility with...
caps_helper.py since caps_helper.py has been heavily modified in
previous commits.

setup_fs_contents() is being deleted since it is not used anymore.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2022-07-21 17:53:16 +05:30
Rishabh Dave
f11a757b78 qa/cephfs: add log entries for caps_helper.py
The intention is to make logs contain some information of what's being
done by caps_helper.py regardless of which test/method is calling it.
This should make logs more understandable and also add hints for
future debugging.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2022-07-21 17:53:16 +05:30
Rishabh Dave
463c9e1714 qa/cephfs: upgrade caps_helper.CapTester.run_mon_cap_tests()
With this commit, the design of run_mon_cap_tests() is now aligned with
rest of CapTester -- it's not meant to be inherited by test class
anymore and it is to be called by using CapTester instance.

This commit also changes working of this method. Now instead of
obtaining FS names from Python objects representing FSs, it obtains
those names from MON cap. This removes the need to pass the FS objects
around.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2022-07-21 17:53:16 +05:30
Rishabh Dave
2601831ff7 qa/cephfs: make file data unique in caps_helper.py
Let's change the file data to include the file path, the CephFS name
and the host FS and CephFS mountpoint so that the bugs where, let's say,
"cephfs2" is mounted instead of "cephfs1" (where obviously both the
CephFSs lie on the same Ceph cluster) is caught by the tests due to
uniqueness of every test file's content.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2022-07-21 17:53:16 +05:30
Rishabh Dave
d1f01cc86d qa/cephfs: simplify caps_helper.CapTester
Simplify methods in CapsTester by adding a test set, which will be a
list of tuples. The first element in tuple will be the mount object,
the second will be the test file path and the third will be the test
file data. Thus instead of having three independent class variables
that are always used together now we have list of test sets making
management of multiple test sets simpler.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2022-07-21 17:53:16 +05:30
Rishabh Dave
370449ac9d qa/cephfs: upgrade and rename class CapsHelper
Modify caps_helper.py such that calling code does't have to store
returned values just to pass those values again to a method in
caps_helper.py. This is a common pattern where write_test_files()
return 3 values and all 3 passed as it is to run_cap_tests().

The easy way to do it is to upgrade caps_helper so that it can be used
an object and not just as a class supplying helper methods. The return
values will be stored by the object internally and thus resued. In case
of testing multiple FSs inside a single test method, we'll now need
multiple instances of this class to keep those values separate.

And since CapsHelper is not just a class supplying helper methods
anymore, it's being renamed to CapTester.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2022-07-21 17:53:16 +05:30
Rishabh Dave
d9013dacc9 qa/cephfs: allow creating files at custom location
Concerned method: caps_helper.CapsHelper.write_test_file()

When CephFS mountpoint is changed inside a single test method, the test
files created at root are neither accessible nor useful. Therefore, add
an option to create the test files in the directory passed by the user.
This also increases general flexibility of the concerned method.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2022-07-21 17:53:16 +05:30
Rishabh Dave
cc30c78162 qa/cephfs: add a helper method in caps_helper.py
This helper method prevents repeating code to write test files in
test methods for caps.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2022-07-21 17:53:16 +05:30
Rishabh Dave
f96031b920 qa/cephfs: upgrade is_mounted() in mount.py
Instead of relying on value of a mutable variable, actually check if the
CephFS is mounted on the system. This will prevent bugs due to stale and
incorrect values.

Fixes: https://tracker.ceph.com/issues/54283
Signed-off-by: Rishabh Dave <ridave@redhat.com>
2022-07-20 22:36:18 +05:30
Rishabh Dave
82b58e3667 qa/cephfs: allow checking for multiple error messages while...
while negative testing.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2022-07-20 13:11:31 +05:30
Rishabh Dave
233cdea4e1
Merge pull request #47013 from rishabh-d-dave/qa-caps-method-authorize
qa/cephfs: upgrade method authorize in class Filesystem

Reviewed-by: Nikhilkumar Shelke <nshelke@redhat.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
2022-07-20 13:04:08 +05:30
Rishabh Dave
4c24755126
Merge pull request #46991 from rishabh-d-dave/qa-caps-helper-rm-path
qa/cephfs: delete path from cmd args after use

Reviewed-by: Venky Shankar <vshankar@redhat.com>
2022-07-20 13:01:51 +05:30
Adam King
e7896a9c56
Merge pull request #46897 from rkachach/fix_issue_55808
mgr/cephadm: check for events key before accessing it

Reviewed-by: Adam King <adking@redhat.com>
Reviewed-by: John Mulligan <jmulligan@redhat.com>
2022-07-16 18:43:11 -04:00
Rishabh Dave
17b6d4374d
Merge pull request #46191 from rishabh-d-dave/qa-cephfs-mount-rm-sudo
qa/cephfs: remove sudo parameter from run_shell()

Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Nikhilkumar Shelke <nshelke@redhat.com>
Reviewed-by: Jos Collin <jcollin@redhat.com>
Reviewed-by: Neeraj Pratap Singh <neesingh@redhat.com>
2022-07-08 19:30:16 +05:30
Rishabh Dave
9f95f96dc0
Merge pull request #45998 from dparmar18/implement_ln_cephfs_shell
cephfs-shell: ln command implementation

Reviewed-by: Nikhilkumar Shelke <nshelke@redhat.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Anthony D'Atri <anthony.datri@gmail.com>
Reviewed-by: Rishabh Dave <ridave@redhat.com>
2022-07-08 19:26:34 +05:30
Rishabh Dave
be4e39e4c2 qa/cephfs: upgrade method authorize in class Filesystem
Method authorize currently accepts caps as a list that should be as
follows -

(path1, perm2, path2, perm2)

Modify this method to also accepts caps arranged in following format -

((path1, perm1), (path2, perm2), (path3, perm3))

The latter format is pairs the path and the permission to be set on path
together. This makes the association more apparent and thus it less
prone to human error.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2022-07-07 21:18:48 +05:30
Rishabh Dave
ce942f250a qa/cephfs: delete path from cmd args after use
A new path is obtained every iteration which is appended to command
arguments. After the command has been executed successfully, delete the
the  path from command's arguments so that the command's arguments don't
have two paths in next iteration and it works as expected.

Fixes: https://tracker.ceph.com/issues/56416
Signed-off-by: Rishabh Dave <ridave@redhat.com>
2022-07-06 17:12:58 +05:30