* 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>
* 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>
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>
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>
* 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>
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>
* 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>
|/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>
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>
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>
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>
* 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>
* refs/pull/34716/head:
mgr/volumes: Add snapshot info command
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Jos Collin <jcollin@redhat.com>
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>
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>
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>
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>
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>
* 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>