1
0
mirror of https://github.com/ceph/ceph synced 2025-04-24 19:58:36 +00:00
Commit Graph

193 Commits

Author SHA1 Message Date
Alfonso Martínez
45e1134e3b qa/tasks/vstart_runner.py: start max required mgrs
Pass environment copy with max required mgrs when shell kwarg is True.

Fixes: https://tracker.ceph.com/issues/50077
Signed-off-by: Alfonso Martínez <almartin@redhat.com>
2021-03-31 10:11:50 +02:00
Kefu Chai
73925c488a
Merge pull request from batrick/i49684
qa: wait for daemons to come up via cephadm

Reviewed-by: Sage Weil <sage@redhat.com>
2021-03-28 20:01:32 +08:00
Patrick Donnelly
7d412b86d0
Merge PR into master
* refs/pull/40174/head:
	qa/vstart_runner: fix the admin_socket args parsing

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Rishabh Dave <ridave@redhat.com>
2021-03-22 20:05:29 -07:00
Patrick Donnelly
42270a5338
Merge PR into master
* refs/pull/38443/head:
	qa: set "shell" to False for run_ceph_w()
	vstart_runner: make "shell" a default argument

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Xiubo Li <xiubli@redhat.com>
2021-03-22 20:00:46 -07:00
Patrick Donnelly
5292e88201
qa: reduce dependence on teuthology role list for mds
It's not yet possible to completely remove the dependency on
mds_ids/mds_daemons in the CephFS tests but this commit reduces it
enough for most code paths to work with cephadm.

The main change here is use of CephManager.do_rados, with some
improvements.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2021-03-21 10:35:07 -07:00
Xiubo Li
e0e5eb4c93 qa/vstart_runner: fix the admin_socket args parsing
Fixes: https://tracker.ceph.com/issues/49621
Signed-off-by: Xiubo Li <xiubli@redhat.com>
2021-03-17 21:54:50 +08:00
Patrick Donnelly
facd7a59ae
Merge PR into master
* refs/pull/39847/head:
	qa/cephfs: don't expect "file exists" error for "mkdir -p"
	qa/cephfs: don't take parameter cwd in _create_mntpt()

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Xiubo Li <xiubli@redhat.com>
2021-03-16 20:21:52 -07:00
Rishabh Dave
df88ec3822 qa: set "shell" to False for run_ceph_w()
Setting shell to True in call to run() in LocalCephManager.run_ceph_w()
leads to a crash when self.subproc.communicate() is executed for the
process created by running "ceph -w".

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2021-03-12 09:03:13 +05:30
Rishabh Dave
391e5b19fc vstart_runner: make "shell" a default argument
Add "shell" as a parameter for LocalRemoteProcess._do_run() and set its
default value to True. This is necessary to align the interface that
executes the commands for the teuthology and for vstart_runner.py which
reduces compatibility bugs between vstart_runner and teuthology for
tests.

Also, update the part where LocalRemote._do_run() sets shell to True
based on whether or not list contains an instance of class Raw.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2021-03-12 09:01:58 +05:30
Sebastian Wagner
340281fe76 qa/tasks: some type annotations
Mostly for making my IDE aware of things

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2021-03-10 15:02:41 +01:00
Rishabh Dave
60d5d7cf9c qa/cephfs: don't expect "file exists" error for "mkdir -p"
Get rid of try-except block in _create_mntpt() since "mkdir -p" doesn't
raise any error when the directory to be created already exists. Also,
use chmod command instead of mkdir command to set the permission mode on
directory since mkdir command would have no effect on the directory's
permission mode if the directory already exists.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2021-03-10 12:05:15 +05:30
Rishabh Dave
1b34665741 qa/cephfs: don't take parameter cwd in _create_mntpt()
Accepting "cwd" as a parameter in _create_mntpt() methods was a mistake
that happened commit 5e71e9b065.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2021-03-10 12:04:41 +05:30
Patrick Donnelly
1cbad56fd2
Merge PR into master
* refs/pull/37711/head:
	qa/cephfs: create class LocalCephFSMount
	vstart_runner: reuse FuseMount methods in LocalFuseMount
	vstart_runner: reuse KernelMount methods in LocalKernelMount
	qa/cephfs: move common and generic methods mount.py
	qa/cephfs: refactor FuseMount.mount method
	qa/cephfs: refactor KernelMount.mount method

Reviewed-by: Xiubo Li <xiubli@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2021-03-09 13:41:53 -08:00
Kefu Chai
434c1ce400
Merge pull request from rishabh-d-dave/fs-qa-accept-cmds-as-str
qa/ceph_manager: accepts commands as str too

Reviewed-by: Xiubo Li <xiubli@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2021-03-07 23:52:54 +08:00
Kefu Chai
3cdb88b0ac
Merge pull request from rishabh-d-dave/qa-raw_cluster_cmd
qa/ceph_manger: fixes bugs in CephManager

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2021-03-07 23:51:05 +08:00
Rishabh Dave
66a87d21ed qa/cephfs: create class LocalCephFSMount
This would contain methods common to LocalKernelMount and
LocalFuseMount.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2021-03-05 10:03:14 +05:30
Rishabh Dave
2716c98ce9 vstart_runner: reuse FuseMount methods in LocalFuseMount
Signed-off-by: Rishabh Dave <ridave@redhat.com>
2021-03-05 10:03:14 +05:30
Rishabh Dave
eeba70eae8 vstart_runner: reuse KernelMount methods in LocalKernelMount
Signed-off-by: Rishabh Dave <ridave@redhat.com>
2021-03-05 10:03:14 +05:30
Rishabh Dave
a1dc6b6c19 qa/ceph_manager: accepts commands as str too
Modify CephManager.run_cluster_cmd() to accept command arguments as
string as well since typing commands as strings is much lesser effort
than typing as list. This brings the interface a step closer to
teuthology.orchestra.remote.run()'s interface since it too can accept
commands arguments as string.

The change in cephfs_test_case.py is just to allow testing this PR
locally and on teuthology.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2021-03-04 09:42:44 +05:30
Patrick Donnelly
7bb6845e87
Merge PR into master
* refs/pull/39682/head:
	vstart_runner: remove duplicate methods from LocalCephManager

Reviewed-by: Xiubo Li <xiubli@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2021-03-03 10:05:35 -08:00
Patrick Donnelly
3107a1f1f8
Merge PR into master
* refs/pull/39780/head:
	qa/vstart_runner: dont log "not Ceph bin" msg too often

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Xiubo Li <xiubli@redhat.com>
2021-03-03 10:04:23 -08:00
Rishabh Dave
b2030edc15 qa/vstart_runner: dont log "not Ceph bin" msg too often
The message is logged everytime a binary not from Ceph repo's build
directory is executed, which it too often.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2021-03-02 16:41:09 +05:30
Rishabh Dave
793980ec0e qa: don't override with args when it's empty
In methods raw_cluster_cmd_result() of CephManager and LocalCephManager
and raw_cluster_cmd of LocalCephManager when keyword arguments are
passed instead of positional arguments, the methods run ceph command
with no arguments. This is because the methods do
"kwargs['args'] = args" unconditionally.

Fixes: https://tracker.ceph.com/issues/49486
Signed-off-by: Rishabh Dave <ridave@redhat.com>
2021-03-01 18:38:55 +05:30
Rishabh Dave
9f827a7b90 vstart_runner: remove duplicate methods from LocalCephManager
LocalCephManager already inherits these methods from CephManager.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2021-02-25 11:04:18 +05:30
Rishabh Dave
1045cd2334 vstart_runner: define path to ceph binary and use it
... instead of joining path to <ceph-repo-root>/build/bin/ directory to
'ceph' everytime.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2021-02-25 11:00:54 +05:30
Rishabh Dave
db0b85b440 qa/cephfs: remove parameter createfs from mount classes
It's better to get rid of this paramter since it doesn't actually create
any new Ceph file system.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2021-02-20 15:32:52 +05:30
Patrick Donnelly
488f10c62f
qa: move cephfs_ec_profile under cephfs
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2021-01-07 12:55:25 -08:00
Patrick Donnelly
2bce009d99
qa: add debug vstart_runner option
The default was changed to INFO recently but there was no way to restore
visibility of DEBUG messages.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2021-01-06 11:36:49 -08:00
Aashish Sharma
f5dd0195cd mgr/dashboard:minimize console log traces of Dashboard backend API tests
Changed log levels in some files to reduce console log traces

Fixes: https://tracker.ceph.com/issues/45822
Signed-off-by: Aashish Sharma <aasharma@redhat.com>
2020-12-23 11:32:43 +05:30
Rishabh Dave
b0cc7ac1a8 vstart_runner: print result line unless opt_rotate_log is set
Unless the option to rotate logs is set, don't delete the final result
line printed by unittest.

Fixes: https://tracker.ceph.com/issues/48447
Signed-off-by: Rishabh Dave <ridave@redhat.com>
2020-12-03 16:20:30 +05:30
Ramana Raja
7016a2001d qa/tasks: allow per file system config setting
Signed-off-by: Ramana Raja <rraja@redhat.com>
2020-11-20 13:23:21 +05:30
Xiubo Li
871ac6b376 qa/tasks/vstart_runner.py: disable the ns unsharing if using localhost
If the -l option is specified in :

$ MDS=3 MON=3 MGR=1 OSD=3 ../src/vstart.sh -n -l

The ceph cluster will use the localhost IP address as the mon host,
and then in the network namespace container the ceph-fuse daemon
couldn't connect to it.

Fixes: https://tracker.ceph.com/issues/45342
Signed-off-by: Xiubo Li <xiubli@redhat.com>
2020-11-12 08:54:57 +08:00
Patrick Donnelly
c569036c5d
Merge PR into master
* refs/pull/37629/head:
	qa/cephfs: add session_timeout option support
	qa/cephfs: move the cephfs's opertions setting to create()
	qa/cephfs: add 'cephfs:' section support

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2020-10-25 16:26:36 -07:00
Xiubo Li
0422673b61 qa/cephfs: add session_timeout option support
When the mds revoking the Fwbl caps, the clients need to flush
the dirty data back to the OSDs, but the flush may make the OSDs
to be overloaded and slow, which may take more than 60 seconds to
finish. Then the MDS daemons will report the WRN messages.

For the teuthology test cases, let's just increase the timeout
value to make it work.

Fixes: https://tracker.ceph.com/issues/47565
Signed-off-by: Xiubo Li <xiubli@redhat.com>
2020-10-23 14:27:37 +08:00
Rishabh Dave
f9f4c78101 vstart_runner: omit result line only when testcases are run one by one
vstart_runner omits the result line ("Ran X tests in Y") generated by
unittest unconditionally. Don't do so when vstart_runner triggers entire
test module at once.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2020-10-13 09:12:45 +05:30
Rishabh Dave
80ecc017e8 vstart_runner: don't quit running testsuite on a test failure
Add an option that makes it possible to not to quit running testsuite on
a test failure. This way user can get a better idea on the current state
of the testsuite and test its own code patches more effectively and
easily.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2020-10-13 09:12:45 +05:30
Patrick Donnelly
5c9f77cb65
Merge PR into master
* refs/pull/36457/head:
	qa/tasks/cephfs: fix fs authorize cmd args
	mds: add root_squash mode in MDS auth caps
	vstart_runner: add write_file and sudo_write_file

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2020-10-08 13:23:34 -07:00
Rishabh Dave
864a15e7ca vstart_runner: rotate logs between testcases optionally
Fixes: https://tracker.ceph.com/issues/46059
Signed-off-by: Rishabh Dave <ridave@redhat.com>
2020-09-29 14:52:47 +05:30
Rishabh Dave
6673531804 vstart_runner: rearrange exec_test()
Rearrange the code that triggers the test runner so that in the later
commits the way tests are triggered can be changed.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2020-09-29 14:49:51 +05:30
Ramana Raja
a177b470aa vstart_runner: add write_file and sudo_write_file
... methods in LocalRemote class. These methods are called in some of
the recently added cephfs tests. They were implemented in teuthology's
Remote class, but not in vstart_runner's LocalRemote class. Hence some
cephfs tests couldn't be run locally using vstart_runner without this
change.

Signed-off-by: Ramana Raja <rraja@redhat.com>
2020-09-25 14:34:35 +05:30
Rishabh Dave
352a41d1b3 qa/cephfs: add tests for multi-FS auth tests
Add testsuite for testing authorization on Ceph cluster with multiple
file systems and enable it to be executable with Teuthology framework.

Also add helper methods required to setup the test environment for
multi-FS tests.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2020-09-11 18:02:48 +05:30
Rishabh Dave
04ed58fec2 qa/cephfs: modify delete_all_filesystems() in filesystem.py
Modify filesystem.Filesystem.delete_all_filesystems() method to make it
more succinct, move it to class MDSCluster instead and update every call
to it accordingly.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2020-09-10 23:56:59 +05:30
Rishabh Dave
9a36a0abd0 qa/cephfs: allow not aborting execution when mount command fails
This commit adds a new argument check_status to mount methods of
KernelMount, FuseMount, LocalKernelMount and LocalFuseMount. When value
of this argument is False, these methods would catch the
CommandFailedError exception and would return a tuple consisting of the
exception itself, and stdout and stderr of the mount command. This
allows reusing these mount methods while running negative tests for
commands.

The name "check_status" is selected so since teuthology's run() and
vstart_runner's run() use a variable with same name for the very same
purpose.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2020-09-10 17:10:51 +05:30
Rishabh Dave
07e493ffb5 qa/cephfs: allow reusing mount objects and add remount method
This commit introduces following two set of changes -

First, make client keyring path, mountpoint on host FS and CephFS and
CephFS's name attributes of the object representing the mount
and update all the mount object creation calls accordingly. Also,
rewrite all the mount object creation to use keyword arguments instead
of positional arguments to avoid mistakes, especially since a new
argument was added in this commit.

Second, add remount method to mount.py so that it's possible to unmount
safely, modify the attributes of the object representing the mount and
mount again based on new state of the object *in a single call*. The
method is placed in mount.py to avoid duplication.

This change has two leads to two more changes: upgrading interface of
mount() and mount_wait() and upgrading testsuites to adapt to these
change.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2020-09-10 17:10:51 +05:30
Rishabh Dave
464ec3dbdc vstart_runner: log commands in a more usable form
Currently commands are printed as ['arg1', 'arg2', 'arg3']. Instead, log
them as '> arg1 arg2 arg3' so that it's simpler to copy and run them
manually. The reason behind prepending '> ' to these logs entries is
just to follow the practice followed by teuthology logs.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2020-09-02 22:52:27 +05:30
Rishabh Dave
530982129e qa: add method run ceph cluster command with better interface
This new method should allow better control on the process launched by
the passed command. This is achieved by allowing arguments provided by
teuthology.orchestra.run.run().

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2020-08-21 22:16:21 +05:30
Ernesto Puerta
64ec1112bb
Revert "vstart_runner: rotate logs between testcases"
Fixes: https://tracker.ceph.com/issues/47032
Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
2020-08-19 19:25:22 +02:00
Rishabh Dave
bb325e332c vstart_runner.py: rotate logs between testcases
Fixes: https://tracker.ceph.com/issues/46059
Signed-off-by: Rishabh Dave <ridave@redhat.com>
2020-08-18 14:47:21 +05:30
Rishabh Dave
90ff87b1e8 vstart_runner: run one test method at a time...
instead of running entire testsuite at once; this would allow us more
control on the test runner.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2020-08-18 14:46:33 +05:30
Ernesto Puerta
88865cbfb1
mgr/dashboard/api: reduce amount of daemon logs
Fixes: https://tracker.ceph.com/issues/46920
Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
2020-08-13 13:45:17 +02:00