* 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>
* refs/pull/29760/head:
mgr/volumes: cleanup FS subvolume or subvolume group path
mgr/volumes: give useful error message
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
... on best effort basis when FS subvolume or subvolumegroup create
command fails.
Fixes: https://tracker.ceph.com/issues/41371
Signed-off-by: Ramana Raja <rraja@redhat.com>
... when creating FS subvolume or subvolume group with invalid
data pool layout.
Fixes: https://tracker.ceph.com/issues/41337
Signed-off-by: Ramana Raja <rraja@redhat.com>
* refs/pull/29104/head:
qa/cephfs: test case for timeout config of individual session
mds: add command that config individual client session
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
... to allow creating subvolumes/subvolume groups within a filesystem.
Fixes: http://tracker.ceph.com/issues/40927
Signed-off-by: Ramana Raja <rraja@redhat.com>
After sending the reboot command, we need to wait briefly for it to be
rebooted so that the kernel client doesn't voluntarily give up its Fb
cap.
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
* refs/pull/28793/head:
qa/cephfs: make run_shell() accept args as str too
qa/vstart_runner.py: ignores when source and destination are same
test_cephfs_shell: add a test for cd with arguments
test_cephfs_shell: add a test for cd with no arguments
test_cephfs_shell: group test methods
test_cephfs_shell: add a new method to return script output
test_cephfs_shell: allow running CephFS shell script
cephfs-shell: cd with no args shouldn't print an error message
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Add a method to test that the cd command changes the current working
directory to the path passed as an argument to it.
Signed-off-by: Rishabh Dave <ridave@redhat.com>
Add a method to test that the cd command changes the current working
directory to root when no argument is passed.
Signed-off-by: Rishabh Dave <ridave@redhat.com>
Move tests into different classes created on the basis of a shell
functionality within the testsuite. This arrangement allows running
tests related to only one functionality at a time.
Signed-off-by: Rishabh Dave <ridave@redhat.com>
Add a new method that runs the given CephFS shell script on the given
mount and returns the output with whitespace removed.
Signed-off-by: Rishabh Dave <ridave@redhat.com>
Add a method to test_cephfs_shell.py that allows running CephFS shell
script using option "-b" of cephfs-shell.
Signed-off-by: Rishabh Dave <ridave@redhat.com>
* refs/pull/22645/head:
qa/tests: test if unresponsive MDS client with no caps is evicted directly
qa/tests: add a method to signal a MDS client
qa/cephfs: memoize FUSE client pid
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Test if an unresponsive MDS client session holding no caps is evicted
directly at session_autoclose without being marked as stale at
session_timeout.
Signed-off-by: Rishabh Dave <ridave@redhat.com>
Instead of defining a method to write files within the testsuite, use
sudo_write_file() from teuthology.misc.
Signed-off-by: Rishabh Dave <ridave@redhat.com>
* refs/pull/28692/head:
test_volume_client: add positive test for ceph_volume_client method
test_volume_client: rename test_put_object_versioned()
test_volume_client: rewrite test_put_object_versioned
test_volume_client: use sudo_write_file() form teuthology
test_volume_client: make test_object_versioned py3 compatible
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>