From: Sage Weil Date: Fri, 21 Mar 2014 15:36:24 +0000 (-0700) Subject: rgw: handle empty conf case X-Git-Tag: 1.1.0~1580^2^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4e2f36fcd8a08b451c7813349b36fbcd4224b18f;p=teuthology.git rgw: handle empty conf case 2014-03-20T23:30:28.964 ERROR:teuthology.contextutil:Saw exception from nested tasks Traceback (most recent call last): File "/home/teuthworker/teuthology-firefly/teuthology/contextutil.py", line 27, in nested vars.append(enter()) File "/usr/lib/python2.7/contextlib.py", line 17, in __enter__ return self.gen.next() File "/home/teuthworker/teuthology-firefly/teuthology/task/rgw.py", line 83, in ship_config idle_timeout = conf.get('idle_timeout', 30) AttributeError: 'NoneType' object has no attribute 'get' This happens with job yamls like: - rgw: - client.0 (where it is a list and not a dict of clients) Signed-off-by: Sage Weil --- diff --git a/teuthology/task/rgw.py b/teuthology/task/rgw.py index 6076beaf1..12700f60a 100644 --- a/teuthology/task/rgw.py +++ b/teuthology/task/rgw.py @@ -80,6 +80,8 @@ def ship_config(ctx, config, role_endpoints): for client, conf in config.iteritems(): (remote,) = ctx.cluster.only(client).remotes.keys() system_type = teuthology.get_system_type(remote) + if not conf: + conf = {} idle_timeout = conf.get('idle_timeout', 30) if system_type == 'deb': mod_path = '/usr/lib/apache2/modules'