From: Rishabh Dave Date: Mon, 9 Nov 2020 06:22:11 +0000 (+0530) Subject: qa/cephfs: add code for when config is None in __init__ X-Git-Tag: v16.1.0~594^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ce32cf4f815a460ddd38f8d6e5e493d9263f22bc;p=ceph.git 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 --- 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,