Commit Graph

176 Commits

Author SHA1 Message Date
Leonid Usov
274849e544 qa/tasks: vstart_runner: introduce --config-mode
The new mode of the vstart_runner allows for passing
paths to yaml configs that will be merged and then
run just as the teuthology would do it.
Building on the standard run method we can even
pass "-" as the config name and provide one on the stdin like

    python3 ../qa/tasks/vstart_runner.py --config-mode "-" << END
    tasks:
      - quiescer:
          quiesce_factor: 0.5
          min_quiesce: 10
          max_quiesce: 10
          initial_delay: 5
          cancelations_cap: 2
          paths:
            - a
            - b
            - c
      - waiter:
          on_exit: 100
    END

This commit does the minimum to allow testing of the quiescer,
but it also lays the groundwork for running arbitrary configs.

The cornerstone of the approach is to inject our local implementations
of the main fs suite classes. To be able to do that, some minor
refactoring was required in the corresponding modules:
the standard classes were renamed to have a *Base suffix, and the
former class name without the suffix is made a module level variable
initialized with the *Base implementation. This refactoring
is meant to be backward compatible.

Signed-off-by: Leonid Usov <leonid.usov@ibm.com>
2024-04-25 21:15:05 +03:00
Rishabh Dave
64c99bf737
Merge pull request #51993 from dparmar18/wip-58072
mon/MDSMonitor: enable 'ceph fs new' use 'ceph fs set' options

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Rishabh Dave <ridave@redhat.com>
2024-04-04 17:50:16 +05:30
Patrick Donnelly
c0f0997e17
qa: update quiesce tests for control via locallock
- Verify multirank quiesce incl. caps issued.
- Unset splitauth experimental

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2024-03-20 10:56:58 -04:00
Patrick Donnelly
71fd9a34a9
qa: use kwarg for rank parameter
Otherwise it gets included in the *args list. This is necessary after commit
`qa: simplify calls to (rank|mds)_(tell|asok)`.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2024-03-20 10:56:58 -04:00
Patrick Donnelly
464ef51525
qa: simplify calls to (rank|mds)_(tell|asok)
Instead of requiring the caller to put the arguments in a list, allow passing
as regular arguments.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2024-03-20 10:56:58 -04:00
Patrick Donnelly
7cf14fb10a
qa: add quiesce protocol unit tests
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>

Fixes: https://tracker.ceph.com/issues/63664
2024-03-20 10:56:56 -04:00
Venky Shankar
f155b8fb61 Merge PR #54446 into main
* refs/pull/54446/head:
	qa: bump up scrub status command timeout

Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Dhairya Parmar <dparmar@redhat.com>
2024-01-29 18:54:44 +05:30
Rishabh Dave
158f916f25
Merge pull request #54208 from neesingh-rh/json_asok_fix
qa: fix rank_asok() to handle errors from asok commands

Reviewed-by: Kotresh HR <khiremat@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Dhairya Parmar <dparmar@redhat.com>
Reviewed-by: Rishabh Dave <ridave@redhat.com>
2024-01-16 17:45:09 +05:30
Dhairya Parmar
a1715c82b4 qa: add test cases and some helpers
Fixes: https://tracker.ceph.com/issues/58072
Signed-off-by: Dhairya Parmar <dparmar@redhat.com>
2023-12-26 15:54:24 +05:30
Patrick Donnelly
e555ab774b
qa: create qa subvolumes in named subvolumegroup
So we can twiddle the subvolumegroup settings (like pins).

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2023-12-12 11:45:28 -05:00
Milind Changire
33899fdaac
qa: bump up scrub status command timeout
A journal flush sometimes takes more than 120 seconds and so the 'scrub
status' command after blocking for more than 120 seconds is declared
failed causing the job to be declared as failed.

This bumping up of the timeout gives more time for the 'scrub status'
command to wait and eventually let the journal flush to complete.

Fixes: https://tracker.ceph.com/issues/63411
Signed-off-by: Milind Changire <mchangir@redhat.com>
2023-11-11 09:09:55 +05:30
neeraj pratap singh
4af9f8eb6c qa: fix rank_asok() to handle errors from asok commands
Fixes: https://tracker.ceph.com/issues/63176
Signed-off-by: Neeraj Pratap Singh <neesingh@redhat.com>
2023-10-31 14:14:14 +05:30
Rishabh Dave
f9a01cf385
Merge pull request #51942 from trociny/wip-61599
mds: optionally forbid to use standby for another fs as last resort

Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Rishabh Dave <ridave@redhat.com>
2023-09-06 20:26:33 +05:30
Rishabh Dave
4b369cf18e qa: inherit RunCephCmd in CephTestCase instead of CephFSTestCase
MgrTestCase also needs RunCephCmd. If RunCephCmd is inherited by
CephTestCase, instead of CephFSTestCase, MgrTestCase will automatically
inherit RunCephCmd because it inhertis CephTestCase.

Fixes: https://tracker.ceph.com/issues/62084
Signed-off-by: Rishabh Dave <ridave@redhat.com>
2023-08-24 23:45:27 +05:30
Patrick Donnelly
1962322f59
qa: add filesystem helper for setting transient config
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2023-08-01 11:16:02 -04:00
Patrick Donnelly
a6b8bbd2cb
qa: add helper for waiting for a rank to fail
For killpoint testing.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2023-08-01 11:16:01 -04:00
Mykola Golub
c4da777c6f qa: add cephfs test for refuse_standby_for_another_fs flag
Signed-off-by: Mykola Golub <mykola.golub@clyso.com>
2023-06-28 15:57:25 +01:00
Rishabh Dave
0a781ef080 qa/cephfs: use run_ceph_cmd() when cmd output is not needed
In filesystem.py and wherever instance of class Filesystem are used, use
run_ceph_cmd() instead of get_ceph_cluster_stdout() when output of Ceph
command is not required.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2023-06-28 17:38:19 +05:30
Rishabh Dave
1bf87e6eec qa/cephfs: add helper methods to filesystem.py
Add run_ceph_cmd(), get_ceph_cmd_stdout() and get_ceph_cmd_result() to
class Filesystem so that running Ceph command is easier. This affects
not only methods inside class Filesystem but also methods elsewhere that
uses instance of class Filesystem to run Ceph commands.

Instead of "self.fs.mon_manager.raw_cluster_cmd()" writing
"self.fs.run_ceph_cmd()" will suffice.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2023-06-28 17:38:19 +05:30
Rishabh Dave
437f2c75f5 qa/cephfs: don't import entire module needlessly
Importing entire module ceph_manager.py is pointless since only
ceph_manager.CephManager is required in qa/tasks/cephfs/filesystem.py.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2023-06-24 19:18:05 +05:30
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
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
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
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
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
dparmar18
87cfd0b379 qa: added two testcases
- test_reject_client_session
- test_reject_client_session_on_reconnect

Also added function set_reject_client_session(bool) in filesystem.py

Fixes: https://tracker.ceph.com/issues/57090
Signed-off-by: Dhairya Parmar <dparmar@redhat.com>
2022-12-22 20:35:54 +05:30
Venky Shankar
82f46b1fdc Merge PR #43284 into main
* refs/pull/43284/head:
	doc: describe bal_rank_mask configuration
	qa/cephfs: add bal_rank_mask test cases
	mds: add bal_rank_mask option for ceph fs set

Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Pere Diaz Bou <pdiazbou@redhat.com>
2022-10-26 11:28:25 +05:30
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
Venky Shankar
bc5e1a6b7b
Merge pull request #47812 from rishabh-d-dave/json-decode-error
qa/cephfs: handle non-numeric values for json.loads()

Reviewed-by: Venky Shankar <vshankar@redhat.com>
2022-10-11 09:32:42 +05:30
Venky Shankar
8981012ad9
Merge pull request #46821 from batrick/i55470
qa: postgresql test suite workunit

Reviewed-by: Venky Shankar <vshankar@redhat.com>
2022-10-03 10:08:05 +05:30
Venky Shankar
8b7537964b
Merge pull request #48179 from batrick/i57598
qa: use correct recovery procedure for alternate meta pools

Reviewed-by: Venky Shankar <vshankar@redhat.com>
2022-10-03 10:07:13 +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
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
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
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
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
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
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
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
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
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
Jos Collin
47de5d79b8
qa: fix is_addr_blocklisted() to get blocklisted clients from 'osd dump'
By the introduction of range blocklist, the 'blocklist ls' command outputs
two lists. It's also straightforward to get the blocklisted clients directly
from 'osd dump' to avoid regression.

Fixes: https://tracker.ceph.com/issues/55516
Signed-off-by: Jos Collin <jcollin@redhat.com>
2022-05-06 13:50:32 +05:30
Rishabh Dave
ac5de474cf qa/cephfs: change default timeout from 900 secs to 300
15 minutes is unnecessarily large as a default value for timeout for a
command. Not having to wait unnecessarily on a crash of a command will
reduce teuthology's testing queue and will save individual developer's
time while running tests locally.

Whatever lines are modified for this purpose are also modified to follow
the stlye guideline, specfically wrapping at 80 characters.

Fixes: https://tracker.ceph.com/issues/54236
Signed-off-by: Rishabh Dave <ridave@redhat.com>
2022-04-26 18:34:42 +05:30
Milind Changire
bf83eaa4e7 qa: enhancement for subvol creation and mounting
Fixes: https://tracker.ceph.com/issues/54317
Signed-off-by: Milind Changire <mchangir@redhat.com>
2022-04-07 14:15:56 +05:30
Venky Shankar
a612b3cb85
Merge pull request #43618 from kotreshhr/recover-symlink
mds: Store symlink target in first data object

Reviewed-by: Venky Shankar <vshankar@redhat.com>
2022-01-04 14:39:22 +05:30
Patrick Donnelly
bf4168245d
qa: test that scrub causes reintegration
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2021-12-16 14:29:12 -05:00
Kotresh HR
75291459f2 qa/test_backtrace: Validate symlink xattr is stored
Validate the symlink xattr is stored on first data
object of the symlink along with backtrace if
'mds_symlink_recovery' option is enabled and
vice-versa.

Also add 'string_wrapper' class to decode bufferlist
to string. This helps 'ceph-dencoder' tool to decode
the symlink target stored, which is used in tests to
validate.

Signed-off-by: Kotresh HR <khiremat@redhat.com>
Fixes: https://tracker.ceph.com/issues/46166
2021-12-07 15:39:52 +05:30
Xiubo Li
3b44f20ac0 qa: move the optional client_config parameter to the end
Fixes: https://tracker.ceph.com/issues/53216
Signed-off-by: Xiubo Li <xiubli@redhat.com>
2021-12-01 15:05:58 +08:00