]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/localpool: fix rule selection 18089/head
authorSage Weil <sage@redhat.com>
Wed, 4 Oct 2017 13:25:38 +0000 (08:25 -0500)
committerSage Weil <sage@redhat.com>
Wed, 4 Oct 2017 13:25:38 +0000 (08:25 -0500)
The 'osd pool create' arg parsing is broken; the rule name for
'ceph osd pool create $name $numpgs replicated $rulename' is passed
via the erasure_code_profile param.  Too many req=false options
without a way to disambiguate them.

Work around it by passing both 'rule' and 'erasure_code_profile'
keys, so that if/when the hack in OSDMonitor.cc is removed it will
still work.  Blech.

Signed-off-by: Sage Weil <sage@redhat.com>
src/pybind/mgr/localpool/module.py

index fac3d1c7f6c71ebd6d829897df608066a1ee5cba..0abdbfbc741ae2bd1c0d51b744a47fdd6b458cd4 100644 (file)
@@ -54,6 +54,7 @@ class Module(MgrModule):
                         "format": "json",
                         "pool": pool_name,
                         'rule': pool_name,
+                        'erasure_code_profile': pool_name,
                         "pool_type": 'replicated',
                         'pg_num': str(pg_num),
                     }), "")