Commit Graph
3904 Commits
Author SHA1 Message Date
parth-gr 3d4036547c ci: check mds liveness probe unit test from the CI run
Signed-off-by: parth-gr <paarora@redhat.com>
2023-10-10 18:56:36 +05:30
Madhu Rajanna 54ce2a96da 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>
2023-10-06 11:16:23 +02:00
Blaine Gardner 29fa7771f8 Merge pull request #12998 from travisn/exporter-logging
exporter: Change verbose info to debug logs
2023-10-05 11:28:45 -06:00
Eng Zer Jun 77bff6a07c core: remove redundant len check
From the Go specification [1]:

  "1. For a nil slice, the number of iterations is 0."
  "3. If the map is nil, the number of iterations is 0."

`len` returns 0 if the slice or map is nil [2]. Therefore, checking
`len(v) > 0` before a loop is unnecessary.

[1]: https://go.dev/ref/spec#For_range
[2]: https://pkg.go.dev/builtin#len

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2023-10-05 20:16:46 +08:00
parth-gr 2dd9b00ca3 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>
2023-10-05 00:54:06 +05:30
travisn 29fb879675 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>
2023-10-04 12:45:39 -06:00
Blaine Gardner e74333ddcd Merge pull request #12633 from thotz/cosi-user-creation
object: create cosi user for each object store
2023-10-04 10:05:36 -06:00
Redouane Kachach b3dd74ea20 docs: fixing some spelling issues
closes: https://github.com/rook/rook/issues/12987

Signed-off-by: Redouane Kachach <rkachach@redhat.com>
2023-10-03 13:50:17 +02:00
travisn f7094d1d13 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>
2023-10-02 08:27:14 -06:00
travisn fab23d3407 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>
2023-09-28 11:43:01 -06:00
Travis Nielsen 33fb7b801b Merge pull request #12926 from rkachach/fix_issue_12876
mgr: adding support for prometheus endpoint configuration
2023-09-27 08:09:13 -06:00
Redouane Kachach c763935436 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>
2023-09-27 11:07:18 +02:00
Travis Nielsen cb9ffacce5 Merge pull request #12909 from testwill/pkg-import
core: import packages only once
2023-09-21 15:30:04 -06:00
subhamkrai 2a5ba8e998 build: upgrade controller runtime to 0.16
This commits upgrade the controller runtime version
from v0.15.1 to v0.16.0 and also adding the changes force by
new version.

Signed-off-by: subhamkrai <srai@redhat.com>
2023-09-20 13:02:38 +05:30
Jiffin Tony Thottan a941b3c33f 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>
2023-09-19 13:48:58 +05:30
guoguangwu 235ac293ff core: import packages only once
Signed-off-by: guoguangwu <guoguangwu@magic-shield.com>
2023-09-16 13:40:17 +08:00
Travis Nielsen a3dafbe9cf Merge pull request #12715 from sp98/osd-sleep
osd: make osd pod to sleep when osds are flapping
2023-09-15 12:24:08 -06:00
sp98 4eb9f62205 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>
2023-09-15 22:59:46 +05:30
travisn 66547d27be 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>
2023-09-14 13:29:11 -06:00
Matthew Penner d09a43df37 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>
2023-09-12 11:39:46 -06:00
Sebastian Hasler 041fc1a71c 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>
2023-09-11 23:31:39 +02:00
Blaine Gardner 17f0072d9d Merge pull request #12778 from BlaineEXE/multus-allow-cidr-spec
multus: allow using NADs without inspectable CIDRs
2023-09-07 13:42:41 -06:00
Blaine Gardner 3c43268d0a 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>
2023-09-07 10:12:55 -06:00
Louis Bailleul e56122cbce 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>
2023-09-07 10:28:13 +01:00
Travis Nielsen 0ae3800929 Merge pull request #12770 from sp98/osd-migration-part2
osd: replace existing OSDs to use new store
2023-09-05 08:57:20 -06:00
Travis Nielsen ded675e758 Merge pull request #12825 from weirdwiz/service-monitor-port
monitoring: set port for servicemonitor for ceph-exporter
2023-09-01 11:58:41 -06:00
sp98 11b8d10a5a 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>
2023-09-01 21:07:38 +05:30
Travis Nielsen 3f67a7861f Merge pull request #12791 from subhamkrai/restart-ceph-pods
core: restart ceph daemons when network updated
2023-09-01 08:42:08 -06:00
Travis Nielsen dadf2e5b84 Merge pull request #12487 from subhamkrai/enable-addons-sidecar
csi: enable csi-addons-side when crds are deployed
2023-09-01 07:23:41 -06:00
Divyansh Kamboj 708dd29a97 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>
2023-09-01 12:56:53 +05:30
subhamkrai 29d2b6a071 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>
2023-09-01 11:30:48 +05:30
Travis Nielsen 35a86d4373 Merge pull request #12804 from thotz/check-owner-bucket-exist-grant
object: avoid creating same bucket for two different OBC
2023-08-31 15:09:46 -06:00
subhamkrai a755ec156a 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>
2023-08-31 11:28:49 +05:30
Jiffin Tony Thottan b39e813290 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>
2023-08-28 18:19:24 +05:30
Madhu Rajanna eb304a5073 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>
2023-08-28 10:58:16 +02:00
travisn 2b1cc4c7b8 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>
2023-08-25 11:54:57 -06:00
Madhu Rajanna d7a4f0038c 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>
2023-08-22 10:41:17 +02:00
Travis Nielsen 0e3117bd6e Merge pull request #12507 from sp98/osd-migration
Replace OSD to use new backend store
2023-08-17 12:40:49 -06:00
Travis Nielsen afaadd78c4 Merge pull request #12384 from ideepika/feature/ksd-174
mon: add mon storage class support
2023-08-17 11:52:20 -06:00
sp98 886bb357ef 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>
2023-08-17 21:40:55 +05:30
Travis Nielsen 29f984da3a Merge pull request #12691 from subhamkrai/operator-placement
operator: move most of discover pod setting to cm
2023-08-16 13:54:23 -06:00
Travis Nielsen 9efe0b7db0 Merge pull request #12672 from subhamkrai/fix-update-vault
build: update vault and other indirect imports
2023-08-16 11:11:06 -06:00
subhamkrai fb39580067 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>
2023-08-16 22:17:47 +05:30
subhamkrai a25071ac29 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>
2023-08-16 21:48:42 +05:30
subhamkrai 733be02577 operator: log op. config cm setting when changed
earlier, we're always logging when `GetValue` method is
called to get operator config  values which somettime
spamming the logs for example `ROOK_WATCH_FOR_NODE_FAILURE`
keep logging every time 5 min.

Now, we'll store the settings in the map and log only when
map key value is changed.

Signed-off-by: subhamkrai <srai@redhat.com>
2023-08-16 13:56:38 +05:30
Niels de Vos 320b112cc6 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>
2023-08-10 18:17:19 +02:00
Deepika Upadhyay 427c53786b docs: amend for clarity on failureDomainLabel and VolumeClaimTemplate
Signed-off-by: Deepika Upadhyay <deepika@koor.tech>
2023-08-09 21:21:40 +05:30
Travis Nielsen 9c83260eec Merge pull request #12678 from karthik-us/maxUnavailable
csi: add maxUnavailable for cephfs csi daemonset
2023-08-08 11:12:01 -06:00
Madhu Rajanna 29faca9032 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>
2023-08-08 09:24:24 +02:00
Madhu Rajanna 22bfc9de3d 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>
2023-08-08 09:24:19 +02:00