Commit Graph

1229 Commits

Author SHA1 Message Date
Neeraj Pratap Singh
d62376828c qa: add tests for 'fs volume command --human_readable'
Fixes: https://tracker.ceph.com/issues/57620
Signed-off-by: Neeraj Pratap Singh <neesingh@redhat.com>
2022-09-29 12:07:08 +05:30
Milind Changire
899029f2b6 qa: wait for scrub to finish
Wait for scrub to finish during test_scrub_pause_and_resume_with_abort
which otherwise races and fails with an incorrect assertion.

Fixes: https://tracker.ceph.com/issues/48812
Signed-off-by: Milind Changire <mchangir@redhat.com>
2022-09-29 00:16:12 +05:30
Patrick Donnelly
722b88328e
qa: raise error if fwd_scrub discovers damage
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2022-09-26 22:19:43 -04:00
Patrick Donnelly
483b16062d
qa: add new mntargs option for fuse
test_client_recovery was also using mntopts to specify additional
options to ceph-fuse. Because the two prior commits unify the behavior
of ceph-fuse and the kernel mount so that the "-o" option is available
for both, that changes breaks this test. Add a special set of args
available only for fuse (there is no equivalent on the kernel).

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2022-09-26 22:19:29 -04:00
Patrick Donnelly
d3295628eb
qa: allow specifying mount options for fuse
Also, fix the type default to None. A list does not work in the code but
the default is not used in QA.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2022-09-26 22:19:22 -04:00
Patrick Donnelly
ae00634a5e
qa: unify mountpoint config behavior
Only fuse would support the "mountpoint" yaml config. Move it to
mount.py so it works consistently with the kernel mount. Ditto for the
cephfs mount point.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2022-09-26 22:19:22 -04:00
Patrick Donnelly
3d2cc1ae6b
qa: log mounts file if not mounted
For debugging.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2022-09-26 22:19:21 -04:00
Patrick Donnelly
8512bbc015
qa: simplify and use correct recovery procedure
Notably, this recovery procedure was missing scan_links.

Also, the test was oddly trying to recover the real file system in
addition to the recovery file system. I've removed that unnecessary
recovery.

Fixes: https://tracker.ceph.com/issues/57598
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2022-09-20 17:53:50 -04:00
Xiubo Li
f18c39e25a qa: make mount to be compatible with nautilus for blocklist
Fixes: https://tracker.ceph.com/issues/57580
Signed-off-by: Xiubo Li <xiubli@redhat.com>
2022-09-20 13:33:04 +08:00
Patrick Donnelly
acd395ace2
qa: output higher debugging for cephfs-journal-tool/cephfs-data-scan
Fixes: https://tracker.ceph.com/issues/57597
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2022-09-19 10:44:08 -04:00
Venky Shankar
7157008318
Merge pull request #47516 from nmshelke/fix-56632
qa: ignore disk quota exceeded failure in test

Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Xiubo Li <xiubli@redhat.com>
Reviewed-by: Dhairya Parmar <dparmar@redhat.com>
2022-09-15 14:55:26 +05:30
Kotresh HR
d382185f49 qa: Fix test_subvolume_snapshot_info_if_orphan_clone
The list of pending clones didn't match the expected.
The test fails occasionally. This is because the
clone would have finished before checking for this.
So increase the clone delay.

Fixes: https://tracker.ceph.com/issues/57446
Signed-off-by: Kotresh HR <khiremat@redhat.com>
2022-09-06 18:03:14 +05:30
Kotresh HR
aafa754767 qa: Fix test_subvolume_group_ls_filter_internal_directories
Fixes: https://tracker.ceph.com/issues/57205
Signed-off-by: Kotresh HR <khiremat@redhat.com>
2022-09-06 11:58:30 +05:30
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
Nikhilkumar Shelke
41b0cb70e0 qa: ignore disk quota exceeded failure in test
Quota enforcement takes some time. It is documented.
Test should ignore 'Disk Quota Exceeded' failure.

Fixes: https://tracker.ceph.com/issues/56632
Signed-off-by: Nikhilkumar Shelke <nshelke@redhat.com>
2022-08-29 13:42:11 +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
Rishabh Dave
38fdf6df66 qa/cephfs: handle non-numeric values for json.loads()
Not handling values infinity, negative infinity and "NaN" properly leads
to JSONDecodeError. Replace "inf" by "Infinity" in string before loading
JSON and pass a method to json.load() to handle these values to fix this
issue.

Introduced-by: a8f138cd36
Fixes: https://tracker.ceph.com/issues/57299
Signed-off-by: Rishabh Dave <ridave@redhat.com>
2022-08-26 17:06:25 +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
dparmar18
24d6726b85 qa: tests for ln command
Signed-off-by: Dhairya Parmar <dparmar@redhat.com>
2022-07-06 16:31:28 +05:30
Nikhilkumar Shelke
f4c6bdb3c6 qa: display in-progress clones for a snapshot
If any clone is in pending or in-progress state then
show these clones in 'fs subvolume snapshot info'
command output.

Fixes: https://tracker.ceph.com/issues/55041
Signed-off-by: Nikhilkumar Shelke <nshelke@redhat.com>
2022-07-04 13:31:40 +05:30
Redouane Kachach
992d63849b
mgr/cephadm: check for events key before accessing it
Fixes: https://tracker.ceph.com/issues/55808

Signed-off-by: Redouane Kachach <rkachach@redhat.com>
2022-06-29 17:13:48 +02:00
Neeraj Pratap Singh
9fb85b02f3 qa: test the correctness of snap dir name
Signed-off-by: Neeraj Pratap Singh <neesingh@redhat.com>
2022-06-29 15:22:41 +05:30
Rishabh Dave
5967592792 qa/cephfs: remove sudo parameter from run_shell()
Right now, run_shell() in mount.py accepts both "sudo" and "omit_sudo"
as parameters. It's better to accept only one of these two parameters.
A call to run_shell() where both are set to opposing values will be
buggy. Therefore, methods calling run_shell() must add "sudo" to command
arguments before call and set omit_sudo to False in call.

As a result of this change, methods like stat() and run_python() in
mount.py are now modified to add "sudo" to command arguments
and set omit_sudo to False within their own definitions.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2022-06-27 19:56:04 +05:30
Rishabh Dave
d28f2a29a7 qa/cephfs/mount: set omit_sudo when sudo is present in args
Methods run_as_user() and run_python() don't set omit_sudo to False even
when command arguments contain sudo. This will cause vstart_runner.py to
delete "sudo" from command arguments which will/might lead to a bug.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2022-06-27 19:43:54 +05:30
haoyixing
a8f138cd36 mds/MDBalancer: add an arg to limit depth when dump loads for dirfrags
Directory hierarchy may be deep for a large filesystem, dump loads would output
a lot and take a long time. So add an arg to limit depth when dump loads of dirfrags.

Fixes: https://tracker.ceph.com/issues/56058
Signed-off-by: haoyixing <haoyixing@kuaishou.com>
2022-06-27 09:27:18 +00:00
Jos Collin
a1a916547e
qa: test dump recent in-memory logs on extra-ordinary events
Fixes: https://tracker.ceph.com/issues/40633
Signed-off-by: Jos Collin <jcollin@redhat.com>
2022-06-22 15:56:49 +05:30
Venky Shankar
df19b8dbc7
Merge pull request #44900 from nmshelke/fix-54111
mon: verify data pool is already not in use by any file system

Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by:  Anthony D'Atri <anthony.datri@gmail.com>
Reviewed-by: Jos Collin <jcollin@redhat.com>
Reviewed-by: Neeraj Pratap Singh <neesingh@redhat.com>
Reviewed-by: Milind Changire <mchangir@redhat.com>
Reviewed-by: Xiubo Li <xiubli@redhat.com>
2022-06-20 10:02:41 +05:30
Venky Shankar
61673a77d4
Merge pull request #46363 from dparmar18/tracker_55548
qa/cephfs: fallback to older way of get_op_read_count

Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Kotresh HR <khiremat@redhat.com>
2022-06-20 09:57:26 +05:30
Venky Shankar
615f553cf4
Merge pull request #46560 from lxbsz/wip-55824
qa: wait rank 0 to become up:active state before mounting fuse client

Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Dhairya Parmar <dparmar@redhat.com>
Reviewed-by: Kotresh HR <khiremat@redhat.com>
Reviewed-by: Jos Collin <jcollin@redhat.com>
Reviewed-by: Neeraj Pratap Singh <neesingh@redhat.com>
2022-06-20 09:52:32 +05:30
Venky Shankar
c88a5c832e
Merge pull request #46635 from nmshelke/fix-55822
mgr/volumes: remove incorrect 'size' from output of 'snapshot info'

Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Ramana Raja <rraja@redhat.com>
Reviewed-by: Kotresh HR <khiremat@redhat.com>
Reviewed-by:  Anthony D'Atri <anthony.datri@gmail.com>
2022-06-20 09:50:20 +05:30
Venky Shankar
0fb05df9ec
Merge pull request #46636 from nmshelke/fix-55759
mgr/volumes: subvolume ls command crashes if groupname as '_nogroup'

Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Ramana Raja <rraja@redhat.com>
Reviewed-by: Kotresh HR <khiremat@redhat.com>
2022-06-20 09:48:35 +05:30
Neeraj Pratap Singh
4b26559858 qa: TestMDSMetrics.test_delayed_metrics failure
TestMDSMetrics.test_delayed_metrics is failing due to
the absence of omit_sudo parameter in the remote.run()
of set_inter_mds_block() in qa/tasks/cephfs/filesystem.py

Fixes: https://tracker.ceph.com/issues/56065
Signed-off-by: Neeraj Pratap Singh <neesingh@redhat.com>
2022-06-15 19:21:53 +05:30
Nikhilkumar Shelke
dc4b0ee405 qa: subvolume ls command crashes if groupname as '_nogroup'
If --group_name=_nogroup is provided in the command then
throw error permission denied as it is internal group of ceph fs.

Fixes: https://tracker.ceph.com/issues/55759
Signed-off-by: Nikhilkumar Shelke <nshelke@redhat.com>
2022-06-14 12:34:51 +05:30
Xiubo Li
72194627c1 qa: wait rank 0 to become up:active state before mounting fuse client
When setting the ec pool to the layout the filesystem may not be
ready, so when mounting a fuse client it will fail. To fix this we
need to wait at least the rank 0 to be in up:active state.

Fixes: https://tracker.ceph.com/issues/55824
Signed-off-by: Xiubo Li <xiubli@redhat.com>
2022-06-14 09:20:45 +08:00
Venky Shankar
27f4729256
Merge pull request #45556 from mchangir/qa-add-subvolume-option-flavors
qa: add subvolume option flavors

Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Ramana Raja <rraja@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Kotresh HR <khiremat@redhat.com>
2022-06-13 12:29:43 +05:30
Venky Shankar
f7bc95c2f7
Merge pull request #44347 from kotreshhr/subvolumegroup-quotas
mgr/volumes: subvolumegroup quotas

Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Ramana Raja <rraja@redhat.com>
2022-06-13 12:26:59 +05:30
dparmar18
269567d005 qa/cephfs: fix read_debug_file() return value and a pep8 violation
Signed-off-by: Dhairya Parmar <dparmar@redhat.com>
2022-06-13 11:33:43 +05:30
dparmar18
0aca27d2fc qa/cephfs: fallback to older way of get_op_read_count
Fixes: https://tracker.ceph.com/issues/55538

Signed-off-by: Dhairya Parmar <dparmar@redhat.com>
2022-06-13 11:33:43 +05:30
Nikhilkumar Shelke
9957a036df qa: remove incorrect 'size' from output of 'snapshot info'
The 'size' shown in the output of snapshot info command relies on
rstats which is incorrect snapshot size. It tracks size of the
subvolume from the snapshot has been taken instead of the snapshot
itself. Hence having the 'size' field in the output of 'snapshot info'
doesn't make sense until the rstats is fixed.

Fixes: https://tracker.ceph.com/issues/55822
Signed-off-by: Nikhilkumar Shelke <nshelke@redhat.com>
2022-06-12 17:17:03 +05:30
Nikhilkumar Shelke
0f4add67eb qa: verify command status if data or metadata pool already in use
Fixes: https://tracker.ceph.com/issues/54111
Signed-off-by: Nikhilkumar Shelke <nshelke@redhat.com>
2022-06-12 16:25:34 +05:30
Venky Shankar
375c8a6006
Merge pull request #44335 from SMIL-Infra/export-unlinked-dir
mds: fix crash when exporting unlinked dir

Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Xiubo Li <xiubli@redhat.com>
2022-06-07 22:47:36 +05:30
Kotresh HR
256c75e260 qa: Add tests which validates quota limitation for subvolumegroup quota
Fixes: https://tracker.ceph.com/issues/53509
Signed-off-by: Kotresh HR <khiremat@redhat.com>
2022-06-06 12:40:46 +05:30
Kotresh HR
e9fe37b8e1 qa: Add subvolume removal tests when it's group quota exceeds
Fixes: https://tracker.ceph.com/issues/53509
Signed-off-by: Kotresh HR <khiremat@redhat.com>
2022-06-06 12:40:46 +05:30
Kotresh HR
12e003f980 qa: Add tests for subvolumegroup idempotence creation
Fixes: https://tracker.ceph.com/issues/53509
Signed-off-by: Kotresh HR <khiremat@redhat.com>
2022-06-06 12:40:46 +05:30
Kotresh HR
c006181803 qa: Add tests for subvolume removal on group quota set
Validates the subvolume removal is successful if the
corresponding group's quota is set.

Fixes: https://tracker.ceph.com/issues/53509
Signed-off-by: Kotresh HR <khiremat@redhat.com>
2022-06-06 12:40:46 +05:30
Kotresh HR
dbe8cf1792 qa: Add tests for subvolumegroup resize
Fixes: https://tracker.ceph.com/issues/53509
Signed-off-by: Kotresh HR <khiremat@redhat.com>
2022-06-06 12:40:46 +05:30
Kotresh HR
085700bf19 qa: Add subvolume group quota tests
Fixes: https://tracker.ceph.com/issues/53509
Signed-off-by: Kotresh HR <khiremat@redhat.com>
2022-06-06 12:40:46 +05:30
Venky Shankar
2ab2777722
Merge pull request #46165 from rishabh-d-dave/qa-omit-sudo
qa/cephfs: set omit_sudo False when sudo is set to True

Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Dhairya Parmar <dparmar@redhat.com>
Reviewed-by: Nikhilkumar Shelke <nshelke@redhat.com>
2022-06-06 11:23:11 +05:30
Venky Shankar
86b8df6756
Merge pull request #46168 from rishabh-d-dave/fix-caps-helper
qa/cephfs: fix minor bug in caps_helper.py's run_mon_cap_tests()

Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Ramana Raja <rraja@redhat.com>
2022-06-06 11:20:58 +05:30
Rishabh Dave
f58bcac7cb qa/cephfs: modify get_key_from_keyfile() in mount.py
CephFSMount.get_key_from_keyfile() should raise an exception instead of
returning None if key is not found in keyring file.

Fixes: https://tracker.ceph.com/issues/50010
Signed-off-by: Rishabh Dave <ridave@redhat.com>
2022-06-03 09:40:28 +05:30
Rishabh Dave
f01188d72a qa/cephfs: fix minor bug in caps_helper.py's run_mon_cap_tests()
When an entity's MON cap contains no FS name in it, the entity has the
access to all the FSs on cluster and not just to the default FS of the
cluster.

Fixes: https://tracker.ceph.com/issues/55558
Signed-off-by: Rishabh Dave <ridave@redhat.com>
2022-05-27 15:19:38 +05:30
Nikhilkumar Shelke
6fd28cc9d6 qa: set, get, list and remove custom metadata for snapshot
Following test are added:
1. Set custom metadata for subvolume snapshot.
2. Set custom metadata for subvolume snapshot(Idempotency).
3. Get custom metadata for specified key.
4. Get custom metadata if specified key not exist (Expecting error ENOENT).
5. Get custom metadata if no any key-value is added means section not exist (Expecting error ENOENT).
6. Update value for existing key in custom metadata.
7. List custom metadata of subvolume snapshot.
8. List custom metadata of subvolume snapshot if no any key-value is added (Expect empty json/dictionary)
9. Remove custom metadata for specified key.
10. Remove custom metadata if specified key not exist (Expecting error ENOENT).
11. Remove custom metadata if no any key-value is added means section not exist (Expecting error ENOENT).
12. Remove custom metadata with --force option.
13. Remove custom metadata with --force option if specified key not exist (Expecting command to succeed because of '--force' option)
14. Remove subvolume snapshot and verify whether metadata for snapshot is removed or not

Fixes: https://tracker.ceph.com/issues/55401
Signed-off-by: Nikhilkumar Shelke <nshelke@redhat.com>
2022-05-25 14:59:53 +05:30
胡玮文
9558a6ada2 qa: reproduce the crash when exporting unlinked dir
Signed-off-by: 胡玮文 <huww98@outlook.com>
2022-05-25 15:55:14 +08:00
Venky Shankar
266b73b147
Merge pull request #46034 from mchangir/mgr-snap_schedule-remove-subvolume-support
mgr/snap_schedule: remove subvol interface

Reviewed-by: Venky Shankar <vshankar@redhat.com>
2022-05-24 07:13:32 +05:30