From 4e2f36fcd8a08b451c7813349b36fbcd4224b18f Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 21 Mar 2014 08:36:24 -0700 Subject: [PATCH] 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 --- teuthology/task/rgw.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/teuthology/task/rgw.py b/teuthology/task/rgw.py index 6076beaf1f..12700f60a2 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' -- 2.39.5