From 5f1b44366247466fd01728166da67fff087ab90e Mon Sep 17 00:00:00 2001 From: Jiffin Tony Thottan Date: Tue, 20 Sep 2022 15:48:02 +0530 Subject: [PATCH] rgw: remove rgw_rados_pool_pg_num_min for metadata pool creation rgw_rados_pool_pg_num_min is deprecated and no longer valid in qunicy with https://github.com/ceph/ceph/pull/46234, remove that option from cephobject-controller as well Signed-off-by: Jiffin Tony Thottan --- pkg/operator/ceph/object/objectstore.go | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/pkg/operator/ceph/object/objectstore.go b/pkg/operator/ceph/object/objectstore.go index 9b8798a54..b0d32bf13 100644 --- a/pkg/operator/ceph/object/objectstore.go +++ b/pkg/operator/ceph/object/objectstore.go @@ -31,6 +31,7 @@ import ( "github.com/rook/rook/pkg/clusterd" cephclient "github.com/rook/rook/pkg/daemon/ceph/client" "github.com/rook/rook/pkg/operator/ceph/config" + cephver "github.com/rook/rook/pkg/operator/ceph/version" "github.com/rook/rook/pkg/operator/k8sutil" "github.com/rook/rook/pkg/util" "github.com/rook/rook/pkg/util/exec" @@ -51,6 +52,7 @@ const ( AccessKeyName = "access-key" SecretKeyName = "secret-key" svcDNSSuffix = "svc" + rgwRadosPoolPgNum = "8" ) var ( @@ -66,7 +68,8 @@ var ( dataPoolName = "rgw.buckets.data" // An user with system privileges for dashboard service - DashboardUser = "dashboard-admin" + DashboardUser = "dashboard-admin" + cephVersionRGWRadosPoolPgNumRemoved = cephver.CephVersion{Major: 17, Minor: 2, Extra: 2} ) type idType struct { @@ -736,7 +739,13 @@ func CreatePools(context *Context, clusterSpec *cephv1.ClusterSpec, metadataPool } // get the default PG count for rgw metadata pools - metadataPoolPGs, err := config.GetMonStore(context.Context, context.clusterInfo).Get("mon.", "rgw_rados_pool_pg_num_min") + var err error + var metadataPoolPGs string + if context.clusterInfo.CephVersion.IsAtLeast(cephVersionRGWRadosPoolPgNumRemoved) { + metadataPoolPGs = rgwRadosPoolPgNum + } else { + metadataPoolPGs, err = config.GetMonStore(context.Context, context.clusterInfo).Get("mon.", "rgw_rados_pool_pg_num_min") + } if err != nil { logger.Warningf("failed to adjust the PG count for rgw metadata pools. using the general default. %v", err) metadataPoolPGs = cephclient.DefaultPGCount