1
0
mirror of https://github.com/ceph/ceph synced 2025-04-01 23:02:17 +00:00

qa/cephfs: add code for when config is None in __init__

When tests are launched with kernel client using vstart_runner.py,
config is None and, therefore, the call "config.get()" leads to a crash.
Assigning self.rbytes None is important since leaving it undefined will
to lead a crash since the code executed later assumes that self.rbytes
is defined.

Fixes: https://tracker.ceph.com/issues/48147
Signed-off-by: Rishabh Dave <ridave@redhat.com>
This commit is contained in:
Rishabh Dave 2020-11-09 11:52:11 +05:30
parent d85e4dca6b
commit ce32cf4f81

View File

@ -19,7 +19,7 @@ UMOUNT_TIMEOUT = 300
class KernelMount(CephFSMount):
def __init__(self, ctx, test_dir, client_id, client_remote,
client_keyring_path=None, hostfs_mntpt=None,
cephfs_name=None, cephfs_mntpt=None, brxnet=None, config=None):
cephfs_name=None, cephfs_mntpt=None, brxnet=None, config={}):
super(KernelMount, self).__init__(ctx=ctx, test_dir=test_dir,
client_id=client_id, client_remote=client_remote,
client_keyring_path=client_keyring_path, hostfs_mntpt=hostfs_mntpt,