]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph.py: set up ctx.disk_config outside of the loop
authorSamuel Just <sam.just@inktank.com>
Wed, 1 May 2013 20:14:35 +0000 (13:14 -0700)
committerSamuel Just <sam.just@inktank.com>
Wed, 1 May 2013 20:14:35 +0000 (13:14 -0700)
Signed-off-by: Samuel Just <sam.just@inktank.com>
teuthology/task/ceph.py

index 1669bc9f95b918903c4f744c51138ff3c7ac565e..1123cc13e0763a6ffe7b6257496b0660b8e3ba9d 100644 (file)
@@ -501,14 +501,17 @@ def cluster(ctx, config):
 
     cclient.create_keyring(ctx)
     log.info('Running mkfs on osd nodes...')
+
+    ctx.disk_config = argparse.Namespace()
+    ctx.disk_config.remote_to_roles_to_dev = remote_to_roles_to_devs
+    ctx.disk_config.remote_to_roles_to_journals = remote_to_roles_to_journals
+    ctx.disk_config.remote_to_roles_to_dev_mount_options = {}
+    ctx.disk_config.remote_to_roles_to_dev_fstype = {}
+
+    log.info("ctx.disk_config.remote_to_roles_to_dev: {r}".format(r=str(ctx.disk_config.remote_to_roles_to_dev)))
     for remote, roles_for_host in osds.remotes.iteritems():
         roles_to_devs = remote_to_roles_to_devs[remote]
         roles_to_journals = remote_to_roles_to_journals[remote]
-        ctx.disk_config = argparse.Namespace()
-        ctx.disk_config.remote_to_roles_to_dev = remote_to_roles_to_devs
-        ctx.disk_config.remote_to_roles_to_journals = remote_to_roles_to_journals
-        ctx.disk_config.remote_to_roles_to_dev_mount_options = {}
-        ctx.disk_config.remote_to_roles_to_dev_fstype = {}
 
 
         for id_ in teuthology.roles_of_type(roles_for_host, 'osd'):