ceph: set pg_num_min on new rgw metadata pools

pg_num_min needs to be set on all new and existing rgw
metadata pools so the autoscaler won't immediately
increase the pg count. The pg_num_min was only being set
on existing pools and not on new pools.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
This commit is contained in:
Travis Nielsen committed 2020-05-15 16:22:38 -06:00
1 parent 35885a83d0
commit 6d130864f3
1 file changed
+5 -5
+5 -5
View File
@@ -315,11 +315,11 @@ func createSimilarPools(context *Context, pools []string, poolSpec cephv1.PoolSp
}
}
}
if pgCount != ceph.DefaultPGCount {
err = ceph.SetPoolProperty(context.Context, context.ClusterName, name, "pg_num_min", pgCount)
if err != nil {
return errors.Wrapf(err, "failed to set pg_num_min on pool %q to %q", name, pgCount)
}
}
// Set the pg_num_min if not the default so the autoscaler won't immediately increase the pg count
if pgCount != ceph.DefaultPGCount {
if err := ceph.SetPoolProperty(context.Context, context.ClusterName, name, "pg_num_min", pgCount); err != nil {
return errors.Wrapf(err, "failed to set pg_num_min on pool %q to %q", name, pgCount)
}
}
}