Commit Graph
2588 Commits
Author SHA1 Message Date
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
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
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
Deepika Upadhyay 632bf12743 mon: update mon deployment
* fixes mon zonal deployment of 2 per zone to 1 if zones field is
  specified.
* adds zones field doc to CRDs Documentation.
* add code for picking up failureDomainLabel if specified for zones
  field in mon deployment

Signed-off-by: Deepika Upadhyay <deepika@koor.tech>
(cherry picked from commit b67bf2d6f0)
2023-08-17 17:53:34 +00:00
Deepika Upadhyay 0e63059eb7 mon: fix some of the zonal storageclass support failures
Signed-off-by: Deepika Upadhyay <deepika@koor.tech>
(cherry picked from commit 0d86588620)
2023-08-17 17:53:34 +00:00
Deepika Upadhyay c4ed09c3e6 mon: add failure domain label for zonal topology
Signed-off-by: Deepika Upadhyay <deepika@koor.tech>
(cherry picked from commit 764f6597c0)
2023-08-17 17:53:33 +00:00
Deepika Upadhyay 46f29e7135 mon: add mon storage class support
if zones field is specified, deploy the mon based on the zone specified,
this will help with higher mon availability.

See also: https://github.com/rook/rook/pull/11407/

Signed-off-by: Deepika Upadhyay <deepika@koor.tech>
(cherry picked from commit 2231d73259)
2023-08-17 17:53:32 +00:00
subhamkrai b4e94f75cd ci: fix golangCI lint remove k8s.io/utils/pointer
golangci linter was throughing error `k8s.io/utils/pointer`
package is deprecated. So, I have removed that.

Signed-off-by: subhamkrai <srai@redhat.com>
(cherry picked from commit a25071ac29)
2023-08-16 17:12:02 +00:00
Niels de Vos 6afe22a2f8 nfs: run dbus-daemon sidecar as dbus user instead of root
When the dbus-daemon in the sidecar is started as "root" user, it fails
with the following log entry:

Failed to start message bus: Failed to drop capabilities: Operation not permitted

By starting the sidecar as "dbus" user (uid=81), the executable does not
try to drop capabilities, and starts successfully.

Signed-off-by: Niels de Vos <ndevos@ibm.com>
(cherry picked from commit 320b112cc6)
2023-08-11 19:43:14 +00:00
Travis Nielsen 17ad5fb962 Merge pull request #12685 from rook/mergify/bp/release-1.12/pr-12681
csi: add mode csi pods to the list to force delete pod (backport #12681)
2023-08-09 10:24:51 -06:00
karthik-us cc819f00df csi: add maxUnavailable for cephfs csi daemonset
Adding maxUnavailable parameter to the cephfs csi daemonset. The
default value of maxUnavailable = 1 can make the upgrade process
slower in environments with large number of nodes.

Fixes: #12636
Signed-off-by: karthik-us <ksubrahm@redhat.com>
(cherry picked from commit 2675c976d5)
2023-08-08 17:12:41 +00:00
Madhu Rajanna bba3e43f3c csi: add nfs pods to the list to delete pod
Add nfs pods label to the list so that Rook
can get all the pods on the failed node and
force delete the pods stuck in terminating state.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 29faca9032)
2023-08-08 17:11:39 +00:00
Madhu Rajanna bec26312cc csi: add holder pods to the list to delete pod
Add holder pods label to the list so that Rook
can get all the pods on the failed node and
force delete the pods stuck in terminating state.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 22bfc9de3d)
2023-08-08 17:11:38 +00:00