Commit Graph

400 Commits

Author SHA1 Message Date
Patrick Donnelly
6adcace694
Merge PR #30802 into master
* refs/pull/30802/head:
	cephfs-shell: Modify Quota Test
	cephfs-shell: Fix permission errors on quota tests
	cephfs-shell: Add tests for quota
	cephfs-shell: Print max_bytes and max_files as string on get Quota
	cephfs-shell: Remove extra length argument passed to setxattr()

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Rishabh Dave <ridave@redhat.com>
2020-01-07 14:11:16 -08:00
Patrick Donnelly
e83aa733b9
Merge PR #32459 into master
* refs/pull/32459/head:
	qa/tasks: Nothing to clean up if the volume was not created
	mgr/volumes: drop obsolete comment in _cmd_fs_volume_create
	mgr/volumes: cleanup on fs create error

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2020-01-07 14:08:41 -08:00
Patrick Donnelly
87755902ad
Merge PR #31494 into master
* refs/pull/31494/head:
	qa: force creation of fs with EC default data pool
	qa: add tests for adding EC data pools
	mon/MDSMonitor: warn when creating fs with default EC data pool

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
2020-01-06 12:30:59 -08:00
Patrick Donnelly
6ea2730ea6
qa: fix various py3 cephfs qa bugs
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2020-01-03 16:42:13 -08:00
Jos Collin
67e43f4668
qa/tasks: Nothing to clean up if the volume was not created
There are only 2 cases which needs cleanup:
1. The volume is successfully created
2. The volume is successfully created but create_mds fails

In either case, we could do a 'volume rm'.

Signed-off-by: Jos Collin <jcollin@redhat.com>
2020-01-03 15:55:56 +05:30
Varsha Rao
cd15fc8a77 cephfs-shell: Modify Quota Test
This patch makes following modifications quota test:
- Add additional condtion to confirm Command Failure Error due to exceeding set
  quota values.
- Rename function valid to set_and_get_quota_vals.
- Use run_cephfs_shell_cmd instead of get_cephfs_shell_cmd_output.

Signed-off-by: Varsha Rao <varao@redhat.com>
2019-12-28 17:55:40 +05:30
Varsha Rao
228a290c2d cephfs-shell: Fix permission errors on quota tests
Use of mount_a.run_shell() to create directory, requires Sudo access and
cephfs-shell should be run without sudo access. Instead use cephfs-shell mkdir
command to create directory.

Signed-off-by: Varsha Rao <varao@redhat.com>
2019-12-28 17:55:40 +05:30
Varsha Rao
d4b5c760cd cephfs-shell: Add tests for quota
Signed-off-by: Varsha Rao <varao@redhat.com>
2019-12-28 17:55:40 +05:30
Kefu Chai
4c6a5798c2
Merge pull request #32222 from toabctl/qa-flake8-py3
qa: Run flake8 on python2 and python3

Reviewed-by: Kefu Chai <kchai@redhat.com>
2019-12-24 10:47:07 +08:00
Patrick Donnelly
6e448f9aa0
qa: force creation of fs with EC default data pool
In the future, we should add the EC data pool as a supplementary data
pool but that requires a mount to setup which is awkward in the code
here. When cephfs-shell is more widely available, this will be easier.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2019-12-20 12:57:31 -08:00
Patrick Donnelly
bf0cf8e08b
qa: add tests for adding EC data pools
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2019-12-20 12:53:10 -08:00
Sage Weil
cfef72ede7 Merge PR #32359 into master
* refs/pull/32359/head:
	qa/workunits: python -> python3 throughout
	qa/workunits/fs/misc/direct_io.py: fix for py3
	qa/tasks/cephfs: os.write takes bytes, not str

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2019-12-19 16:21:44 -06:00
Patrick Donnelly
49a093d79a
Merge PR #32168 into master
* refs/pull/32168/head:
	test_cephfs_shell: fix test_du_works_for_hardlinks

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2019-12-19 11:54:36 -08:00
Sage Weil
05eb2f647d qa/tasks/cephfs: os.write takes bytes, not str
Signed-off-by: Sage Weil <sage@redhat.com>
2019-12-19 11:12:04 -06:00
Sage Weil
3c751fea7f qa/tasks/cephfs: python3
Signed-off-by: Sage Weil <sage@redhat.com>
2019-12-18 21:51:52 -06:00
Sage Weil
1de47907c3 qa/tasks/cephfs/fuse_mount: use python3
Signed-off-by: Sage Weil <sage@redhat.com>
2019-12-18 17:13:57 -06:00
Patrick Donnelly
b31a020008
Merge PR #31884 into master
* refs/pull/31884/head:
	qa/tasks: Fix the volume ls in test_volume_rm
	qa/tasks: tests for 'fs volume create' and 'fs volume ls'

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2019-12-16 16:30:45 -08:00
Thomas Bechtold
c150befff8 qa: Fix flake8 for qa/tasks/cephfs/test_volumes.py
Signed-off-by: Thomas Bechtold <tbechtold@suse.com>
2019-12-13 09:24:25 +01:00
Thomas Bechtold
bdcc94a1d1 qa: Run flake8 on python2 and python3
To be able to catch problems with python2 *and* python3, run flake8
with both versions. From the flake8 homepage:

It is very important to install Flake8 on the correct version of
Python for your needs. If you want Flake8 to properly parse new
language features in Python 3.5 (for example), you need it to be
installed on 3.5 for Flake8 to understand those features. In many
ways, Flake8 is tied to the version of Python on which it runs.

Also fix the problems with python3 on the way.
Note: This requires now the six module for teuthology. But this is
already an install_require in teuthology itself.

Signed-off-by: Thomas Bechtold <tbechtold@suse.com>
2019-12-13 09:24:20 +01:00
Rishabh Dave
4e11b5b5e7 test_cephfs_shell: fix test_du_works_for_hardlinks
ln command needs superuser privileges, oddly that test had run
successfully before.

Fixes: https://tracker.ceph.com/issues/43250
Signed-off-by: Rishabh Dave <ridave@redhat.com>
2019-12-13 12:15:27 +05:30
Thomas Bechtold
0127cd1e88 qa: Enable flake8 tox and fix failures
There were a couple of problems found by flake8 in the qa/
directory (most of them fixed now). Enabling flake8 during the usual
check runs hopefully avoids adding new issues in the future.

Signed-off-by: Thomas Bechtold <tbechtold@suse.com>
2019-12-12 10:21:01 +01:00
Patrick Donnelly
2216c63ed5
Merge PR #31729 into master
* refs/pull/31729/head:
	qa: reduce cache size further
	mds: obsoleting 'mds_cache_size'

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2019-12-11 09:44:27 -08:00
Patrick Donnelly
a645994d75
Merge PR #30201 into master
* refs/pull/30201/head:
	qa/tasks: remove subvolume, subvolumegroup and their snapshots with --force
	qa/tasks: Fix the commands success
	qa/tasks: Fix raises that doesn't re-raise

Reviewed-by: Ramana Raja <rraja@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2019-12-11 09:36:49 -08:00
Patrick Donnelly
0448a31fcb
qa: fix output check to not be sensitive to debugging
The traceback would screw up the equality checks.

Also, use unittest asserts so we can easily see the assert values.

Fixes: https://tracker.ceph.com/issues/43247
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2019-12-10 16:45:09 -08:00
Patrick Donnelly
59f641e295
qa: reduce cache size further
1M isn't low enough to trigger recall/trimming.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2019-12-10 13:24:50 -08:00
Patrick Donnelly
12e7401a43
Merge PR #27894 into master
* refs/pull/27894/head:
	cephfs-shell: Add default list to df
	cephfs-shell: Add tests for df command
	cephfs-shell: Fix 'df' command errors

Reviewed-by: Rishabh Dave <ridave@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2019-12-09 17:05:52 -08:00
Jos Collin
691352413e
qa/tasks: Fix the volume ls in test_volume_rm
Signed-off-by: Jos Collin <jcollin@redhat.com>
2019-12-09 17:37:17 +05:30
Jos Collin
5e998bd9b5
qa/tasks: tests for 'fs volume create' and 'fs volume ls'
Fixes: https://tracker.ceph.com/issues/42872
Signed-off-by: Jos Collin <jcollin@redhat.com>
2019-12-09 17:37:16 +05:30
Rishabh Dave
d6f768b24e qa/cephfs: test conf file reading for CephFS shell
Adds tests that checks -
* reading conf option
* reading conf option after setting it twice
* reading conf option after setting it after a reset

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2019-12-06 08:54:06 +05:30
Rishabh Dave
a1e3e270b9 qa/cephfs: allow passing conf to methods that runs shell command
Add an argument to the methods that issues CephFS shell command to
accept path to the ceph.conf file.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2019-12-06 08:54:06 +05:30
Rishabh Dave
2f85a03b56 test_cephfs_shell: update test since shell can now read ceph.conf
In the test
test_cephfs_shell.TestMisc.test_issue_cephfs_shell_cmd_at_invocation,
don't set the shell option with in the command to be tested since
CephFS shell can now read it's value from ceph.conf.

Also, add methods to set config options for vstart as well teuthology
testing.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2019-12-06 08:52:59 +05:30
Patrick Donnelly
e8368d61be
Merge PR #29421 into master
* refs/pull/29421/head:
	qa/cephfs: add tests for ACLs
	qa/cephfs: allow running tests from xfstests-dev
	qa/tasks: add methods to get monitor's sockets
	qa/cephfs: don't crash if mountpoint dir is already deleted
	vstart_runner.py: set omit_sudo's default value to False
	qa/vstart_runner.py: fix get_keyring_path()
	qa/cephfs: don't abort if mountpoint is already present
	qa/cephfs: allow specifying mountpoint for kernel mounts
	qa/cephfs: allow specifying mountpoints for FUSE mounts
	qa/vstart_runner.py: allow specifying mountpoint for local FUSE mounts
	qa/mount.py: allow setting mountpoint
	qa/vstart_runner.py: add a method to create a temporary directory

Reviewed-by: Jeff Layton <jlayton@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2019-12-05 13:25:03 -08:00
Patrick Donnelly
67143642db
qa: test volumes plugin mount cleanup
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2019-12-04 07:01:42 -08:00
Patrick Donnelly
4e16633856
qa: improve variable name
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2019-12-04 07:01:34 -08:00
Patrick Donnelly
98e3b7efe8
qa: test mgr cephfs mount blacklist
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2019-12-03 17:53:14 -08:00
Rishabh Dave
a9db23fd18 qa/cephfs: add tests for ACLs
Add code to run tests for ACLs from xfstests-dev against kernel and
FUSE CephFS mounts.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2019-12-03 18:17:18 +05:30
Ramana Raja
aeaef1b4c5 mds: obsoleting 'mds_cache_size'
Remove last bits of support for 'mds_cache_size'.
'mds_cache_memory_limit' is preferred.

Fixes: https://tracker.ceph.com/issues/41951
Signed-off-by: Ramana Raja <rraja@redhat.com>
2019-12-02 14:51:25 +05:30
Patrick Donnelly
f1e3fec83d
Merge PR #27467 into master
* refs/pull/27467/head:
	cephfs-shell: add snapshot management

Reviewed-by: Rishabh Dave <ridave@redhat.com>
Reviewed-by: Varsha Rao <varao@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2019-11-26 09:47:40 -08:00
Patrick Donnelly
e4b3036422
Merge PR #31418 into master
* refs/pull/31418/head:
	test: use distinct subvolume/group/snapshot names

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Ramana Raja <rraja@redhat.com>
2019-11-20 15:34:02 -08:00
Patrick Donnelly
5a0fa12513
Merge PR #30553 into master
* refs/pull/30553/head:
	qa/tasks: check if fs mounted in umount_wait

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2019-11-20 15:31:33 -08:00
Jos Collin
42c135d85a
qa/tasks: remove subvolume, subvolumegroup and their snapshots with --force
* tests 'fs subvolume rm --force'
* tests 'fs subvolume snapshot rm --force'
* tests 'fs subvolumegroup rm --force'
* tests 'fs subvolumegroup snapshot rm --force'

Signed-off-by: Jos Collin <jcollin@redhat.com>
2019-11-20 12:09:13 +05:30
Jos Collin
c8f6a25ca4
qa/tasks: Fix the commands success
* Raised RuntimeException when the commands, which were expected to fail succeed.
* Dropped some commands with --force remove commands, as it is unnecessary.

Signed-off-by: Jos Collin <jcollin@redhat.com>
2019-11-20 12:09:12 +05:30
Jos Collin
992d8b6a74
qa/tasks: Fix raises that doesn't re-raise
* Fixed raises that doesn't re-raise
* Dropped some commands with --force remove commands, as it is unnecessary.

Signed-off-by: Jos Collin <jcollin@redhat.com>
2019-11-20 12:05:09 +05:30
Ramana Raja
caba9474a3
Merge pull request #30336 from joscollin/wip-F40959-subvolume-uid-gid
mgr/volumes: uid, gid for subvolume create and subvolumegroup create commands
2019-11-19 14:16:46 +05:30
Varsha Rao
2c1c683b19 cephfs-shell: Add tests for df command
This patch adds tests for valid and invalid directory, valid files and testing
df without any arguments.

Signed-off-by: Varsha Rao <varao@redhat.com>
2019-11-15 16:51:05 +05:30
Patrick Donnelly
fc2bb6ed47
Merge PR #31626 into master
* refs/pull/31626/head:
	test_cephfs_shell: initialize stderr for run_cephfs_shell_cmd()

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2019-11-14 11:13:09 -08:00
Jos Collin
a1ff179231
qa/tasks: uid, gid for subvolume create and subvolumegroup create commands
Fixes: https://tracker.ceph.com/issues/40959
Signed-off-by: Jos Collin <jcollin@redhat.com>
2019-11-14 14:37:28 +05:30
Rishabh Dave
bafef71e49 test_cephfs_shell: initialize stderr for run_cephfs_shell_cmd()
Since teuthology initializes stderr to None by default, absence of this
breaks the tests accessing stderr of commands executed within the test
when the execution is using teuthology.

Fixes: https://tracker.ceph.com/issues/42806
Signed-off-by: Rishabh Dave <ridave@redhat.com>
2019-11-14 13:54:14 +05:30
Patrick Donnelly
a6b7ca3800
Merge PR #31157 into master
* refs/pull/31157/head:
	doc: update inf/infinite option for subvolume resize
	qa/tasks: fs subvolume resize inf command
	mgr/volumes: fs subvolume resize inf/infinite command

Reviewed-by: Ramana Raja <rraja@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2019-11-12 09:25:26 -08:00
Jos Collin
c77391e9af
qa/tasks: fs subvolume resize inf command
tests for fs subvolume resize inf command

Fixes: https://tracker.ceph.com/issues/42479
Signed-off-by: Jos Collin <jcollin@redhat.com>
2019-11-07 18:08:48 +05:30