* 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>
* 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>
* 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>
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>
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>
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>
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>
* 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>
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>
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>
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>
* 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>
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>
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>
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>
* 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>
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>
* 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>
* 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>
* 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>
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>
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>
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>
* 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>
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>
* 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>
... 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>
* 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>
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>
* 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>
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>
* 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>
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>
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>
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>
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>