Pass environment copy with max required mgrs when shell kwarg is True.
Fixes: https://tracker.ceph.com/issues/50077
Signed-off-by: Alfonso Martínez <almartin@redhat.com>
* refs/pull/38443/head:
qa: set "shell" to False for run_ceph_w()
vstart_runner: make "shell" a default argument
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Xiubo Li <xiubli@redhat.com>
It's not yet possible to completely remove the dependency on
mds_ids/mds_daemons in the CephFS tests but this commit reduces it
enough for most code paths to work with cephadm.
The main change here is use of CephManager.do_rados, with some
improvements.
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
Setting shell to True in call to run() in LocalCephManager.run_ceph_w()
leads to a crash when self.subproc.communicate() is executed for the
process created by running "ceph -w".
Signed-off-by: Rishabh Dave <ridave@redhat.com>
Add "shell" as a parameter for LocalRemoteProcess._do_run() and set its
default value to True. This is necessary to align the interface that
executes the commands for the teuthology and for vstart_runner.py which
reduces compatibility bugs between vstart_runner and teuthology for
tests.
Also, update the part where LocalRemote._do_run() sets shell to True
based on whether or not list contains an instance of class Raw.
Signed-off-by: Rishabh Dave <ridave@redhat.com>
Get rid of try-except block in _create_mntpt() since "mkdir -p" doesn't
raise any error when the directory to be created already exists. Also,
use chmod command instead of mkdir command to set the permission mode on
directory since mkdir command would have no effect on the directory's
permission mode if the directory already exists.
Signed-off-by: Rishabh Dave <ridave@redhat.com>
Accepting "cwd" as a parameter in _create_mntpt() methods was a mistake
that happened commit 5e71e9b065.
Signed-off-by: Rishabh Dave <ridave@redhat.com>
Modify CephManager.run_cluster_cmd() to accept command arguments as
string as well since typing commands as strings is much lesser effort
than typing as list. This brings the interface a step closer to
teuthology.orchestra.remote.run()'s interface since it too can accept
commands arguments as string.
The change in cephfs_test_case.py is just to allow testing this PR
locally and on teuthology.
Signed-off-by: Rishabh Dave <ridave@redhat.com>
* refs/pull/39780/head:
qa/vstart_runner: dont log "not Ceph bin" msg too often
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Xiubo Li <xiubli@redhat.com>
The message is logged everytime a binary not from Ceph repo's build
directory is executed, which it too often.
Signed-off-by: Rishabh Dave <ridave@redhat.com>
In methods raw_cluster_cmd_result() of CephManager and LocalCephManager
and raw_cluster_cmd of LocalCephManager when keyword arguments are
passed instead of positional arguments, the methods run ceph command
with no arguments. This is because the methods do
"kwargs['args'] = args" unconditionally.
Fixes: https://tracker.ceph.com/issues/49486
Signed-off-by: Rishabh Dave <ridave@redhat.com>
The default was changed to INFO recently but there was no way to restore
visibility of DEBUG messages.
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
Unless the option to rotate logs is set, don't delete the final result
line printed by unittest.
Fixes: https://tracker.ceph.com/issues/48447
Signed-off-by: Rishabh Dave <ridave@redhat.com>
If the -l option is specified in :
$ MDS=3 MON=3 MGR=1 OSD=3 ../src/vstart.sh -n -l
The ceph cluster will use the localhost IP address as the mon host,
and then in the network namespace container the ceph-fuse daemon
couldn't connect to it.
Fixes: https://tracker.ceph.com/issues/45342
Signed-off-by: Xiubo Li <xiubli@redhat.com>
* refs/pull/37629/head:
qa/cephfs: add session_timeout option support
qa/cephfs: move the cephfs's opertions setting to create()
qa/cephfs: add 'cephfs:' section support
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
When the mds revoking the Fwbl caps, the clients need to flush
the dirty data back to the OSDs, but the flush may make the OSDs
to be overloaded and slow, which may take more than 60 seconds to
finish. Then the MDS daemons will report the WRN messages.
For the teuthology test cases, let's just increase the timeout
value to make it work.
Fixes: https://tracker.ceph.com/issues/47565
Signed-off-by: Xiubo Li <xiubli@redhat.com>
vstart_runner omits the result line ("Ran X tests in Y") generated by
unittest unconditionally. Don't do so when vstart_runner triggers entire
test module at once.
Signed-off-by: Rishabh Dave <ridave@redhat.com>
Add an option that makes it possible to not to quit running testsuite on
a test failure. This way user can get a better idea on the current state
of the testsuite and test its own code patches more effectively and
easily.
Signed-off-by: Rishabh Dave <ridave@redhat.com>
Rearrange the code that triggers the test runner so that in the later
commits the way tests are triggered can be changed.
Signed-off-by: Rishabh Dave <ridave@redhat.com>
... methods in LocalRemote class. These methods are called in some of
the recently added cephfs tests. They were implemented in teuthology's
Remote class, but not in vstart_runner's LocalRemote class. Hence some
cephfs tests couldn't be run locally using vstart_runner without this
change.
Signed-off-by: Ramana Raja <rraja@redhat.com>
Add testsuite for testing authorization on Ceph cluster with multiple
file systems and enable it to be executable with Teuthology framework.
Also add helper methods required to setup the test environment for
multi-FS tests.
Signed-off-by: Rishabh Dave <ridave@redhat.com>
Modify filesystem.Filesystem.delete_all_filesystems() method to make it
more succinct, move it to class MDSCluster instead and update every call
to it accordingly.
Signed-off-by: Rishabh Dave <ridave@redhat.com>
This commit adds a new argument check_status to mount methods of
KernelMount, FuseMount, LocalKernelMount and LocalFuseMount. When value
of this argument is False, these methods would catch the
CommandFailedError exception and would return a tuple consisting of the
exception itself, and stdout and stderr of the mount command. This
allows reusing these mount methods while running negative tests for
commands.
The name "check_status" is selected so since teuthology's run() and
vstart_runner's run() use a variable with same name for the very same
purpose.
Signed-off-by: Rishabh Dave <ridave@redhat.com>
This commit introduces following two set of changes -
First, make client keyring path, mountpoint on host FS and CephFS and
CephFS's name attributes of the object representing the mount
and update all the mount object creation calls accordingly. Also,
rewrite all the mount object creation to use keyword arguments instead
of positional arguments to avoid mistakes, especially since a new
argument was added in this commit.
Second, add remount method to mount.py so that it's possible to unmount
safely, modify the attributes of the object representing the mount and
mount again based on new state of the object *in a single call*. The
method is placed in mount.py to avoid duplication.
This change has two leads to two more changes: upgrading interface of
mount() and mount_wait() and upgrading testsuites to adapt to these
change.
Signed-off-by: Rishabh Dave <ridave@redhat.com>
Currently commands are printed as ['arg1', 'arg2', 'arg3']. Instead, log
them as '> arg1 arg2 arg3' so that it's simpler to copy and run them
manually. The reason behind prepending '> ' to these logs entries is
just to follow the practice followed by teuthology logs.
Signed-off-by: Rishabh Dave <ridave@redhat.com>
This new method should allow better control on the process launched by
the passed command. This is achieved by allowing arguments provided by
teuthology.orchestra.run.run().
Signed-off-by: Rishabh Dave <ridave@redhat.com>