]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
Fix backward compat with old cephfs_pools format
authorGiulio Fidente <gfidente@redhat.com>
Fri, 19 Jul 2019 08:58:49 +0000 (10:58 +0200)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Fri, 19 Jul 2019 17:50:57 +0000 (17:50 +0000)
Previously cephfs_pools items used to have a pgs: key but not
pgp_num: nor pg_num:

Signed-off-by: Giulio Fidente <gfidente@redhat.com>
(cherry picked from commit edd1420217d96d87ce84700317b50256648e1fa3)

roles/ceph-mds/tasks/create_mds_filesystems.yml

index a45c2b6d832416609973e36e1c08534976b3c1d2..cda1f508c678eeb00d969891af2c9753c63b8ef7 100644 (file)
@@ -26,7 +26,7 @@
             {{ hostvars[groups[mon_group_name][0]]['container_exec_cmd'] | default('') }} ceph --cluster {{ cluster }}
             osd pool create {{ item.name }}
             {{ item.pg_num | default(osd_pool_default_pg_num) }}
-            {{ item.pgp_num | default(item.pg_num) }}
+            {{ item.pgp_num | default(item.pg_num) | default(osd_pool_default_pg_num) }}
             {{ 'replicated_rule' if not item.rule_name | default('replicated_rule') else item.rule_name | default('replicated_rule') }}
             {{ 1 if item.type|default(1) == 'replicated' else 3 if item.type|default(1) == 'erasure' else item.type|default(1) }}
             {%- if (item.type | default("1") == '3' or item.type | default("1") == 'erasure') and item.erasure_profile != '' %}