Use osd_pool_default_* puppet parameters when creating the pools
authorGiulio Fidente <gfidente@redhat.com>
Wed, 14 Sep 2016 16:15:55 +0000 (18:15 +0200)
committerGiulio Fidente <gfidente@redhat.com>
Mon, 19 Sep 2016 09:52:14 +0000 (11:52 +0200)
While it is possible to override the pg_num, pgp_num and size for
each pool, the defaults are hardcoded. This patch uses as default
the values given via ceph::profile::params::osd_pool_default_*
parameters, if any.

Closes-Bug: 1623590
Change-Id: Iecde772e7f72fd9abedb54cff4b8f2605df8fedd

puppet/services/ceph-mon.yaml

index a2b3f13..552086a 100644 (file)
@@ -76,6 +76,9 @@ outputs:
           - get_attr: [CephBase, role_data, config_settings]
           - ceph::profile::params::ms_bind_ipv6: {get_param: CephIPv6}
             ceph::profile::params::mon_key: {get_param: CephMonKey}
+            ceph::profile::params::osd_pool_default_pg_num: 32
+            ceph::profile::params::osd_pool_default_pgp_num: 32
+            ceph::profile::params::osd_pool_default_size: 3
             # repeat returns items in a list, so we need to map_merge twice
             tripleo::profile::base::ceph::mon::ceph_pools:
               map_merge:
@@ -90,9 +93,9 @@ outputs:
                           - {get_param: GnocchiRbdPoolName}
                       template:
                         <%pool%>:
-                          pg_num: 32
-                          pgp_num: 32
-                          size: 3
+                          pg_num: "%{hiera('ceph::profile::params::osd_pool_default_pg_num')}"
+                          pgp_num: "%{hiera('ceph::profile::params::osd_pool_default_pgp_num')}"
+                          size: "%{hiera('ceph::profile::params::osd_pool_default_size')}"
                 - {get_param: CephPools}
             tripleo.ceph_mon.firewall_rules:
               '110 ceph_mon':