diff --git a/pkg/operator/ceph/pool/controller.go b/pkg/operator/ceph/pool/controller.go index 432f52143..e514aa0cc 100644 --- a/pkg/operator/ceph/pool/controller.go +++ b/pkg/operator/ceph/pool/controller.go @@ -434,9 +434,9 @@ func configureRBDStats(clusterContext *clusterd.Context, clusterInfo *cephclient logger.Debugf("RBD per-image IO statistics will be collected for pools: %v", enableStatsForPools) monStore := config.GetMonStore(clusterContext, clusterInfo) if len(enableStatsForPools) == 0 { - err = monStore.Delete("mgr.", "mgr/prometheus/rbd_stats_pools") + err = monStore.Delete("mgr", "mgr/prometheus/rbd_stats_pools") } else { - err = monStore.Set("mgr.", "mgr/prometheus/rbd_stats_pools", strings.Join(enableStatsForPools, ",")) + err = monStore.Set("mgr", "mgr/prometheus/rbd_stats_pools", strings.Join(enableStatsForPools, ",")) } if err != nil { return errors.Wrapf(err, "failed to enable rbd_stats_pools") diff --git a/pkg/operator/ceph/pool/controller_test.go b/pkg/operator/ceph/pool/controller_test.go index 5e7930aa2..c81fbe16c 100644 --- a/pkg/operator/ceph/pool/controller_test.go +++ b/pkg/operator/ceph/pool/controller_test.go @@ -347,7 +347,7 @@ func TestCephBlockPoolController(t *testing.T) { if args[0] == "status" { return `{"fsid":"c47cac40-9bee-4d52-823b-ccd803ba5bfe","health":{"checks":{},"status":"HEALTH_OK"},"pgmap":{"num_pgs":100,"pgs_by_state":[{"state_name":"active+clean","count":100}]}}`, nil } - if args[0] == "config" && args[2] == "mgr." && args[3] == "mgr/prometheus/rbd_stats_pools" { + if args[0] == "config" && args[2] == "mgr" && args[3] == "mgr/prometheus/rbd_stats_pools" { return "", nil } @@ -559,7 +559,7 @@ func TestConfigureRBDStats(t *testing.T) { executor := &exectest.MockExecutor{ MockExecuteCommandWithTimeout: func(timeout time.Duration, command string, args ...string) (string, error) { logger.Infof("Command: %s %v", command, args) - if args[0] == "config" && args[2] == "mgr." && args[3] == "mgr/prometheus/rbd_stats_pools" { + if args[0] == "config" && args[2] == "mgr" && args[3] == "mgr/prometheus/rbd_stats_pools" { if args[1] == "set" && args[4] != "" { return "", nil }