]> git.proxmox.com Git - ceph.git/blobdiff - ceph/qa/tasks/manypools.py
import 15.2.0 Octopus source
[ceph.git] / ceph / qa / tasks / manypools.py
index d8577c03ff6d6dc50515abc4cc8d788681767201..7fe7e43e1b8335bbc12b84e221d0896ecaeae201 100644 (file)
@@ -39,35 +39,35 @@ def task(ctx, config):
     log.info('got client_roles={client_roles_}'.format(client_roles_=client_roles))
     for role in client_roles:
         log.info('role={role_}'.format(role_=role))
-        (creator_remote, ) = ctx.cluster.only('client.{id}'.format(id=role)).remotes.iterkeys()
+        (creator_remote, ) = ctx.cluster.only('client.{id}'.format(id=role)).remotes.keys()
         creator_remotes.append((creator_remote, 'client.{id}'.format(id=role)))
 
     remaining_pools = poolnum
     poolprocs=dict()
     while (remaining_pools > 0):
         log.info('{n} pools remaining to create'.format(n=remaining_pools))
-       for remote, role_ in creator_remotes:
+        for remote, role_ in creator_remotes:
             poolnum = remaining_pools
             remaining_pools -= 1
             if remaining_pools < 0:
                 continue
             log.info('creating pool{num} on {role}'.format(num=poolnum, role=role_))
-           proc = remote.run(
-               args=[
-                   'ceph',
-                   '--name', role_,
-                   'osd', 'pool', 'create', 'pool{num}'.format(num=poolnum), '8',
-                   run.Raw('&&'),
-                   'rados',
-                   '--name', role_,
-                   '--pool', 'pool{num}'.format(num=poolnum),
-                   'bench', '0', 'write', '-t', '16', '--block-size', '1'
-                   ],
-               wait = False
-           )
+            proc = remote.run(
+                args=[
+                    'ceph',
+                    '--name', role_,
+                    'osd', 'pool', 'create', 'pool{num}'.format(num=poolnum), '8',
+                    run.Raw('&&'),
+                    'rados',
+                    '--name', role_,
+                    '--pool', 'pool{num}'.format(num=poolnum),
+                    'bench', '0', 'write', '-t', '16', '--block-size', '1'
+                ],
+                wait = False
+            )
             log.info('waiting for pool and object creates')
-           poolprocs[remote] = proc
-        
-        run.wait(poolprocs.itervalues())
-    
+            poolprocs[remote] = proc
+
+        run.wait(poolprocs.values())
+
     log.info('created all {n} pools and wrote 16 objects to each'.format(n=poolnum))