]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/cephfs: add code for when config is None in __init__ 37982/head
authorRishabh Dave <ridave@redhat.com>
Mon, 9 Nov 2020 06:22:11 +0000 (11:52 +0530)
committerRishabh Dave <ridave@redhat.com>
Tue, 10 Nov 2020 10:17:24 +0000 (15:47 +0530)
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>
qa/tasks/cephfs/kernel_mount.py

index eb7b32e82795d77391e466dfe23d3b69ad0881cd..7259082ac9f2ddff6ba88553fadb008f444e704b 100644 (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,