]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
task/ceph_manager: Fix NoneType config issue
authorSam Lang <sam.lang@inktank.com>
Tue, 5 Feb 2013 16:38:48 +0000 (10:38 -0600)
committerSam Lang <sam.lang@inktank.com>
Tue, 5 Feb 2013 16:38:48 +0000 (10:38 -0600)
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: <contextlib.GeneratorContextManager object at 0x1fcafd0>
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 <sam.lang@inktank.com>
teuthology/task/ceph_manager.py

index 1c4a1a77c2602b99916bde06f5a9d2fe383da539..d9008004f6c31f1e42eebb8551075cbd42529513 100644 (file)
@@ -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')