From ce32cf4f815a460ddd38f8d6e5e493d9263f22bc Mon Sep 17 00:00:00 2001 From: Rishabh Dave Date: Mon, 9 Nov 2020 11:52:11 +0530 Subject: [PATCH] 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 --- qa/tasks/cephfs/kernel_mount.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qa/tasks/cephfs/kernel_mount.py b/qa/tasks/cephfs/kernel_mount.py index eb7b32e82795..7259082ac9f2 100644 --- a/qa/tasks/cephfs/kernel_mount.py +++ b/qa/tasks/cephfs/kernel_mount.py @@ -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, -- 2.47.3