Skip to content

Commit

Permalink
Merge pull request #2473 from malayparida2000/replica-1_warning
Browse files Browse the repository at this point in the history
Add mon_warn_on_pool_no_redundancy option to rook-config-override always
  • Loading branch information
openshift-merge-bot[bot] authored Feb 21, 2024
2 parents 621cd28 + 7a7f0c5 commit 87911e1
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions controllers/storagecluster/cephconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,9 @@ import (
type ocsCephConfig struct{}

const (
rookOverrideConfigMapName = "rook-config-override"
globalSectionKey = "global"
publicNetworkKey = "public_network"
warningOnPoolRedundancyKey = "mon_warn_on_pool_no_redundancy"
rookOverrideConfigMapName = "rook-config-override"
globalSectionKey = "global"
publicNetworkKey = "public_network"
)

var (
Expand All @@ -38,6 +37,7 @@ mon_osd_nearfull_ratio = .75
mon_max_pg_per_osd = 600
mon_pg_warn_max_object_skew = 0
mon_data_avail_warn = 15
mon_warn_on_pool_no_redundancy = false
bluestore_prefer_deferred_size_hdd = 0
[osd]
osd_memory_target_cgroup_limit_ratio = 0.8
Expand Down Expand Up @@ -108,15 +108,6 @@ func updateRookConfig(defaultRookConfigData string, section string, key string,

func getRookCephConfig(r *StorageClusterReconciler, sc *ocsv1.StorageCluster) (string, error) {
rookConfig := defaultRookConfig
// if Non-Resilient pools are there then suppress the warning for pool no redundancy
if sc.Spec.ManagedResources.CephNonResilientPools.Enable {
var err error
rookConfig, err = updateRookConfig(rookConfig, globalSectionKey, warningOnPoolRedundancyKey, "false")
if err != nil {
return "", fmt.Errorf("failed to set no warning on no redundancy pool for rook config: %v", err)
}
log.Info("Health warning on pool no redundancy is suppressed now as CephNonResilientPools are enabled")
}
// configure public network if the cluster is dualstack, but not multus
if sc.Spec.Network != nil && sc.Spec.Network.Provider == "" && sc.Spec.Network.DualStack {
log.Info("DualStack is enabled, and no alternate network provider is detected")
Expand Down

0 comments on commit 87911e1

Please sign in to comment.