]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
fix create_pool_with_unique_name call to use profile name 281/head
authorLoic Dachary <loic@dachary.org>
Wed, 2 Jul 2014 17:51:00 +0000 (19:51 +0200)
committerLoic Dachary <loic@dachary.org>
Wed, 2 Jul 2014 17:51:00 +0000 (19:51 +0200)
The hardcoded arguments are deprecated for the profile name. Create a
profile that matches the previous default arguments. Read the config to
allow the caller to override the defaults from the yaml file.

Signed-off-by: Loic Dachary <loic@dachary.org>
teuthology/task/ec_lost_unfound.py

index 25bac6cbecb479016631fd407398d8fa4ad4190b..6c155abd10c10ad6ff67d7ccf882c73ec05e37b2 100644 (file)
@@ -33,11 +33,14 @@ def task(ctx, config):
     manager.raw_cluster_cmd('tell', 'osd.3', 'flush_pg_stats')
     manager.wait_for_clean()
 
-
-    pool = manager.create_pool_with_unique_name(
-        ec_pool=True,
-        ec_m=2,
-        ec_k=2)
+    profile = config.get('erasure_code_profile', {
+        'k': '2',
+        'm': '2',
+        'ruleset-failure-domain': 'osd'
+    })
+    profile_name = profile.get('name', 'lost_unfound')
+    manager.create_erasure_code_profile(profile_name, profile)
+    pool = manager.create_pool_with_unique_name(erasure_code_profile_name=profile_name)
 
     # something that is always there
     dummyfile = '/etc/fstab'