]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/tasks: Initialize 'monitoring_profiles' spec to an empty dict 58401/head
authorSridhar Seshasayee <sseshasa@redhat.com>
Tue, 2 Jul 2024 07:45:56 +0000 (13:15 +0530)
committerSridhar Seshasayee <sseshasa@redhat.com>
Wed, 24 Jul 2024 12:03:53 +0000 (17:33 +0530)
Initialize 'monitoring_profiles' to an empty python dictionary instead of
'None' to prevent the cbt task from failing due to the TypeError exception
when attempting to iterate a 'NoneType'.

The bug was introduced as part of https://github.com/ceph/ceph/pull/51438
and commit e174c6e2cf6c90bd130320eb1f251b62d4b4d6c2.

Signed-off-by: Sridhar Seshasayee <sseshasa@redhat.com>
Fixes: https://tracker.ceph.com/issues/66799
(cherry picked from commit 9265bdb1da39637adb1f207ffc2292a7e7b1260b)

qa/tasks/cbt.py

index 90fcdb5c60d0ae079de67fa0f74686a5a9f116cb..84e096520b40f373cc6c88d62fb993ca55622d43 100644 (file)
@@ -64,7 +64,7 @@ class CBT(Task):
                    (remote.ssh.get_transport().getpeername() for (remote, role_list) in remotes_and_roles)]
             benchmark_config['cosbench']['auth'] = "username=cosbench:operator;password=intel2012;url=http://%s:80/auth/v1.0;retry=9" %(ips[0])
         client_endpoints_config = self.config.get('client_endpoints', None)
-        monitoring_profiles = self.config.get('monitoring_profiles', None)
+        monitoring_profiles = self.config.get('monitoring_profiles', {})
 
         return dict(
             cluster=cluster_config,