Commit Graph

452 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
593d3b1779
qa: detect RHEL8 for yum package installation
Fixes: https://tracker.ceph.com/issues/43487
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2020-01-07 13:54:17 -08:00
Patrick Donnelly
ae28ed11d7
qa: fix various py3 cephfs qa bugs x2
Fixes: https://tracker.ceph.com/issues/43515
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2020-01-07 13:06:11 -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
Rishabh Dave
a80c2390e9 qa/cephfs: allow running tests from xfstests-dev
Add code to get and configure xfstests-dev repository so that tests from
this repository can be executed for CephFS.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2019-11-06 16:16:39 +05:30
Rishabh Dave
af2a8eb24b qa/cephfs: don't crash if mountpoint dir is already deleted
Teuthology jobs crash due to this after the test and it's teardown has
run successfully.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2019-11-06 11:36:10 +05:30
Rishabh Dave
39a15d091f qa/cephfs: don't abort if mountpoint is already present
Instead, let the execution continue.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2019-11-06 11:36:10 +05:30
Rishabh Dave
b7005a2ac2 qa/cephfs: allow specifying mountpoint for kernel mounts
Allow specifying the directory in CephFS that should be kernel mounted
at the given path.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2019-11-06 11:36:10 +05:30
Rishabh Dave
48a95d00ba qa/cephfs: allow specifying mountpoints for FUSE mounts
Allow specifying the directory in CephFS that should be FUSE mounted at
the given path.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2019-11-06 11:36:10 +05:30
Rishabh Dave
f1e521a43b qa/mount.py: allow setting mountpoint
Add setter method so that mountpoint for CephFSMount object can be set
later.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2019-11-06 11:36:09 +05:30
Venky Shankar
b9cff8af8e test: use distinct subvolume/group/snapshot names
Fixes: http://tracker.ceph.com/issues/42646
Signed-off-by: Venky Shankar <vshankar@redhat.com>
2019-11-05 10:04:47 -05:00
Milind Changire
73597e94f1 cephfs-shell: add snapshot management
Snapshots can be managed by:
$ snap {create|delete} snap_name dir_name

Fixes: http://tracker.ceph.com/issues/38681
Signed-off-by: Milind Changire <mchangir@redhat.com>
2019-11-04 16:17:32 +05:30
Rishabh Dave
34ab7b9465 test_cephfs_shell: pass arg to "help" in test_help
The default behaviour by cmd2 for help command with no argument is to
print all possible commands and return 1. This leads to a failure even
when test is supposed to pass.

Fixes: https://tracker.ceph.com/issues/42101
Signed-off-by: Rishabh Dave <ridave@redhat.com>
2019-11-02 14:18:07 +05:30
Jos Collin
319acf981e
qa/tasks: check if fs mounted in umount_wait
Fixes: https://tracker.ceph.com/issues/42020
Signed-off-by: Jos Collin <jcollin@redhat.com>
2019-11-02 05:02:48 +05:30
Patrick Donnelly
f64688880d
Merge PR #30054 into master
* refs/pull/30054/head:
	doc: fs subvolume resize command
	qa/tasks: tests for resize subvolume
	mgr/volumes: fs subvolume resize command

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2019-11-01 15:57:56 -07:00
Patrick Donnelly
9dc07d8096
qa: add tests for CephFS admin commands
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2019-10-30 11:44:26 -07:00
Jos Collin
045457873d
qa/tasks: tests for resize subvolume
* That a subvolume can be expanded in size and its quota matches the expected size.
* That a subvolume can be shrinked in size and its quota matches the expected size.
* That a subvolume cannot be resized to an invalid size and the quota did not change
* That a subvolume cannot be resized to a zero size and the quota did not change
* That a subvolume can be resized to a size smaller than the current used size and
  the resulting quota matches the expected size.
* That a subvolume cannot be resized to a size smaller than the current used size when
  --no_shrink is given and the quota did not change.
* That the subvolume can be expanded from a full subvolume and future writes succeed.

Fixes: https://tracker.ceph.com/issues/41182
Signed-off-by: Jos Collin <jcollin@redhat.com>
2019-10-24 16:06:31 +05:30
Patrick Donnelly
be1fa70b84
qa: do not check pg count for new data_isolated volume
We don't need to specify the number of PGs for a new data pool anymore
since b1b821f608 and other related
changes. The related health warnings are also deprecated/gone. So this
no longer needs to be done.

Fixes: b1b821f608
Fixes: https://tracker.ceph.com/issues/42436
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2019-10-23 11:14:28 -07:00
Patrick Donnelly
f9d5c6de86
Merge PR #30710 into master
* refs/pull/30710/head:
	mds: add configurable snapshot limit

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2019-10-22 20:55:19 -07:00
Patrick Donnelly
3c4328c0a4
Merge PR #30813 into master
* refs/pull/30813/head:
	qa: get rid of iteritems for python3 compatibility

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2019-10-21 21:22:00 -07:00
Venky Shankar
dcbdc726a6 qa: allow client mount to reset fully
... without this there is a sutle race where it takes a
bit of time after a hard reset of a client mount causing
further checks to fail as the (still up) client is still
connected to the MDS.

Fixes: http://tracker.ceph.com/issues/42213
Signed-off-by: Venky Shankar <vshankar@redhat.com>
2019-10-21 08:38:37 -04:00
Kefu Chai
18ccae63fa
Merge pull request #30758 from kshtsk/wip-python3-print
tests: use python3 compatible print

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Gregory Farnum <gfarnum@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2019-10-21 00:34:18 +08:00
Milind Changire
c15905cd97 mds: add configurable snapshot limit
Added config option "mds_max_snaps_per_dir" defaulting to 100

Fixes: https://tracker.ceph.com/issues/41209

Signed-off-by: Milind Changire <mchangir@redhat.com>
2019-10-17 11:45:00 +05:30
Kyr Shatskyy
50b1823fac qa: get rid of iteritems for python3 compatibility
Fixes: https://tracker.ceph.com/issues/42267
Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@suse.com>
2019-10-15 11:27:39 +02:00
Patrick Donnelly
3ebc5465d4
Merge PR #30816 into master
* refs/pull/30816/head:
	qa: use small default pg count for CephFS pools
	*: remove config of "mon pg warn min per osd" in testing

Reviewed-by: Laura Paduano <lpaduano@suse.com>
2019-10-14 17:59:12 -07:00
Patrick Donnelly
fc88e6c6c5
qa: use small default pg count for CephFS pools
The pg count needs to be a power-of-two since
dff5697464.

Also, mon_pg_warn_min_per_osd is disabled by default now (or set to a
low value in vstart/testing) so there's no need to base the pg count on
this value.

Ideally someday we can remove this so that the default cluster value is
used but we need to keep this for deployments of older versions of Ceph.

Fixes: https://tracker.ceph.com/issues/42228
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2019-10-14 10:45:05 -07:00
Kyr Shatskyy
7e87f80a87 tests: use python3 compatible print
Fixes: https://tracker.ceph.com/issues/42210
Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@suse.com>
2019-10-11 19:02:04 +02:00
Kyr Shatskyy
5f95b532aa qa: get rid of iterkeys for py3 compatibility
Fixes: https://tracker.ceph.com/issues/42287

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@suse.com>
2019-10-11 18:54:29 +02:00
Jos Collin
1bdd75f999
qa/tasks: tests for ls
tests for:
* fs subvolume ls
* 'fs subvolume ls' for non-existent default group
* fs subvolumegroup ls
* 'fs subvolumegroup ls' for not-existent /volume
* fs subvolume snapshot ls
* fs subvolumegroup snapshot ls

Fixes: https://tracker.ceph.com/issues/41842
Signed-off-by: Jos Collin <jcollin@redhat.com>
2019-10-08 11:53:46 +05:30
Ramana Raja
0bfcace85e
Merge pull request #30407 from joscollin/wip-B41841-yes-really-mean-it
mgr/volumes: protection for `fs volume rm` command
2019-10-01 13:05:33 +05:30
Jos Collin
f1b9e90d7f
qa/tasks: add/update tests for --yes-i-really-mean-it
Fixes: https://tracker.ceph.com/issues/41841
Signed-off-by: Jos Collin <jcollin@redhat.com>
2019-09-27 15:17:34 +05:30
Patrick Donnelly
719cb3f5b4
Merge PR #30297 into master
* refs/pull/30297/head:
	test_cephfs_shell: add note on how to run this testsuite
	cephfs-shell: rewrite help text for put and get commands

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2019-09-26 22:34:28 -07:00
Jeff Layton
57f91d1550 qa: have kclient tests use new mount.ceph functionality
Now that the mount helper has the ability to discover mon addrs and
can scrape secrets from the keyring, take advantage of it and simplify
the KernelMount class.

Fixes: https://tracker.ceph.com/issues/41892
Signed-off-by: Jeff Layton <jlayton@redhat.com>
2019-09-20 06:50:43 -04:00
Rishabh Dave
d165b98554 test_cephfs_shell: add note on how to run this testsuite
Inform that exporting path to cephfs-shell is needed beforehand.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2019-09-17 17:24:30 +05:30
Patrick Donnelly
81d1a162c5
Merge PR #30058 into master
* refs/pull/30058/head:
	qa/tasks: test for prevent negative subvolume size
	mgr/volumes: prevent negative subvolume size

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Ramana Raja <rraja@redhat.com>
2019-09-16 11:43:19 -07:00
Patrick Donnelly
9e59ba40c3
Merge PR #28560 into master
* refs/pull/28560/head:
	cephfs-shell: handle du's arguments elsewhere outside do_du()
	cephfs-shell: reuse code
	cephfs-shell: rewrite call to perror in do_du
	pybind/cephfs: define variable for hexcode used in stat()
	test_cephfs_shell: test cephfs-shell command at invocation
	cephfs-shell: refactor do_du()
	cephfs-shell: option -r is not for reverse
	cephfs-shell: extend to_bytes()
	test_cephfs_shell: test du with no args
	test_cephfs_shell: test du with multiple paths in args
	test_cephfs_shell: test behaviour of "du -r"
	test_cephfs_shell: test du's output for softlinks
	qa/cephfs: add convenience method lstat()
	qa/cephfs: add option to make stat() unfollow symlinks
	test_cephfs_shell: test du's output for hardlinks
	test_cephfs_shell: test du's output for directories
	test_cephfs_shell: test du's output for regular files
	test_cephfs_shell: add a method to get command output
	test_cephfs_shell: allow cmd as list too
	test_cephfs_shell: rename and rewrite _cephfs_shell()
	test_cephfs_shell: copy humanize() from cephfs-shell
	cephfs-shell: print disk usage for non-directory files too
	pybind/cephfs: add method that stats symlinks without following
	cephfs-shell: Fix 'du' command error

Reviewed-by: Varsha Rao <varao@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2019-09-13 12:39:39 -07:00
Jos Collin
9c6be95861
qa/tasks: test for prevent negative subvolume size
Fixes: https://tracker.ceph.com/issues/41617
Signed-off-by: Jos Collin <jcollin@redhat.com>
2019-09-13 16:21:38 +05:30
Rishabh Dave
f9b4d790e5 test_cephfs_shell: test cephfs-shell command at invocation
Verify that "cephfs-shell -c ceph.conf <cephfs-shell-cmd>" works as
expected.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2019-09-13 10:45:42 +05:30
Rishabh Dave
79c9d91b9a test_cephfs_shell: test du with no args
Signed-off-by: Rishabh Dave <ridave@redhat.com>
2019-09-13 10:45:39 +05:30
Rishabh Dave
54562691ee test_cephfs_shell: test du with multiple paths in args
Signed-off-by: Rishabh Dave <ridave@redhat.com>
2019-09-13 10:45:34 +05:30
Rishabh Dave
08c7e2862b test_cephfs_shell: test behaviour of "du -r"
Signed-off-by: Rishabh Dave <ridave@redhat.com>
2019-09-13 10:45:31 +05:30
Rishabh Dave
7f7aed5506 test_cephfs_shell: test du's output for softlinks
Test that CephFS shell command du prints output for softlinks as
expected

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2019-09-13 10:45:27 +05:30
Rishabh Dave
a8a159cc40 qa/cephfs: add convenience method lstat()
It's more convenient lstat(path) than stat(path, follow_symlink=False).

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2019-09-13 10:45:27 +05:30
Rishabh Dave
4a5f7a42e5 qa/cephfs: add option to make stat() unfollow symlinks
Signed-off-by: Rishabh Dave <ridave@redhat.com>
2019-09-13 10:45:14 +05:30
Rishabh Dave
877a79d8cf test_cephfs_shell: test du's output for hardlinks
Test that CephFS shell command du prints output for directories as
expected.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2019-09-13 10:45:11 +05:30
Rishabh Dave
7062dd6164 test_cephfs_shell: test du's output for directories
Test that CephFS shell command du prints output for directories as
expected.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2019-09-13 10:45:08 +05:30
Rishabh Dave
370c97678d test_cephfs_shell: test du's output for regular files
Test that CephFS shell command du prints an output for regular files
correctly.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2019-09-13 10:45:04 +05:30
Rishabh Dave
d3f895f44a test_cephfs_shell: add a method to get command output
Let run_cephfs_shell_cmd() return the object instead of output in string
format so that stderr, return value, etc. of the command executed
remain available. And add a new method that returns only output of the
CephFS shell command executed.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2019-09-13 10:44:59 +05:30
Rishabh Dave
f0723d200c test_cephfs_shell: allow cmd as list too
Convert cmd to string if it is passed as list to
run_cephfs_shell_cmd(). Allowing cmd to be list would be nice since
elsewhere, in tests, command to be executed must be a list of arguments
rather than string of arguments separated by spaces.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2019-09-13 10:44:39 +05:30
Rishabh Dave
e6f3bf8ccd test_cephfs_shell: rename and rewrite _cephfs_shell()
Rename _cephfs_shell() to run_cephfs_shell_cmd() and add a default
client for run_cephfs_shell_cmd() since most of tests in this
testsuite will need only one client.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2019-09-13 10:44:35 +05:30
Rishabh Dave
e5f30052f9 test_cephfs_shell: copy humanize() from cephfs-shell
Copy the method named humanize from cephfs-shell so that output can be
compared. Unfortunately, importing this method isn't possible since the
dash in "cephfs-shell" leads to an syntax error.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
2019-09-13 10:43:55 +05:30
Patrick Donnelly
ea026df1e3
qa: update json format from session listing
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2019-09-12 22:09:17 -07:00