From: Sam Lang Date: Tue, 5 Feb 2013 16:38:48 +0000 (-0600) Subject: task/ceph_manager: Fix NoneType config issue X-Git-Tag: 1.1.0~2323^2~10 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=da10b58d653875bfc4501aa924853c2e4e7bc07b;p=teuthology.git task/ceph_manager: Fix NoneType config issue kill_mon is getting a config set to None, which blows up now due to the check for powercycle. Initialize the config to an empty dict if we don't get anything on init. This is the error showing up in teuthology: 2013-02-04T15:04:16.595 ERROR:teuthology.run_tasks:Manager failed: Traceback (most recent call last): File "/var/lib/teuthworker/teuthology-master/teuthology/run_tasks.py", line 45, in run_tasks suppress = manager.__exit__(*exc_info) File "/usr/lib/python2.7/contextlib.py", line 24, in __exit__ self.gen.next() File "/var/lib/teuthworker/teuthology-master/teuthology/task/mon_thrash.py", line 142, in task thrash_proc.do_join() File "/var/lib/teuthworker/teuthology-master/teuthology/task/mon_thrash.py", line 69, in do_join self.thread.get() File "/var/lib/teuthworker/teuthology-master/virtualenv/local/lib/python2.7/site-packages/gevent/greenlet.py", line 308, in get raise self._exception AttributeError: 'NoneType' object has no attribute 'get' Signed-off-by: Sam Lang --- diff --git a/teuthology/task/ceph_manager.py b/teuthology/task/ceph_manager.py index 1c4a1a77c2..d9008004f6 100644 --- a/teuthology/task/ceph_manager.py +++ b/teuthology/task/ceph_manager.py @@ -224,6 +224,8 @@ class CephManager: def tmp(x): print x self.log = tmp + if self.config is None: + self.config = dict() self.pools = {} self.pools['data'] = self.get_pool_property('data', 'pg_num')