Skip to content

Commit

Permalink
Merge pull request #2653 from malayparida2000/full_settings
Browse files Browse the repository at this point in the history
Expose ceph full threshold settings in StorageCluster CR
  • Loading branch information
openshift-merge-bot[bot] authored Jun 12, 2024
2 parents 0f9b7cd + c6f2a43 commit 3f7d383
Show file tree
Hide file tree
Showing 169 changed files with 19,212 additions and 8,734 deletions.
15 changes: 15 additions & 0 deletions api/v1/storagecluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,21 @@ type ManageCephCluster struct {
// default DOWN/OUT interval) when it is draining. This is only relevant when `managePodBudgets` is `true` in cephCluster CR.
// The default value is `30` minutes.
OsdMaintenanceTimeout time.Duration `json:"osdMaintenanceTimeout,omitempty"`
// FullRatio is the ratio at which the cluster is considered full and ceph will stop accepting writes. Default is 0.95.
// +kubebuilder:validation:Minimum=0.0
// +kubebuilder:validation:Maximum=1.0
// +nullable
FullRatio *float64 `json:"fullRatio,omitempty"`
// NearFullRatio is the ratio at which the cluster is considered nearly full and will raise a ceph health warning. Default is 0.85.
// +kubebuilder:validation:Minimum=0.0
// +kubebuilder:validation:Maximum=1.0
// +nullable
NearFullRatio *float64 `json:"nearFullRatio,omitempty"`
// BackfillFullRatio is the ratio at which the cluster is too full for backfill. Backfill will be disabled if above this threshold. Default is 0.90.
// +kubebuilder:validation:Minimum=0.0
// +kubebuilder:validation:Maximum=1.0
// +nullable
BackfillFullRatio *float64 `json:"backfillFullRatio,omitempty"`
}

// ManageCephConfig defines how to reconcile the Ceph configuration
Expand Down
15 changes: 15 additions & 0 deletions api/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 24 additions & 0 deletions config/crd/bases/ocs.openshift.io_storageclusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -725,10 +725,26 @@ spec:
description: ManageCephCluster defines how to reconcile the Ceph
cluster definition
properties:
backfillFullRatio:
description: BackfillFullRatio is the ratio at which the cluster
is too full for backfill. Backfill will be disabled if above
this threshold. Default is 0.90.
maximum: 1
minimum: 0
nullable: true
type: number
continueUpgradeAfterChecksEvenIfNotHealthy:
description: Whether or not continue if PGs are not clean
during an upgrade
type: boolean
fullRatio:
description: FullRatio is the ratio at which the cluster is
considered full and ceph will stop accepting writes. Default
is 0.95.
maximum: 1
minimum: 0
nullable: true
type: number
mgrCount:
enum:
- 1
Expand All @@ -739,6 +755,14 @@ spec:
- 3
- 5
type: integer
nearFullRatio:
description: NearFullRatio is the ratio at which the cluster
is considered nearly full and will raise a ceph health warning.
Default is 0.85.
maximum: 1
minimum: 0
nullable: true
type: number
osdMaintenanceTimeout:
description: A duration in minutes that determines how long
an entire failureDomain like `region/zone/host` will be
Expand Down
3 changes: 3 additions & 0 deletions controllers/storagecluster/cephcluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,9 @@ func newCephCluster(sc *ocsv1.StorageCluster, cephImage string, kmsConfigMap *co
StorageClassDeviceSets: newStorageClassDeviceSets(sc),
Store: osdStore,
FlappingRestartIntervalHours: 24,
FullRatio: sc.Spec.ManagedResources.CephCluster.FullRatio,
NearFullRatio: sc.Spec.ManagedResources.CephCluster.NearFullRatio,
BackfillFullRatio: sc.Spec.ManagedResources.CephCluster.BackfillFullRatio,
},
Placement: rookCephv1.PlacementSpec{
"all": getPlacement(sc, "all"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -725,10 +725,26 @@ spec:
description: ManageCephCluster defines how to reconcile the Ceph
cluster definition
properties:
backfillFullRatio:
description: BackfillFullRatio is the ratio at which the cluster
is too full for backfill. Backfill will be disabled if above
this threshold. Default is 0.90.
maximum: 1
minimum: 0
nullable: true
type: number
continueUpgradeAfterChecksEvenIfNotHealthy:
description: Whether or not continue if PGs are not clean
during an upgrade
type: boolean
fullRatio:
description: FullRatio is the ratio at which the cluster is
considered full and ceph will stop accepting writes. Default
is 0.95.
maximum: 1
minimum: 0
nullable: true
type: number
mgrCount:
enum:
- 1
Expand All @@ -739,6 +755,14 @@ spec:
- 3
- 5
type: integer
nearFullRatio:
description: NearFullRatio is the ratio at which the cluster
is considered nearly full and will raise a ceph health warning.
Default is 0.85.
maximum: 1
minimum: 0
nullable: true
type: number
osdMaintenanceTimeout:
description: A duration in minutes that determines how long
an entire failureDomain like `region/zone/host` will be
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@ spec:
- name: OCS_METRICS_EXPORTER_IMAGE
value: quay.io/ocs-dev/ocs-metrics-exporter:latest
- name: ROOK_CEPH_IMAGE
value: quay.io/ocs-dev/rook-ceph:vmaster-75180f4f3
value: quay.io/ocs-dev/rook-ceph:vmaster-19a200ac8
- name: CEPH_IMAGE
value: quay.io/ceph/ceph:v18.2.0
- name: NOOBAA_CORE_IMAGE
Expand Down Expand Up @@ -742,7 +742,7 @@ spec:
provider:
name: Red Hat
relatedImages:
- image: quay.io/ocs-dev/rook-ceph:vmaster-75180f4f3
- image: quay.io/ocs-dev/rook-ceph:vmaster-19a200ac8
name: rook-container
- image: quay.io/ceph/ceph:v18.2.0
name: ceph-container
Expand Down
24 changes: 24 additions & 0 deletions deploy/ocs-operator/manifests/storagecluster.crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -724,10 +724,26 @@ spec:
description: ManageCephCluster defines how to reconcile the Ceph
cluster definition
properties:
backfillFullRatio:
description: BackfillFullRatio is the ratio at which the cluster
is too full for backfill. Backfill will be disabled if above
this threshold. Default is 0.90.
maximum: 1
minimum: 0
nullable: true
type: number
continueUpgradeAfterChecksEvenIfNotHealthy:
description: Whether or not continue if PGs are not clean
during an upgrade
type: boolean
fullRatio:
description: FullRatio is the ratio at which the cluster is
considered full and ceph will stop accepting writes. Default
is 0.95.
maximum: 1
minimum: 0
nullable: true
type: number
mgrCount:
enum:
- 1
Expand All @@ -738,6 +754,14 @@ spec:
- 3
- 5
type: integer
nearFullRatio:
description: NearFullRatio is the ratio at which the cluster
is considered nearly full and will raise a ceph health warning.
Default is 0.85.
maximum: 1
minimum: 0
nullable: true
type: number
osdMaintenanceTimeout:
description: A duration in minutes that determines how long
an entire failureDomain like `region/zone/host` will be
Expand Down
22 changes: 11 additions & 11 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,19 @@ require (
github.com/prometheus-operator/prometheus-operator/pkg/client v0.72.0
github.com/red-hat-storage/ocs-client-operator v0.0.0-20240325165741-300e2b620f51
github.com/red-hat-storage/ocs-operator/api/v4 v4.0.0-20240327160100-bbe9d9d49462
github.com/rook/rook/pkg/apis v0.0.0-20240513003450-39f88521f0fd
github.com/rook/rook/pkg/apis v0.0.0-20240607162148-886c94854899
github.com/stretchr/testify v1.9.0
go.uber.org/multierr v1.11.0
golang.org/x/net v0.23.0
golang.org/x/net v0.25.0
google.golang.org/grpc v1.62.1
google.golang.org/protobuf v1.33.0
gopkg.in/ini.v1 v1.67.0
gopkg.in/yaml.v3 v3.0.1
gotest.tools/v3 v3.5.1
k8s.io/api v0.29.3
k8s.io/api v0.29.5
k8s.io/apiextensions-apiserver v0.29.2
k8s.io/apimachinery v0.29.3
k8s.io/client-go v0.29.3
k8s.io/apimachinery v0.29.5
k8s.io/client-go v0.29.5
k8s.io/klog/v2 v2.120.1
k8s.io/utils v0.0.0-20240310230437-4693a0247e57
sigs.k8s.io/controller-runtime v0.17.2
Expand Down Expand Up @@ -85,13 +85,13 @@ require (
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-retryablehttp v0.7.5 // indirect
github.com/hashicorp/go-retryablehttp v0.7.6 // indirect
github.com/hashicorp/go-rootcerts v1.0.2 // indirect
github.com/hashicorp/go-secure-stdlib/parseutil v0.1.8 // indirect
github.com/hashicorp/go-secure-stdlib/strutil v0.1.2 // indirect
github.com/hashicorp/go-sockaddr v1.0.6 // indirect
github.com/hashicorp/hcl v1.0.1-vault-5 // indirect
github.com/hashicorp/vault/api v1.13.0 // indirect
github.com/hashicorp/vault/api v1.14.0 // indirect
github.com/hashicorp/vault/api/auth/approle v0.6.0 // indirect
github.com/hashicorp/vault/api/auth/kubernetes v0.6.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
Expand All @@ -118,12 +118,12 @@ require (
github.com/tidwall/pretty v1.2.0 // indirect
go.mongodb.org/mongo-driver v1.9.0 // indirect
go.uber.org/zap v1.26.0 // indirect
golang.org/x/crypto v0.21.0 // indirect
golang.org/x/crypto v0.23.0 // indirect
golang.org/x/exp v0.0.0-20231127185646-65229373498e // indirect
golang.org/x/oauth2 v0.18.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/term v0.18.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/sys v0.20.0 // indirect
golang.org/x/term v0.20.0 // indirect
golang.org/x/text v0.15.0 // indirect
golang.org/x/time v0.5.0 // indirect
golang.org/x/tools v0.18.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
Expand Down
Loading

0 comments on commit 3f7d383

Please sign in to comment.