Commit Graph
3108 Commits
Author SHA1 Message Date
parth-gr d8d787bfa0 core: report node metrics using ceph telemetry
Add this reporting with the cephcluster reconcile,
Similar way we reported other telemetry's

Closes: https://github.com/rook/rook/issues/12344

Signed-off-by: parth-gr <paarora@redhat.com>
(cherry picked from commit f007f2aca1)
2023-11-16 21:56:08 +00:00
Blaine Gardner d829f8c0b1 multus: fix placement error for net addr detect job
Fix an issue in the network address detection job where placement was
only retreived from osd and not merged with all.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
(cherry picked from commit 0a538bfc37)
2023-11-14 23:59:04 +00:00
Shachar Sharon 47839e46dc nfs: allow livness-probe for nfs-ganesha container
Use K8s LivenessProbe mechanism to check OK-status of nfs-ganesha
container. A user may define his own lineness-probe, or a default one
which expects NFS TCP-port 2049 to be active; that is, willing to accept
new connections: for Ceph>=18.2.1 issue 'rpcinfo' call on local pod;
otherwise use standard K8s TCP-socket liveness probe mechanism.
Define permissive values to liveness-probe to ensure that the NFS
service is defined in failed-state only when it has non-recoverable
error.

The current default definition of LivenessProbe is expected to guard the
nfs pod from at least the following two cases:

  - Deadlocks: where an nfs-ganesha server is running, but unable serve
    new connections due to internal bad-state.

  - Resource exhaustion on the host node (e.g. OOM) which prevents the
    server from accepting new connections and reply to NULL RPC request.

In both cases we expect K8s to reschedule the nfs pod, most likely on
different host node.

Refs rook issue #12719

Signed-off-by: Shachar Sharon <ssharon@redhat.com>
(cherry picked from commit e05184d0a7)
2023-11-13 19:45:28 +00:00
Blaine Gardner e043f27584 Merge pull request #13188 from rook/mergify/bp/release-1.12/pr-13129
multus: use rook image for ip range detection (backport #13129)
2023-11-10 11:44:33 -06:00
Redouane Kachach 4c4baccb37 mgr: set interval of serviceMonitor to the value from MonitoringSpec
This change updates the serviceMonitor interval field with the
value from the MonitoringSpec.

closes: https://github.com/rook/rook/issues/13159

Signed-off-by: Redouane Kachach <rkachach@redhat.com>
(cherry picked from commit 06bc976959)
2023-11-10 16:27:35 +00:00
Blaine Gardner d5908d0e3c multus: use rook image for ip range detection
Use the Rook image (defined by the operator pod) to detect the Multus
network address ranges. It is reasonable for users to want to have a
minimal Ceph image that does not have the `ip` utility installed, which
is used for detecting the address ranges of multus interfaces. Instead,
use the Rook image, which Rook can ensure has the `ip` tool if Ceph ever
removes it from their image.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
(cherry picked from commit db1ca8c93e)
2023-11-10 16:20:48 +00:00
sp98 0a3dc3cda0 mon: failover mon from hostpath to pv
failover mons from  hostpath to pv and vice versa

Signed-off-by: sp98 <sapillai@redhat.com>
(cherry picked from commit 09356636fa)
2023-10-30 17:32:02 +00:00
subhamkrai 214b109f23 pool: rbd cmd shouldn't use admin in external mode
when creating networkFence, rbd command was loading
admin config and hence running rbd command use client.admin
in case of external cluster also. With this commit instead
of client.admin user it will use what is being passed to
config.

Signed-off-by: subhamkrai <srai@redhat.com>
(cherry picked from commit ef4dd76df1)
2023-10-27 16:23:54 +00:00
travisn 2a78a83d07 Revert "core: use crash profile in crash daemon keyring"
This reverts commit fab23d3407.
The mgr requires rw access for the cron job that collects
the crashes.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit a421143ddd)
2023-10-23 17:58:07 +00:00
Bin Wang 959d5de0bb osd: print warning message if no matching node found for osd
As seen in https://github.com/rook/rook/issues/1988, it's a common
mistake to configure rook nodes with names that don't match Kubernetes's
node label. This PR prints more detailed message to help debugging
problem.

Signed-off-by: Bin Wang <bin.wang@mail.binwang.me>

Add break according to review comment

Co-authored-by: Travis Nielsen <tnielsen@redhat.com>

Update log message according to review comment

Co-authored-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit 4a705b46b0)
2023-10-17 17:33:27 +00:00
Travis Nielsen a4f5f96eb6 Merge pull request #13043 from rook/mergify/bp/release-1.12/pr-13039
csi: fix indentation for mountinfo (backport #13039)
2023-10-12 08:54:52 -06:00
Madhu Rajanna 4fde0ad9af csi: fix indentation for mountinfo
Fixed the indentation for the mountinfo
or else an emptyDir is getting created
for it.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 9f2b7d572d)
2023-10-12 13:20:06 +00:00
sp98 2a9f6bfcc6 osd: use bash script if restart interval is > 0
If `FlappingRestartIntervalHours` for OSD is > 0 in the cephCluster CR,
then start OSD inside a bash script.

Signed-off-by: sp98 <sapillai@redhat.com>
(cherry picked from commit ffd69291f1)
2023-10-12 13:13:04 +00:00
sp98 e1811a89a7 osd: revert: make osd pod to sleep when osds are flapping"
This reverts commit 0e53c9ec61.

Signed-off-by: sp98 <sapillai@redhat.com>
2023-10-12 12:28:40 +05:30
travisn be34f6acff mon: write assimilate config to operator dir
The /tmp dir is not always available in some environments.
The only directories the operator should rely on
are the directories that are in its pod spec.
For assimilate-conf now we use the /var/lib/rook
directory to generate files since we know it is
a valid emptydir mounted into the operator pod.

Signed-off-by: travisn <tnielsen@redhat.com>
(cherry picked from commit 5359c4f4f5)
2023-10-11 16:10:28 +00:00
parth-gr c929eeda91 ci: check mds liveness probe unit test from the CI run
Signed-off-by: parth-gr <paarora@redhat.com>
(cherry picked from commit 3d4036547c)
2023-10-10 14:22:22 +00:00
parth-gr fa51e4086d mds: improve the mds liveness probe calls
Instead of checking the socket files for mds daemon,
check the mds daemon in fs maps

Closes: https://github.com/rook/rook/issues/12789

Signed-off-by: parth-gr <paarora@redhat.com>
(cherry picked from commit 2dd9b00ca3)
2023-10-10 14:22:22 +00:00
Madhu Rajanna 2a12cc1b91 csi: add mountinfo path for cephfs daemonset
If mountinfo path is available cephcsi will
try to recover the fuse client. adding the
support for the same in Rook.

fixes: #13009

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 54ce2a96da)
2023-10-09 16:47:57 +00:00
travisn 46270d404d exporter: change verbose info to debug logs
Several messages were showing up in the operator log
more often than necessary, so let's change them to
debug level.

Signed-off-by: travisn <tnielsen@redhat.com>
(cherry picked from commit 29fb879675)
2023-10-05 17:29:41 +00:00
sp98 0e53c9ec61 osd: revert: make osd pod to sleep when osds are flapping
This reverts commit 4eb9f62205.

Signed-off-by: sp98 <sapillai@redhat.com>
2023-10-05 21:26:35 +05:30
Travis Nielsen 320795292d Merge pull request #12995 from rook/mergify/bp/release-1.12/pr-12633
object: create cosi user for each object store (backport #12633)
2023-10-04 13:48:57 -06:00
Travis Nielsen 976875cb96 Merge pull request #12939 from rook/mergify/bp/release-1.12/pr-12909
core: import packages only once (backport #12909)
2023-10-04 10:50:50 -06:00
Travis Nielsen 40f0654454 Merge pull request #12980 from rook/mergify/bp/release-1.12/pr-12970
core: use crash profile in crash daemon keyring (backport #12970)
2023-10-04 10:49:22 -06:00
Jiffin Tony Thottan c92bf401ab object: create cosi user for each object store
Create each cosi user for each object store and secret which holds
credentials.

Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
(cherry picked from commit a941b3c33f)
2023-10-04 16:10:52 +00:00
Redouane Kachach 5f8c552b91 docs: fixing some spelling issues
closes: https://github.com/rook/rook/issues/12987

Signed-off-by: Redouane Kachach <rkachach@redhat.com>
(cherry picked from commit b3dd74ea20)
2023-10-03 14:06:59 +00:00
travisn 619bdc3722 file: disable active standby when set to false
The activeStandby property of the filesystem CR was not
taking effect when changed from true to false. The standby
was only being enabled when true, but never applied when
changed to false.

Signed-off-by: travisn <tnielsen@redhat.com>
(cherry picked from commit f7094d1d13)
2023-10-02 16:12:03 +00:00
travisn 17dbbafadc core: use crash profile in crash daemon keyring
The ceph documentation indicates to use the crash profile
instead of specifying rw for the mgr access.

Signed-off-by: travisn <tnielsen@redhat.com>
(cherry picked from commit fab23d3407)
2023-10-02 13:27:34 +00:00
Redouane Kachach 14c46b8000 mgr: adding support for prometheus endpoint configuration
Using the new configuration parameters prometheusEndpoint and
prometheusEndpointSSLVerify users can configure dashboard to
point to their prometheus instance.

closes: #12876

Signed-off-by: Redouane Kachach <rkachach@redhat.com>
(cherry picked from commit c763935436)
2023-09-27 14:10:23 +00:00
guoguangwu b81d618de5 core: import packages only once
Signed-off-by: guoguangwu <guoguangwu@magic-shield.com>
(cherry picked from commit 235ac293ff)
2023-09-21 21:30:45 +00:00
sp98 639b1ae25a osd: make osd pod to sleep when osds are flapping
When OSDs flap, ceph stops the OSD daemon if its marked down greater than
5 times in 600 seconds. But OSD pod restarts and marks the OSD `up` again.
This causes the PGs mapped to these OSDs to peer. While the PGs are peering,
IO to these PGs are blocked.

So we need to ensure that if ceph is marking OSD `down` due to flapping, OSD pod
should not restart to mark the OSDs `up` again.

This PR adds a sleep to the OSD pod if the container returned with a 0 exit code
Default behavior is to sleep for 6 hrs. But user can configure it from the
ceph cluster spec.

Signed-off-by: sp98 <sapillai@redhat.com>
(cherry picked from commit 4eb9f62205)
2023-09-15 18:24:50 +00:00
travisn 19ffd749e0 mgr: allow more than two mgrs
While two mgrs is considered sufficient, more mgr daemons are
now allowed in case the admin wants even more fault tolerance
to the active mgr going down, in case multiple mgrs go down.
Up to five mgr pods will be allowed. All mgrs will be in
standby mode except one active mgr. All mgr pods have a sidecar
that will update their respective pod specs with the active
or passive label.

Signed-off-by: travisn <tnielsen@redhat.com>
(cherry picked from commit 66547d27be)
2023-09-14 21:03:43 +00:00
Travis Nielsen 41004d8d2f Merge pull request #12831 from rook/mergify/bp/release-1.12/pr-12791
core: restart ceph daemons when network updated (backport #12791)
2023-09-12 16:23:59 -06:00
Matthew Penner 9744c97227 exporter: bind to all interfaces if IPv6 is enabled
Previously ceph-exporter would only bind to IPv4 interfaces. Now if the
CephCluster is configured with `dualStack: true` and/or `ipFamily: IPv6`
an additional flag (`--addrs ::`) will be added to the ceph-exporter
container to make it listen both IPv6 and IPv4 interfaces.

Signed-off-by: Matthew Penner <me@matthewp.io>
(cherry picked from commit d09a43df37)
2023-09-12 20:10:55 +00:00
Sebastian Hasler 38958ecce2 object: unique username for OBC even when preceding OBC was retained
For an OBC's name we cannot simply use the OBC's namespace and name,
because they can be reused, while the preceding bucket might be
retained by reclaimPolicy. (Commit 2733375ca4 also didn't solve
this issue, as it is an intra-cluster issue.) Therefore we instead
use the OBC's UID which should be unique within the cluster and
across clusters.

Signed-off-by: Sebastian Hasler <sebastian.hasler@stuvus.uni-stuttgart.de>
(cherry picked from commit 041fc1a71c)
2023-09-12 16:11:06 +00:00
Blaine Gardner 8b72dfa020 multus: detect network CIDRs via canary
Change how Rook detects network CIDRs for Multus networks. The IPAM
configuration is only defined as an arbitrary string JSON blob with a
"type" field and nothing more. Rook's detection of CIDRs for whereabouts
had already grown out of date since the initial implementation.
Additionally, Rook did not support DHCP IPAM, which is a reasonable
choice for users. And more, Rook did not support CNI plugin chaining,
which further complicates NADs. Based on the CNI spec, network chaning
can result in any changes to network CIDRs from the first-given plugin.

All these problems make it more and more difficult for Rook to support
Multus by inspecting the NAD itself to predict network CIDRs. Instead,
it is better for Rook to treat the CNI process as a black box. To
preserve legacy functionality of auto-detecting networks and to make
that as robust as possible, change to a canary-style architecture like
that used for Ceph mons, from which Rook will detect the network CIDRs
if possible.

Also allow users to specify overrides for CIDR ranges. This allows Rook
to still support esoteric and unexpected NAD or network configurations
where a CIDR range is not detectable or where the range detected would
be incomplete. Because it may be impossible for Rook to understand the
network CIDRs wholistically while residing only on a portion of the
network, this feature should have been present from Multus's inception.

Improving CIDR auto-detection and allowing users to specify overrides
for auto-detected CIDRs rounds out Rook's Multus support for CephCluster
(core/RADOS) installations. No further architectural changes should be
needed for CephClusters as regards application of public/cluster network
CIDRs for Multus networks.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
(cherry picked from commit 3c43268d0a)
2023-09-07 19:43:17 +00:00
Louis Bailleul e65e7bac12 operator: config default interval value for discovery daemon
Correctly set discoveryInterval default value by passing defaultDiscoverInterval to k8sutil.GetValue
Allow to set ROOK_DISCOVER_DEVICES_INTERVAL env var through discoveryDaemonInterval helm value

Signed-off-by: Louis Bailleul <louis.bailleul@pgs.com>
(cherry picked from commit e56122cbce)
2023-09-07 09:12:46 -06:00
subhamkrai 233e68ecbf operator: move most of discover pod setting to cm
It's better to move most of discover daemon setting
from env to configmap rook-ceph-operator-config.
Although, we are moving to configmap, we keep reading settings
from env but the priority will be configmap settings.

Signed-off-by: subhamkrai <srai@redhat.com>
(cherry picked from commit fb39580067)
2023-09-07 14:15:55 +00:00
sp98 ba91dec40f osd: replace existing OSDs to use new store
This follow up the #12507
- fixes replacing of encrypted OSDs.
- Updates OSD status at the end of reconcile

Signed-off-by: sp98 <sapillai@redhat.com>
(cherry picked from commit 11b8d10a5a)
2023-09-05 14:58:43 +00:00
Travis Nielsen a4114f1292 Merge pull request #12830 from rook/mergify/bp/release-1.12/pr-12487
csi: enable csi-addons-side when crds are deployed (backport #12487)
2023-09-05 08:33:34 -06:00
Divyansh Kamboj b17df46f5e monitoring: set port for servicemonitor for ceph-exporter
ceph-exporter's ServiceMonitor and Service CRD contain different port
name, which results in no metrics being collected by prometheus.

this commit makes GetCephMonitor configurable, which we use to set
consistent port names in ServiceMonitor and Service for ceph-exporter.

Signed-off-by: Divyansh Kamboj <dkamboj@redhat.com>
(cherry picked from commit 708dd29a97)
2023-09-01 17:59:33 +00:00
subhamkrai 64fecc7564 core: restart ceph daemons when network updated
We need to restart all the ceph daemons whenever
cephCluster network settings are modified like
requiremsgr2, encryption and compression. This
required for Ceph to consider the new settings
it require new ceph daemons all over.

Signed-off-by: subhamkrai <srai@redhat.com>
(cherry picked from commit 29d2b6a071)
2023-09-01 14:43:26 +00:00
subhamkrai 0ad92bd4b8 csi: enable csi-addons-side when crds are deployed
when deploying csi, we'll check if csi-addons crds
are deployed we'll enable csi-addons sidecar by default.

Signed-off-by: subhamkrai <srai@redhat.com>
(cherry picked from commit a755ec156a)
2023-09-01 13:24:40 +00:00
Jiffin Tony Thottan b1e2826708 object: avoid creating same bucket for two different OBC
If bucket exists for Provision(), then check whether user in the OBC and
owner of bucket are same.

Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
(cherry picked from commit b39e813290)
2023-08-31 21:10:53 +00:00
Madhu Rajanna c71d5714f3 core: return valid CIDR ip
we need to return a valid CIDR IP
to get it fenced properly, the previously
returned one was like `10.63.0.5:0/32` which
is not a valid CIDR, removing `:0` to look like
proper IP CIDR.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit eb304a5073)
2023-08-28 14:35:32 +00:00
Travis Nielsen 71c151cca4 Merge pull request #12769 from rook/mergify/bp/release-1.12/pr-12724
csi: set ceph cluster as ControllerRef for holder ds (backport #12724)
2023-08-28 08:29:07 -06:00
travisn 3876561a44 object: allow creating an object user in different namespace
The object user was previously required to be created in the
same namespace as the object store and the cluster. Now,
the object user can be reconciled even in a different namespace
from the cluster and object store. The namespace would be specified
in the object user CR.

Signed-off-by: travisn <tnielsen@redhat.com>
(cherry picked from commit 2b1cc4c7b8)
2023-08-25 19:01:44 +00:00
Madhu Rajanna 8ce7c719d6 csi: set ceph cluster as ControllerRef for holder
Setting ceph cluster as the ControllerRef
for the holder daemonset set so that when
a ceph cluster is deleted the holder daemoset
will also gets deleted.

fixes: #12645

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit d7a4f0038c)
2023-08-22 13:42:03 +00:00
Travis Nielsen 77d398cb3e Merge pull request #12752 from rook/mergify/bp/release-1.12/pr-12507
Replace OSD to use new backend store (backport #12507)
2023-08-21 14:46:28 -06:00
sp98 84b7b68582 osd: replace osd to use new backend store
If osd store is updated in the ceph cluster, then
delete OSDs one by one, cleanup disks and provision a new OSD on
the same disk

Signed-off-by: sp98 <sapillai@redhat.com>
(cherry picked from commit 886bb357ef)
2023-08-17 18:42:52 +00:00
Deepika Upadhyay c174df9665 docs: amend for clarity on failureDomainLabel and VolumeClaimTemplate
Signed-off-by: Deepika Upadhyay <deepika@koor.tech>
(cherry picked from commit 427c53786b)
2023-08-17 17:53:35 +00:00