Skip to content

Commit

Permalink
Merge pull request #2708 from sp98/change-balancer-mode
Browse files Browse the repository at this point in the history
use "upmap-read" as default balancer mode
  • Loading branch information
openshift-merge-bot[bot] authored Jul 22, 2024
2 parents 27b0ae9 + c0ff078 commit 92a5407
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion controllers/storagecluster/cephcluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ const (
clusterNetworkSelectorKey = "cluster"
// DisasterRecoveryTargetAnnotation signifies that the cluster is intended to be used for Disaster Recovery
DisasterRecoveryTargetAnnotation = "ocs.openshift.io/clusterIsDisasterRecoveryTarget"
upmapReadBalancerMode = "upmap-read"
)

const (
Expand Down Expand Up @@ -1101,7 +1102,7 @@ func generateMgrSpec(sc *ocsv1.StorageCluster) rookCephv1.MgrSpec {
AllowMultiplePerNode: statusutil.IsSingleNodeDeployment(),
Modules: []rookCephv1.Module{
{Name: "pg_autoscaler", Enabled: true},
{Name: "balancer", Enabled: true},
{Name: "balancer", Enabled: true, Settings: rookCephv1.ModuleSettings{BalancerMode: upmapReadBalancerMode}},
},
}

Expand Down
8 changes: 4 additions & 4 deletions controllers/storagecluster/cephcluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ func TestGenerateMgrSpec(t *testing.T) {
AllowMultiplePerNode: false,
Modules: []rookCephv1.Module{
{Name: "pg_autoscaler", Enabled: true},
{Name: "balancer", Enabled: true},
{Name: "balancer", Enabled: true, Settings: rookCephv1.ModuleSettings{BalancerMode: upmapReadBalancerMode}},
},
},
},
Expand All @@ -325,7 +325,7 @@ func TestGenerateMgrSpec(t *testing.T) {
AllowMultiplePerNode: false,
Modules: []rookCephv1.Module{
{Name: "pg_autoscaler", Enabled: true},
{Name: "balancer", Enabled: true},
{Name: "balancer", Enabled: true, Settings: rookCephv1.ModuleSettings{BalancerMode: upmapReadBalancerMode}},
},
},
},
Expand All @@ -348,7 +348,7 @@ func TestGenerateMgrSpec(t *testing.T) {
AllowMultiplePerNode: false,
Modules: []rookCephv1.Module{
{Name: "pg_autoscaler", Enabled: true},
{Name: "balancer", Enabled: true},
{Name: "balancer", Enabled: true, Settings: rookCephv1.ModuleSettings{BalancerMode: upmapReadBalancerMode}},
},
},
},
Expand All @@ -361,7 +361,7 @@ func TestGenerateMgrSpec(t *testing.T) {
AllowMultiplePerNode: true,
Modules: []rookCephv1.Module{
{Name: "pg_autoscaler", Enabled: true},
{Name: "balancer", Enabled: true},
{Name: "balancer", Enabled: true, Settings: rookCephv1.ModuleSettings{BalancerMode: upmapReadBalancerMode}},
},
},
},
Expand Down

0 comments on commit 92a5407

Please sign in to comment.