Commit Graph

630 Commits

Author SHA1 Message Date
Varsha Rao
93aa5e4012 qa/tasks/test_nfs: Add test for cluster info
Signed-off-by: Varsha Rao <varao@redhat.com>
2020-07-07 10:50:22 +05:30
Kefu Chai
a045778d5b qa/tasks/cephfs: drop six dependency
Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-07-05 10:58:28 +08:00
Kefu Chai
ee90f40905 qa/tasks/cephfs: drop py2 support
Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-07-05 10:58:28 +08:00
Varsha Rao
d7396fdc0f qa/tasks/test_nfs: Add todo note for cluster update test
Signed-off-by: Varsha Rao <varao@redhat.com>
2020-06-30 23:17:38 +05:30
Varsha Rao
5f506e3969 qa/tasks/cephfs/test_nfs: Add test for get and list detailed export
Signed-off-by: Varsha Rao <varao@redhat.com>
2020-06-30 23:17:38 +05:30
Varsha Rao
1aa2a660bd qa/tasks/cephfs/test_nfs: Add test for export user id
Signed-off-by: Varsha Rao <varao@redhat.com>
2020-06-30 23:17:38 +05:30
Varsha Rao
dfa3ab4349 qa/tasks/cephfs/test_nfs: Add description for each test
Signed-off-by: Varsha Rao <varao@redhat.com>
2020-06-30 23:17:38 +05:30
Varsha Rao
eab60b5fad qa/tasks/cephfs: Add tests for export create with non-existing fsname and cluster id
Signed-off-by: Varsha Rao <varao@redhat.com>
2020-06-30 23:17:38 +05:30
Varsha Rao
285ab1b4ae qa/tasks/cephfs: Add tests for invalid cluster id, export type and modify list cluster
Signed-off-by: Varsha Rao <varao@redhat.com>
2020-06-30 23:17:38 +05:30
Varsha Rao
9418b42b29 qa/tasks/cephfs: Add test for listing exports
Signed-off-by: Varsha Rao <varao@redhat.com>
2020-06-30 23:17:38 +05:30
Varsha Rao
eb2cd16fbe qa/tasks/cephfs: Add test for nfs cluster ls command
Signed-off-by: Varsha Rao <varao@redhat.com>
2020-06-30 23:17:38 +05:30
Varsha Rao
3b554f2310 qa/tasks/cephfs: Add test to check if export is available on restarting mgr
Signed-off-by: Varsha Rao <varao@redhat.com>
2020-06-30 23:17:38 +05:30
Varsha Rao
1a55888b1b qa/tasks/cephfs: Add idempotency test for nfs commands
Signed-off-by: Varsha Rao <varao@redhat.com>
2020-06-30 23:17:38 +05:30
Patrick Donnelly
95332d5fab
Merge PR #35038 into master
* refs/pull/35038/head:
	qa/tasks/cephfs/cephfs_test_case.py: skip cleaning the core dumps

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2020-06-30 10:36:36 -07:00
Patrick Donnelly
bba0cb878a
Merge PR #35420 into master
* refs/pull/35420/head:
	mgr/volumes: Fix pool removal on volume deletion

Reviewed-by: Ramana Raja <rraja@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Jos Collin <jcollin@redhat.com>
2020-06-25 14:33:12 -07:00
Patrick Donnelly
4636a1bda8
Merge PR #35664 into master
* refs/pull/35664/head:
	qa: add omit_sudo=False for commands ran with sudo

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Xiubo Li <xiubli@redhat.com>
2020-06-25 14:31:33 -07:00
Patrick Donnelly
683153c56e
qa: fix flake8 warnings
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2020-06-24 15:43:33 -07:00
Patrick Donnelly
982041e89d
pybind/mgr/volumes: wire up pinning subvolumes/subvolumegroups
Fixes: https://tracker.ceph.com/issues/41541
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2020-06-24 15:43:32 -07:00
Patrick Donnelly
69e3f556a7
qa: adapt tests for empty pinned dir export
Previously, empty pinned directories were not migrated.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2020-06-24 15:43:32 -07:00
Patrick Donnelly
091e8ffd9d
qa: break export pin tests into discrete tests
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2020-06-24 15:43:32 -07:00
Patrick Donnelly
aef549e49e
qa: add more ephemeral pin tests
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2020-06-24 15:43:32 -07:00
Sidharth Anupkrishnan
aa99c8546b
qa: add tests for ephemeral pinning
Signed-off-by: Sidharth Anupkrishnan <sanupkri@redhat.com>
2020-06-24 15:43:32 -07:00
Patrick Donnelly
5eea6761cc
mds: trim pinned and empty subtrees
Before export (and ephemeral) pinned subtrees are stuck in cache
forever.

Add qa test for checking export pinned directories can be trimmed.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2020-06-24 15:43:31 -07:00
Patrick Donnelly
c050623065
qa: refactor _wait_subtree and _get_subtree
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2020-06-24 15:43:30 -07:00
Patrick Donnelly
ddb18091a6
qa: use status from wait_for_daemons
Avoid an extra `fs dump` call.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2020-06-24 15:43:30 -07:00
Patrick Donnelly
f451c43aca
qa: quietly print json output from asok commands
Pretty print output once. Use --format=json so the stdout on teuthology
is not pretty printed, taking hundreds of lines.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2020-06-24 15:43:29 -07:00
Patrick Donnelly
e21f6bee65
Merge PR #35540 into master
* refs/pull/35540/head:
	qa/cephfs: don't pass cmd args from run_as_user as str
	qa/cephfs: refactor run_as_root() to user run_as_user()

Reviewed-by: Jeff Layton <jlayton@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2020-06-24 11:31:29 -07:00
Kefu Chai
21ad5bf2eb qa/tasks/cephfs: flake8 fixes
Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-06-24 10:12:11 +08:00
Kotresh HR
d07ea8db47 mgr/volumes: Fix pool removal on volume deletion
While volume deletion, the associated pools are not always
removed. The pools are removed only if the volume is created
using mgr plugin and not if created with custom osd pools.
This is because mgr plugin generates pool names with specific
pattern. Both create and delete volume relies on it. This
patch fixes the issue by identifying the pools of the volume
without relying on the pattern.

Fixes: https://tracker.ceph.com/issues/45910
Signed-off-by: Kotresh HR <khiremat@redhat.com>
2020-06-23 23:04:28 +05:30
Kefu Chai
981a7cc923 qa/tasks/cephfs/test_nfs.py: flake8 fixes
Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-06-23 23:01:27 +08:00
Patrick Donnelly
0e1dc163db
Merge PR #35646 into master
* refs/pull/35646/head:
	qa/tasks/cephfs/nfs: Poll for max 60 seconds to ensure removal of ganesha services
	pybind/mgr/volumes/nfs: Remove unused cephfs module
	mgr/volumes/nfs: Ignore if ganesha disconnects

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
Reviewed-by: Ramana Raja <rraja@redhat.com>
2020-06-23 06:44:08 -07:00
Xiubo Li
de62c5393b qa/tasks/cephfs/cephfs_test_case.py: skip cleaning the core dumps
|/usr/libexec/abrt-hook-ccpp %s %c %p %u %g %t e %P %I %h

If the first character of this file is a pipe symbol (|), then the
remainder of the line is interpreted as the command-line for a
user-space program (or script) that is to be executed. More detail,
please see: http://man7.org/linux/man-pages/man5/core.5.html

Here will just skip cleaning the core dumps in this case.

Fixes: https://tracker.ceph.com/issues/45530
Signed-off-by: Xiubo Li <xiubli@redhat.com>
2020-06-22 19:22:43 -04:00
Varsha Rao
0caa54bae8 qa/tasks/cephfs/nfs: Poll for max 60 seconds to ensure removal of ganesha services
Fixes: https://tracker.ceph.com/issues/46104
Signed-off-by: Varsha Rao <varao@redhat.com>
2020-06-22 12:13:11 +05:30
Rishabh Dave
90727ee474 qa: add omit_sudo=False for commands ran with sudo
Commands that cleanup FUSE and kernel mount and that setup and
teardown/cleanup network namespaces are that ones that use sudo. Set
omit_sudo to False while running these commands.

Fixes: https://tracker.ceph.com/issues/46101
Signed-off-by: Rishabh Dave <ridave@redhat.com>
2020-06-19 14:21:04 +05:30
Patrick Donnelly
62777f653d
qa: fix type error in stderr processing
Fixes: 422d736568
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2020-06-18 07:12:08 -07:00
Rishabh Dave
23f279d7a9 qa/cephfs: don't pass cmd args from run_as_user as str
Passing command arguments from run_as_user() to run_shell() as string
can be problematic since command argument to be passed to -c option of
sudo should be a single argument (i.e. 'ls dir' instead of
['ls', 'dir']).

Fixes: https://tracker.ceph.com/issues/46057
Signed-off-by: Rishabh Dave <ridave@redhat.com>
2020-06-17 23:13:05 +05:30
Rishabh Dave
4c9811aae3 qa/cephfs: refactor run_as_root() to user run_as_user()
Signed-off-by: Rishabh Dave <ridave@redhat.com>
2020-06-17 23:12:59 +05:30
Rishabh Dave
58c7c7e8f4 test_cephfs_shell: run cephfs-shell with conf file
And set colors to False and debug to True in this conf file.

stdout captured by Python code in this testsuite can contain the colour
codes along with the expected string output. Setting colors to False in
cephfs-shell.conf should fix this.

Setting debug to False should help with analyzing test failures since
it enables printing messages that helps debugging (stacktrace for
cephfs-shell code, for example).

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2020-06-17 17:21:31 +05:30
Patrick Donnelly
0e74b92258
Merge PR #32288 into master
* refs/pull/32288/head:
	test_cephfs_shell: remove test_every_shell_cmd_at_invocation
	test_cephfs_shell: catch specific exception instead of catching all
	cephfs-shell: set return value before exiting
	test_cephfs_shell: re-arrange TestCephFSShell's methods
	cephfs-shell: re-arrange code under __main__
	test_cephfs_shell: add new test for shell cmd at invocation
	cephfs-shell: launch shell only if there are no args following

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Varsha Rao <varao@redhat.com>
2020-06-16 19:28:48 -07:00
Patrick Donnelly
4b54ab690b
Merge PR #34716 into master
* refs/pull/34716/head:
	mgr/volumes: Add snapshot info command

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Jos Collin <jcollin@redhat.com>
2020-06-12 14:10:14 -07:00
Rishabh Dave
99d944ce67 test_cephfs_shell: remove test_every_shell_cmd_at_invocation
The reason behind adding and removing this test in different commits of
the same PR is that test_every_shell_cmd_at_invocation is to keep it in
case it's needed later. It reruns all tests in this testsuite by issuing
all cephfs shell commands as arguments to cephfs-shell instead of
issuing them on stdin.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2020-06-05 09:41:17 +05:30
Rishabh Dave
a11b3c0177 test_cephfs_shell: catch specific exception instead of catching all
Signed-off-by: Rishabh Dave <ridave@redhat.com>
2020-06-05 09:41:17 +05:30
Rishabh Dave
9b2077ff10 cephfs-shell: set return value before exiting
Code for each command has a return value set yet cephfs-shell itself
doesn't exit with proper return value. This makes cephfs-shell quit with
zero return value all the time.

Also, many tests execute cephfs-shell commands expecting the command to
fail but without expecting the method issuing the command to fail. Fix
these test accordingly by adding a new method (negtest_cephfs_shell_cmd)
that expects the command to fail and allows verifying return value and
error messages.

Fixes: https://tracker.ceph.com/issues/44113
Signed-off-by: Rishabh Dave <ridave@redhat.com>
2020-06-05 09:41:16 +05:30
Rishabh Dave
c4bd10bdb9 test_cephfs_shell: re-arrange TestCephFSShell's methods
Re-arrange in the order of their usefulness and use keyword arguments
instead of positional arguments to reduce chances of errors, especially
since test_every_cephfs_shell_cmd_at_invocation overrides these methods.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2020-06-05 09:31:40 +05:30
Rishabh Dave
d0be1f9f07 test_cephfs_shell: add new test for shell cmd at invocation
Test passing each CephFS shell command at invocation of shell. The test
replaces run_cephfs_shell_cmd (and other related methods) by it's own
version of the same method that runs each shell command as
"cephfs-shell -c ceph.conf shellcmd" instead of
"cephfs-shell -c ceph.conf -- shellcmd" and then run each
test_cephfs_shell.py.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2020-06-05 09:28:03 +05:30
Patrick Donnelly
6be968228e
Merge PR #35263 into master
* refs/pull/35263/head:
	test_cephfs_shell: use StringIO instead of BytesIO

Reviewed-by: Varsha Rao <varao@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2020-06-04 16:08:58 -07:00
Rishabh Dave
b67ce004ad test_cephfs_shell: use StringIO instead of BytesIO
Code in qa/ uses both StringIO and BytesIO. Let's use StringIO
exclusively (unless necessary) for uniformity. The reason for using
StringIO over BytesIO is that tests mostly need stdout as string than
as bytes and StringIO is used more frequently used in qa/ code at this
point.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2020-06-05 00:02:36 +05:30
Patrick Donnelly
4729688792
Merge PR #35202 into master
* refs/pull/35202/head:
	qa: return a string via getfattr

Reviewed-by: Sidharth Anupkrishnan <sanupkri@redhat.com>
2020-06-03 07:43:08 -07:00
Patrick Donnelly
f3d52ec619
Merge PR #35328 into master
* refs/pull/35328/head:
	qa/tasks/cephfs/test_scrub.py: use umount_wait to avoid ceph-fuse stuck

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2020-06-03 07:41:09 -07:00
Patrick Donnelly
340d2a828f
Merge PR #34288 into master
* refs/pull/34288/head:
	mds: flag backtrace scrub failures for new files as okay

Reviewed-by: Zheng Yan <zyan@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2020-06-02 18:57:28 -07:00