]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
rgw: handle empty conf case 231/head
authorSage Weil <sage@inktank.com>
Fri, 21 Mar 2014 15:36:24 +0000 (08:36 -0700)
committerSage Weil <sage@inktank.com>
Fri, 21 Mar 2014 15:36:24 +0000 (08:36 -0700)
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 <sage@inktank.com>
teuthology/task/rgw.py

index 6076beaf1f19d5124f78ed93acdfd6417226a5b5..12700f60a2a71e7271640a97c3ddbe17adf384e5 100644 (file)
@@ -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'