Commit Graph

3429 Commits

Author SHA1 Message Date
Venky Shankar
4cbb268803
Merge pull request #46337 from rishabh-d-dave/missing-arg-exit-code
cephfs-shell: fixes related to Cmd2ArgparseError

Reviewed-by: Venky Shankar <vshankar@redhat.com>
2022-05-23 11:05:03 +05:30
Rishabh Dave
ab19827858 qa/cephfs: remove temporary files
These temporary files don't matter for test execution with teuthology
but they do matter for execution with vstart_runner.py since the test
fails if these files exist already. And tests are often run repeatedly
with vstart_runner.py, unlike with teuthology.

Fixes: https://tracker.ceph.com/issues/55719
Signed-off-by: Rishabh Dave <ridave@redhat.com>
2022-05-20 10:58:33 +05:30
Soumya Koduri
aafa3d173f
Merge pull request #46008 from soumyakoduri/wip-skoduri-cloudtier-tests
rgw/qa: enable s3-tests related to cloud-transition feature

Reviewed-by: casey Bodley <cbodley@redhat.com>
Reviewed-by: Maredia, Ali <amaredia@redhat.com>
2022-05-19 15:53:54 +05:30
Soumya Koduri
fa86d2ea42 rgw/qa: Run tests on multiple cloudtier config
Run cloudtier tests with parameter 'retain_head_object'
set to true and false.

However having multiple cloudtier storage classes in the same task
is increasing the transition time and resulting in spurious failures.
Hence until there is a consistent way of running the tests, without
having to depend on lc_debug_interval, disabled one of the config for
now.

Signed-off-by: Soumya Koduri <skoduri@redhat.com>
2022-05-19 13:57:46 +05:30
Casey Bodley
0b7ab95c81
Merge pull request #46232 from cbodley/wip-qa-rgw-sse
qa/rgw: use 'with-sse-s3' override for s3tests

Reviewed-by: Ali Maredia <amaredia@redhat.com>
2022-05-18 16:44:28 -04:00
Soumya Koduri
f846f6ff02 rgw/qa: Add separate task for cloudtier tests
Signed-off-by: Soumya Koduri <skoduri@redhat.com>
2022-05-17 20:54:58 +05:30
Soumya Koduri
d0ac12dc38 rgw/qa: enable s3-tests related to cloud-transition feature
Added a new test-suite to configure cloudtier storage class and run related s3-tests.

Signed-off-by: Soumya Koduri <skoduri@redhat.com>
2022-05-17 20:54:58 +05:30
Venky Shankar
42b74f497e
Merge pull request #45886 from lxbsz/wip-55283
qa: add filesystem/file sync stuck test support

Reviewed-by: Venky Shankar <vshankar@redhat.com>
2022-05-14 15:14:51 +05:30
Venky Shankar
153634f1de
Merge pull request #45950 from rishabh-d-dave/qa-cephfs-test_acls
qa/cephfs: minor fixes for xfstests_dev.py and test_acls.py

Reviewed-by: Venky Shankar <vshankar@redhat.com>
2022-05-12 15:21:14 +05:30
Venky Shankar
29793ca78c
Merge pull request #45829 from dparmar18/fix_put
cephfs-shell: fix put and get cmd

Reviewed-by: Venky Shankar <vshankar@redhat.com>
2022-05-12 15:16:14 +05:30
Venky Shankar
18681c5d51
Merge pull request #46161 from joscollin/wip-B55516-extra-data
qa: fix is_addr_blocklisted() to get blocklisted clients from 'osd dump' 

Reviewed-by: Venky Shankar <vshankar@redhat.com>
2022-05-12 15:12:57 +05:30
Venky Shankar
806551ad95
Merge pull request #46192 from rishabh-d-dave/qa-cephfs-mount-omit_sudo-no-effect
qa/cephfs: omit_sudo must be passed to underlying method...

Reviewed-by: Venky Shankar <vshankar@redhat.com>
2022-05-12 15:11:01 +05:30
Casey Bodley
98ddd40859 qa/rgw: use 'with-sse-s3' override for s3tests
don't rely on the ceph manager task to parse a config file. each rgw
could be using a different config. instead, revert to an s3tests
override called 'with-sse-s3'

this way, the only job that enables sse-s3, vault_transit.yaml, contains
both the 'rgw crypt sse s3' configurables, and the flag to enable the
associated test cases

Signed-off-by: Casey Bodley <cbodley@redhat.com>
2022-05-11 14:49:51 -04:00
Casey Bodley
864f457a84 Revert "qa/rgw - run sse-s3 test cases only if configured or requested"
This reverts commit 9235cf95c1.

Signed-off-by: Casey Bodley <cbodley@redhat.com>
2022-05-11 14:45:23 -04:00
dparmar18
1e3fb3c874 qa: testcase test_get_without_target_name fixed
Signed-off-by: Dhairya Parmar <dparmar@redhat.com>
2022-05-11 17:16:29 +05:30
dparmar18
aa9938aacb qa: added testcase to check get cmd doesn't create subdirs on its own
Signed-off-by: Dhairya Parmar <dparmar@redhat.com>
2022-05-11 17:16:28 +05:30
dparmar18
4da419ed24 qa: path in test_get_with_target_name() fixed
Signed-off-by: Dhairya Parmar <dparmar@redhat.com>
2022-05-11 17:16:28 +05:30
dparmar18
31ce2eff60 qa: removed test_without_target_dir
Rationale: get and put now demand both the paths mandatorily.
           Also testing of get and put without target paths
           have been take of in other tests in class TestGetAndPut().

Signed-off-by: Dhairya Parmar <dparmar@redhat.com>
2022-05-11 17:11:27 +05:30
dparmar18
e52fb12c39 qa: added tests to make sure put accepts both paths and validate local path
Signed-off-by: Dhairya Parmar <dparmar@redhat.com>
2022-05-11 17:10:36 +05:30
Venky Shankar
6f459d8bf2
Merge pull request #46164 from rishabh-d-dave/vstart-minor-fixes
qa/vstart_runner: minor bug fix and minor adjustments

Reviewed-by: Venky Shankar <vshankar@redhat.com>
2022-05-11 11:26:09 +05:30
Venky Shankar
8cfef7194c
Merge pull request #46047 from dparmar18/qa_testcephfs_shell_pep8_fixes
qa/cephfs/test_cephfs_shell: Fixed pep8 formatting violations

Reviewed-by: Venky Shankar <vshankar@redhat.com>
2022-05-10 22:57:16 +05:30
Venky Shankar
338e18b893
Merge pull request #46169 from rishabh-d-dave/vr-run-mnt-cmd
qa/vstart_runner: fix bug in LocalFuseMount._run_mount_cmd()

Reviewed-by: Venky Shankar <vshankar@redhat.com>
2022-05-10 15:08:01 +05:30
Rishabh Dave
c9807d35e0 qa/vstart_runner: fix args to os.path.join()
Result of os.path.join() before "./bin/ceph-mds" and after
"./bin/./ceph-mds".

Before -

	2022-05-05 19:36:11,100.100 DEBUG:__main__:> ./bin/./ceph-mds -i a

After -

	2022-05-05 19:38:48,179.179 DEBUG:__main__:> ./bin/ceph-mds -i a

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2022-05-10 11:03:24 +05:30
Rishabh Dave
3dd150959e qa/vstart_runner: minor bug fix and minor adjustments
The message regarding deletion of helper tools is printed for every
command. This message should be printed only when applicable.

Besides -

* Move XXX comments to _do_run() since it increases visibility of
  these messages.
* Move omission of arguments stuff to new method clear up the clutter.
* And remove shell as a parameter from _perform_checks_and_adjustments
  since it's redundant.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2022-05-10 11:02:08 +05:30
Dhairya Parmar
53aa69e373
Merge branch 'master' into qa_testcephfs_shell_pep8_fixes 2022-05-09 15:46:04 +05:30
dparmar18
c02ab23ede qa/cephfs/test_cephfs_shell: Fixed pep8 formatting violations
NOTE: Although most of the issues are fixed but a few function
      and variable names are unchanged in order to prevent
      ambiguity and preserve their meaning.

      They are:
      - functions: setUp(), test_ls_H_prints_human_readable_file_size(),
      - variables: ls_H_output, ls_H_file_size

Signed-off-by: Dhairya Parmar <dparmar@redhat.com>
2022-05-09 15:40:08 +05:30
Rishabh Dave
02f0a3f136 qa/cephfs: omit_sudo must be passed to underlying method...
so that it can have it's intended effect.

Fixes: https://tracker.ceph.com/issues/55572
Signed-off-by: Rishabh Dave <ridave@redhat.com>
2022-05-06 22:04:18 +05:30
Jos Collin
0e66107c89
qa: drop get_blocklisted_instances in TestMirroring
drop get_blocklisted_instances in TestMirroring and use
is_addr_blocklisted instead.

Signed-off-by: Jos Collin <jcollin@redhat.com>
2022-05-06 18:16:12 +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
94d2b1048f qa/vstart_runner: fix bug in LocalFuseMount._run_mount_cmd()
This methods fails to collect return value from
FuseMount._run_mount_cmd() and return it. This leads to a bug for tests
that expect mount command to fail when executed with vstart_runner.py.

Fixes: https://tracker.ceph.com/issues/55553
Signed-off-by: Rishabh Dave <ridave@redhat.com>
2022-05-05 21:03:46 +05:30
Rishabh Dave
04209a1e7e vstart_runner: make LocalRemote inherit RemoteShell
And therefore get rid of methods duplicated in LocalRemote and add a
call to empty constructor of RemoteShell in LocalRemote.__init__().

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2022-05-05 12:30:24 +05:30
Venky Shankar
aaa3fb120a
Merge pull request #37655 from rishabh-d-dave/vr-run-multiple-cmds
vstart_runner: accepts multiple commands as str too

Reviewed-by: Venky Shankar <vshankar@redhat.com>
2022-05-04 15:03:30 +05:30
Venky Shankar
abcd7ba717
Merge pull request #45473 from neesingh-rh/fix_50470
cephfs-top: Multiple filesystem support

Reviewed-by: Venky Shankar <vshankar@redhat.com>
2022-05-04 15:00:15 +05:30
Venky Shankar
9682214b3f
Merge pull request #45776 from neesingh-rh/fix_48863
cephfs-shell: chmod should be allowed for changing all mode bits.

Reviewed-by: Venky Shankar <vshankar@redhat.com>
2022-05-04 14:59:10 +05:30
Venky Shankar
bfe960df95
Merge pull request #45974 from rishabh-d-dave/shell-unrecognized-cmds
cephfs-shell: exit with non-zero on getting unrecognized cmd

Reviewed-by: Venky Shankar <vshankar@redhat.com>
2022-05-04 14:57:40 +05:30
Ali Maredia
d634f0690b
Merge pull request #44494 from mdw-at-linuxbox/wip-master-mankey
rgw/crypt: sse-s3 changes

Reviewed-by: Ali Maredia <amaredia@redhat.com>
2022-05-02 16:57:55 -04:00
Rishabh Dave
acc923c8a4 qa/vstart_runner: add a helper method to run commands
It's more convenient to not to pass stdout, stdin, and stderr every
single time.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2022-05-02 20:25:19 +05:30
Rishabh Dave
f12536fed1 qa/vstart_runner: don't use os.kill for passing SIGKILL
vstart_runner.py is written assuming that it can run commands with
superuser privileges whenever possible and vstart_runner.py is meant to
be executed without sudo.

So, it's better kill a process using "sudo kill -9 <PID>", instead of
using os.kill() because os.kill() can't kill process launched with
superuser privileges.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2022-05-02 20:25:19 +05:30
Rishabh Dave
8d4ef76923 qa/vstart_runner.py: add a note about omitting sudo
About the commit date: this commit got dropped from the patch series
during some PR branch update but is added back now.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2022-05-02 20:25:19 +05:30
Rishabh Dave
43b170ab18 qa/vstart_runner: get rid of "exec sudo" from "ceph -w" cmd args
Passing "exec sudo" to "ceph -w" caused "Ceph API test" CI job to fail.
Error was not related to this tracker issue but the code added for it
is reversed now in this commit. The tracker issue -
https://tracker.ceph.com/issues/49644.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2022-05-02 20:25:19 +05:30
Rishabh Dave
a67d500ee1 qa/vstart_runner: keep cmd args as passed by user as well
We convert all cmd args to str and pass bash functions along to override
certain arguments in those command arguments. Let's save cmd args
without those bash functions since they can be useful later (for
example, printing cmd args in logs, which is the case in this patch.)

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2022-05-02 20:25:19 +05:30
Rishabh Dave
8fc635c28c qa/vstart_runner: copy few more note points from dev guide
The intention behind copying these note points is to document the
behaviour of vstart_runner.py inside vstart_runner.py as well so that
developer don't miss it out while working on it.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2022-05-02 20:25:19 +05:30
Rishabh Dave
7d53423439 qa/vstart_runner: override adjust-ulimits, ceph-coverage & sudo
Overridding commands is much better than deleting these commands from
command argument string using Python since, unlike deleting, overridding
doesn't require parsing. A note has been added for this to
vstart_runner.py's module docstring and to Ceph Developer's Guide
document.

Since functions don't work with sh shell, to make overriding work
vstart_runner.py will use bash shell here onwards.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2022-05-02 20:25:17 +05:30
Rishabh Dave
27eaacd98a qa/vstart_runner: accept multiple commands as str
Convert all command arguments to str from list, update checks and
adjustments performed on command arguments accordingly and update
documentation to include warnings about some critical parts of
vstart_runner.py and update tasks.cephfs.mount.MountCephFS.run_shell().

Fixes: https://tracker.ceph.com/issues/47849
Signed-off-by: Rishabh Dave <ridave@redhat.com>
2022-05-02 20:24:08 +05:30
Marcus Watts
9235cf95c1 qa/rgw - run sse-s3 test cases only if configured or requested
This commit adds logic to automatically detect when sse-s3 is
available and if not, disables sse-s3 tests by default.
Configuration opions are provided to override the default either way.

Signed-off-by: Marcus Watts <mwatts@redhat.com>
2022-04-27 21:14:55 -04:00
Rishabh Dave
2fcdbcd6f5 qa/cephfs: don't remove sudo from the command arguments
run_shell() in qa.tasks.cephfs.mount.CephFSMount prepends "sudo" to its
command arguments but it doesn't specify to the underlying method that
"sudo" shouldn't be deleted from the command arguments.

Fixes: https://tracker.ceph.com/issues/53601
Signed-off-by: Rishabh Dave <ridave@redhat.com>
2022-04-27 16:02:36 +05:30
Rishabh Dave
d9fbf65f77 qa/vstart_runner: set LocalCephManager.cluster
Use LocalContext instance to set LocalCephManager.cluster.

Fixes: https://tracker.ceph.com/issues/53601
Signed-off-by: Rishabh Dave <ridave@redhat.com>
2022-04-27 16:02:34 +05:30
Kotresh HR
c57a13f8be qa: Fix a few tracebacks in vstart_runner
1. CommandFailedError: Command failed with status 127: \
	['None/archive/coverage', 'rados' ...]
2. TypeError: a bytes-like object is required, not '_io.BytesIO'

Fixes: https://tracker.ceph.com/issues/53601
Signed-off-by: Kotresh HR <khiremat@redhat.com>
2022-04-27 16:02:32 +05:30
Rishabh Dave
eac83582f3 qa/cephfs: add check in test_acls.py
In xfstests-dev, "./check generic/abcd" doesn't end in error even when
there is no test abcd in generic. It's better to check the stdout to
verify success and print the returncode, stdout and stderr of the
command in logs so that such error can be found out by reading logs.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2022-04-27 14:44:37 +05:30
Rishabh Dave
d3b9543624 qa/cephfs: print cmd debug info when it fails
Print return code, stdout and stderr for the command that launches
xfstests-dev tests against CephFS when it fails.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2022-04-27 14:44:37 +05:30