Skip to content

Commit

Permalink
Merge pull request #2214 from sp98/flappingRestartIntervalHours
Browse files Browse the repository at this point in the history
set FlappingRestartIntervalHours to 24 hrs
  • Loading branch information
openshift-ci[bot] authored Oct 17, 2023
2 parents 70f2156 + 11f5873 commit 1327f6b
Show file tree
Hide file tree
Showing 412 changed files with 17,849 additions and 27,805 deletions.
60 changes: 56 additions & 4 deletions config/crd/bases/ocs.openshift.io_storageclusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1266,6 +1266,38 @@ spec:
network:
description: Network represents cluster network settings
properties:
addressRanges:
description: AddressRanges specify a list of CIDRs that Rook will
apply to Ceph's 'public_network' and/or 'cluster_network' configurations.
This config section may be used for the "host" or "multus" network
providers.
nullable: true
properties:
cluster:
description: Cluster defines a list of CIDRs to use for Ceph
cluster network communication.
items:
description: "An IPv4 or IPv6 network CIDR. \n This naive
kubebuilder regex provides immediate feedback for some
typos and for a common problem case where the range spec
is forgotten (e.g., /24). Rook does in-depth validation
in code."
pattern: ^[0-9a-fA-F:.]{2,}\/[0-9]{1,3}$
type: string
type: array
public:
description: Public defines a list of CIDRs to use for Ceph
public network communication.
items:
description: "An IPv4 or IPv6 network CIDR. \n This naive
kubebuilder regex provides immediate feedback for some
typos and for a common problem case where the range spec
is forgotten (e.g., /24). Rook does in-depth validation
in code."
pattern: ^[0-9a-fA-F:.]{2,}\/[0-9]{1,3}$
type: string
type: array
type: object
connections:
description: Settings for network connections such as compression
and encryption across the wire.
Expand Down Expand Up @@ -1336,15 +1368,35 @@ spec:
provider:
description: Provider is what provides network connectivity to
the cluster e.g. "host" or "multus"
enum:
- ""
- host
- multus
nullable: true
type: string
selectors:
additionalProperties:
type: string
description: Selectors string values describe what networks will
be used to connect the cluster. Meanwhile the keys describe
each network respective responsibilities or any metadata storage
provider decide.
description: "Selectors define NetworkAttachmentDefinitions to
be used for Ceph public and/or cluster networks when the \"multus\"
network provider is used. This config section is not used for
other network providers. \n Valid keys are \"public\" and \"cluster\".
Refer to Ceph networking documentation for more: https://docs.ceph.com/en/reef/rados/configuration/network-config-ref/
\n Refer to Multus network annotation documentation for help
selecting values: https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/docs/how-to-use.md#run-pod-with-network-annotation
\n Rook will make a best-effort attempt to automatically detect
CIDR address ranges for given network attachment definitions.
Rook's methods are robust but may be imprecise for sufficiently
complicated networks. Rook's auto-detection process obtains
a new IP address lease for each CephCluster reconcile. If Rook
fails to detect, incorrectly detects, only partially detects,
or if underlying networks do not support reusing old IP addresses,
it is best to use the 'addressRanges' config section to specify
CIDR ranges for the Ceph cluster. \n As a contrived example,
one can use a theoretical Kubernetes-wide network for Ceph client
traffic and a theoretical Rook-only network for Ceph replication
traffic as shown: selectors: public: \"default/cluster-fast-net\"
cluster: \"rook-ceph/ceph-backend-net\""
nullable: true
type: object
type: object
Expand Down
7 changes: 4 additions & 3 deletions controllers/storagecluster/cephcluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -452,8 +452,9 @@ func newCephCluster(sc *ocsv1.StorageCluster, cephImage string, nodeCount int, s
Enabled: true,
},
Storage: rookCephv1.StorageScopeSpec{
StorageClassDeviceSets: newStorageClassDeviceSets(sc, serverVersion),
Store: osdStore,
StorageClassDeviceSets: newStorageClassDeviceSets(sc, serverVersion),
Store: osdStore,
FlappingRestartIntervalHours: 24,
},
Placement: rookCephv1.PlacementSpec{
"all": getPlacement(sc, "all"),
Expand Down Expand Up @@ -549,7 +550,7 @@ func isMultus(nwSpec *rookCephv1.NetworkSpec) bool {
return false
}

func validateMultusSelectors(selectors map[string]string) error {
func validateMultusSelectors(selectors map[rookCephv1.CephNetworkType]string) error {
publicNetwork, validPublicNetworkKey := selectors[publicNetworkSelectorKey]
clusterNetwork, validClusterNetworkKey := selectors[clusterNetworkSelectorKey]
if !validPublicNetworkKey && !validClusterNetworkKey {
Expand Down
6 changes: 3 additions & 3 deletions controllers/storagecluster/storagecluster_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1109,9 +1109,9 @@ func TestStorageClusterOnMultus(t *testing.T) {
if c.testCase != "default" {
c.cr.Spec.Network = &rookCephv1.NetworkSpec{
Provider: networkProvider,
Selectors: map[string]string{
"public": c.publicNW,
"cluster": c.clusterNW,
Selectors: map[rookCephv1.CephNetworkType]string{
rookCephv1.CephNetworkPublic: c.publicNW,
rookCephv1.CephNetworkCluster: c.clusterNW,
},
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1266,6 +1266,38 @@ spec:
network:
description: Network represents cluster network settings
properties:
addressRanges:
description: AddressRanges specify a list of CIDRs that Rook will
apply to Ceph's 'public_network' and/or 'cluster_network' configurations.
This config section may be used for the "host" or "multus" network
providers.
nullable: true
properties:
cluster:
description: Cluster defines a list of CIDRs to use for Ceph
cluster network communication.
items:
description: "An IPv4 or IPv6 network CIDR. \n This naive
kubebuilder regex provides immediate feedback for some
typos and for a common problem case where the range spec
is forgotten (e.g., /24). Rook does in-depth validation
in code."
pattern: ^[0-9a-fA-F:.]{2,}\/[0-9]{1,3}$
type: string
type: array
public:
description: Public defines a list of CIDRs to use for Ceph
public network communication.
items:
description: "An IPv4 or IPv6 network CIDR. \n This naive
kubebuilder regex provides immediate feedback for some
typos and for a common problem case where the range spec
is forgotten (e.g., /24). Rook does in-depth validation
in code."
pattern: ^[0-9a-fA-F:.]{2,}\/[0-9]{1,3}$
type: string
type: array
type: object
connections:
description: Settings for network connections such as compression
and encryption across the wire.
Expand Down Expand Up @@ -1336,15 +1368,35 @@ spec:
provider:
description: Provider is what provides network connectivity to
the cluster e.g. "host" or "multus"
enum:
- ""
- host
- multus
nullable: true
type: string
selectors:
additionalProperties:
type: string
description: Selectors string values describe what networks will
be used to connect the cluster. Meanwhile the keys describe
each network respective responsibilities or any metadata storage
provider decide.
description: "Selectors define NetworkAttachmentDefinitions to
be used for Ceph public and/or cluster networks when the \"multus\"
network provider is used. This config section is not used for
other network providers. \n Valid keys are \"public\" and \"cluster\".
Refer to Ceph networking documentation for more: https://docs.ceph.com/en/reef/rados/configuration/network-config-ref/
\n Refer to Multus network annotation documentation for help
selecting values: https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/docs/how-to-use.md#run-pod-with-network-annotation
\n Rook will make a best-effort attempt to automatically detect
CIDR address ranges for given network attachment definitions.
Rook's methods are robust but may be imprecise for sufficiently
complicated networks. Rook's auto-detection process obtains
a new IP address lease for each CephCluster reconcile. If Rook
fails to detect, incorrectly detects, only partially detects,
or if underlying networks do not support reusing old IP addresses,
it is best to use the 'addressRanges' config section to specify
CIDR ranges for the Ceph cluster. \n As a contrived example,
one can use a theoretical Kubernetes-wide network for Ceph client
traffic and a theoretical Rook-only network for Ceph replication
traffic as shown: selectors: public: \"default/cluster-fast-net\"
cluster: \"rook-ceph/ceph-backend-net\""
nullable: true
type: object
type: object
Expand Down
Loading

0 comments on commit 1327f6b

Please sign in to comment.