pool: configureRBDStats remove postfix dot in mgr config path
The ceph rbd_stats does not take affect with dot postfix. Closes: https://github.com/rook/rook/issues/10574 Signed-off-by: shalev.p <shalev.p@taboola.com>
This commit is contained in:
1 parent
97114eaa07
commit
49996522bf
2 files changed
+4
-4
No files matched your search
@@ -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")
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user