From b948406a07c9f0c91ae38b1c961065b0d2c0e8ec Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Wed, 1 May 2013 13:14:35 -0700 Subject: [PATCH] ceph.py: set up ctx.disk_config outside of the loop Signed-off-by: Samuel Just --- teuthology/task/ceph.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/teuthology/task/ceph.py b/teuthology/task/ceph.py index 1669bc9f95..1123cc13e0 100644 --- a/teuthology/task/ceph.py +++ b/teuthology/task/ceph.py @@ -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'): -- 2.39.5