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:
1 file changed
+5
-5
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user