Pass ceph::pool arguments when calling class
authorGiulio Fidente <gfidente@redhat.com>
Wed, 11 Nov 2015 10:51:23 +0000 (11:51 +0100)
committerGiulio Fidente <gfidente@redhat.com>
Fri, 13 Nov 2015 18:20:21 +0000 (19:20 +0100)
Pass the ceph::pool properties as arguments to the class call
instead of setting them as class defaults.

Ceph recommends max 32 PGs and min 4 PGs per OSD so this change
also lowers the defaults to 32 which works with 1 OSD, suits well
a scenario with 3 OSDs and is easy to customize in the static
hiera if more than 8 OSDs are deployed.

More info at: https://bugzilla.redhat.com/show_bug.cgi?id=1252546

Change-Id: Ifed11d1857900b2251dfdf69d6b6f168150e6330

puppet/hieradata/ceph.yaml
puppet/manifests/overcloud_controller.pp
puppet/manifests/overcloud_controller_pacemaker.pp

index ca6d395..1e480e6 100644 (file)
@@ -1,6 +1,6 @@
 ceph::profile::params::osd_journal_size: 1024
-ceph::profile::params::osd_pool_default_pg_num: 128
-ceph::profile::params::osd_pool_default_pgp_num: 128
+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
 ceph::profile::params::osd_pool_default_min_size: 1
 ceph::profile::params::osds: {/srv/data: {}}
index f1c24f0..41836a1 100644 (file)
@@ -307,15 +307,13 @@ if hiera('step') >= 3 {
 
   if $enable_ceph {
 
-    Ceph_pool {
+    $ceph_pools = hiera('ceph_pools')
+    ceph::pool { $ceph_pools :
       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'),
     }
 
-    $ceph_pools = hiera('ceph_pools')
-    ceph::pool { $ceph_pools : }
-
     $cinder_pool_requires = [Ceph::Pool[hiera('cinder_rbd_pool_name')]]
 
   } else {
index 4f0dd72..e3fc85b 100644 (file)
@@ -683,15 +683,13 @@ if hiera('step') >= 3 {
 
   if $enable_ceph {
 
-    Ceph_pool {
+    $ceph_pools = hiera('ceph_pools')
+    ceph::pool { $ceph_pools :
       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'),
     }
 
-    $ceph_pools = hiera('ceph_pools')
-    ceph::pool { $ceph_pools : }
-
     $cinder_pool_requires = [Ceph::Pool[hiera('cinder_rbd_pool_name')]]
 
   } else {