Commit Graph
3070 Commits
Author SHA1 Message Date
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 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
Travis Nielsen 0b80329518 Merge pull request #12739 from rook/mergify/bp/release-1.12/pr-12679
operator: log op. config cm setting when changed (backport #12679)
2023-08-16 13:52:09 -06: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
subhamkrai 835048a38d 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>
(cherry picked from commit 733be02577)
2023-08-16 17:10:36 +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
Travis Nielsen 927b628ed6 Merge pull request #12658 from rook/mergify/bp/release-1.12/pr-12561
mon: delete ParseMonEndpoints from mon package (backport #12561)
2023-08-04 10:54:25 -06:00
Lucas Henry 9cb7a51fef operator: fix formatting of some logger methods
Some logging instructions use formatting syntax `%q`, but the logging method is
`Info` or `Debug` instead of `Debugf` and `Infof`. As a result, the arguments of
the method were concatenated instead of formatted properly.

Signed-off-by: Lucas Henry <polyedre@disroot.org>
(cherry picked from commit c948183c0e)
2023-08-04 14:56:55 +00:00
Henry Davies 5ec9fb39b9 mon: delete ParseMonEndpoints from mon package
The function ParseMonEndpoints existed twice, once in the mon package
and once in the controller package. It has now been deleted from the
mon package. Usages in the mon package now reference the function
in the controller package.

Signed-off-by: Henry Davies <henrydavies@hotmail.co.uk>
(cherry picked from commit 2c8949e195)
2023-08-03 14:01:33 +00:00
Travis Nielsen 58b0f5f294 Merge pull request #12626 from rook/mergify/bp/release-1.12/pr-12501
osd: use cp -a command for copying init-containers binary (backport #12501)
2023-07-31 15:07:15 -06:00
parth-gr d237dff985 external: set RequireMsgr2 if v2 port is configured
Currently if we use the msgr2 port,
cs-cluster-config-json looks like
"monitors":["192.59.109.11:3300","192.59.109.13:6789","192.59.109.12:6789"]

The first monitor is passed by python script and rest are
Discovered by rook operator, so if the first mon is using the v2 port
lets update the other mons also by setting up the RequireMsgr2 flag

Signed-off-by: parth-gr <paarora@redhat.com>
(cherry picked from commit 2c4897f88c)
2023-07-31 19:21:43 +00:00
Sheetal Pamecha 7a19548091 osd: use cp -a command for copying init-containers
remove copy-binaries cmd and related code

Signed-off-by: Sheetal Pamecha <spamecha@redhat.com>
(cherry picked from commit d86fa2abbc)
2023-07-31 18:05:28 +00:00
Sachin Prabhu 22b4e5d7ea nfs: fix null pointer deref in generateSssdSidecarResources()
0a151e913 results in a bug which causes null pointer dereference when
Kerberos is not setup. This causes a failure in Unit test
TestReconcileCephNFS_addSecurityConfigsToPod

Signed-off-by: Sachin Prabhu <sprabhu@redhat.com>
(cherry picked from commit 6cf4627ccd)
2023-07-28 13:57:55 +00:00
Travis Nielsen b3c3cfe389 Merge pull request #12587 from rook/mergify/bp/release-1.12/pr-12562
object: update ceph cosi driver image to v0.1.1 (backport #12562)
2023-07-27 12:46:48 -06:00
Blaine Gardner d81e8e6a12 Merge pull request #12590 from rook/mergify/bp/release-1.12/pr-12560
object: do not add objectstore endpoint to zone when sync is disabled (backport #12560)
2023-07-27 11:54:27 -06:00
Sachin Prabhu b63ac550d2 nfs: mount krb5.conf and krb5.keytab in the sssd container
This will enable us to use GSSAPI in sssd for authentication when
connecting to the remote LDAP server.

Signed-off-by: Sachin Prabhu <sprabhu@redhat.com>
(cherry picked from commit 0a151e913d)
2023-07-26 22:53:11 +00:00
Blaine Gardner d81d21367b Merge pull request #12588 from rook/mergify/bp/release-1.12/pr-12575
core: force delete rook-ceph-exporter pod (backport #12575)
2023-07-26 16:45:22 -06:00
subhamkrai 98f51c2514 core: node fencing, skip pv when pv is not backed by csi
when node fencing is triggered and a negative case where
one deployment pod consuming pv not provisioned by csi
and another deployment pod with rbd rwo are on the same
node and node fencing is triggered.

In this case rook operator panics since it is trigger to get
field `pv.Spec.CSI.Driver` which will be nil.

Also, skip static pv as there is no `imageName` in the spec
rbd status command will fail.

Signed-off-by: subhamkrai <srai@redhat.com>
(cherry picked from commit 72386eb1d0)
2023-07-26 16:45:01 +00:00
Lucas Henry 719a8cdb50 object: do not add objectstore endpoint to zone when sync is disabled
Gateways that do not run the sync threads should not be accessible from one of
the Zone endpoint. If this is the case, the synchronization might stop working.

When the CephObjectStore has the option
`spec.gateway.disableMultisiteSyncTraffic` set to `true`, we must ensure that
the objectstore endpoint is not present in the Zone endpoint.

Signed-off-by: Lucas Henry <polyedre@disroot.org>
(cherry picked from commit 564afef4c7)
2023-07-25 21:32:28 +00:00
sp98 5d51214ad5 osd: configure backend store
Configure osd backend store from the cephCluster spec

Signed-off-by: sp98 <sapillai@redhat.com>
(cherry picked from commit c13d34f8d3)
2023-07-25 21:21:20 +00:00
sp98 4c95a180ec core: force delete rook-ceph-exporter pod
Force delete rook-ceph-exporter pod that is stuck in terminating
state due to unavailability of node.

Signed-off-by: sp98 <sapillai@redhat.com>
(cherry picked from commit dd90ef5db2)
2023-07-25 21:18:33 +00:00
Jiffin Tony Thottan 049f03e684 object: update ceph cosi driver image to v0.1.1
Update the ceph cosi driver image to v0.1.1, so that it can
work on both amd and arm platforms.

Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
(cherry picked from commit 1bf33f125e)
2023-07-25 20:55:39 +00:00
travisn f1afd25624 cosi: handle deletion of the cosi driver
The controller was attempting to delete the cosi driver
again and again, always failing the reconcile when the
driver did not exist. Since the desired state is for the
driver not to exist when disabled, return a successful
reconcile.

Signed-off-by: travisn <tnielsen@redhat.com>
(cherry picked from commit 4c98669148)
2023-07-18 21:31:19 +00:00
travisn 6e39f35741 cosi: change the default deployment strategy to never
While experimental, the cosi driver should not be enabled by
default.

Signed-off-by: travisn <tnielsen@redhat.com>
(cherry picked from commit 990cb40043)
2023-07-18 21:31:19 +00:00
Peter Goron 21007c1cbe object: align spelling of user admin capabilities with ceph
users & buckets admin capabilities aren't spelled the same
way between rook crd (singular) and ceph (plural). It's a bit
misleading when comparing ceph admin cap and rook users.

Signed-off-by: Peter Goron <peter.goron@gmail.com>
(cherry picked from commit 40eed236cf)
2023-07-18 19:23:56 +00:00
Jiffin Tony Thottan ce716d538c object: intial cosi driver controller design
Adding CephCOSIDriver CRD and controller. The controller will bring up
the ceph cosi driver when first object store is created in the rook
operator namespace. Then admin can defined COSI CRDs like BucketClass
and BucketAccessClass for different object stores deployed via Rook.
Using the BucketClass and BucketAccessClass, user can define
BucketAccess for backend bucket in the RGW. The CephCOSIDriver CRD
defines configuration options for ceph cosi driver. In the first version
its usability is minimal. Even if it is not defined Rook will bring up
the ceph cosi driver with default values.

Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
(cherry picked from commit b48dc8a335)
2023-07-18 18:12:53 +00:00
Lucas Henry 332bac5ca2 rgw: add option to disable synchronization traffic
Some users want to deploy two CephObjectStores for a single Zone. The first
configures RGWs to process the synchronization of the data, while the second
CephObjectStore configures the client RGWs.

Currently, this can be implemented by setting the RGW option
'rgw_run_sync_thread' in the 'rook-config-override' ConfigMap, though it is not
really user friendly.

Ref: https://docs.ceph.com/en/latest/radosgw/config-ref/#confval-rgw_run_sync_thread

This commit adds a new option in the CephObjectStore CRD as defined in issue
https://github.com/rook/rook/issues/12272. The new option
'disableMultisiteSyncTraffic' determine whether the operator should disable the
multisite sync threads for the RGWs.

If the option is set to 'false', or if the option is not specified, the operator
does nothing. This ensures that the multisite sync threads will not be enabled
for users that disabled explicitely the multisite sync threads either manually
or with the 'rook-config-override' ConfigMap.

This commit also recommends to use two objectstore when scaling Ceph Objectstore
Multisite replication, with one objectstore configured with disabled replication
traffic.

Signed-off-by: Lucas Henry <polyedre@disroot.org>
(cherry picked from commit 393d09347e)
2023-07-17 17:30:14 +00:00
Javier af7a063bf7 test: support Ceph Reef v18 with updated integration tests
update test files to support the next version of ceph, ceph reef v18

Signed-off-by: Javier <sjavierlopez@gmail.com>
(cherry picked from commit 46cb9435a6)
2023-07-11 00:05:43 +00:00
Rakshith R 87240d9e7d core: add check for pv access modes' multinode support
During faster node loss recovery,
Rook needs to check and blocklist only rbd pvs
that do not support multinode access modes such as
ReadOnlyMany(ROX) and ReadWriteMany(RWX).
This commit adds check for the same.

Signed-off-by: Rakshith R <rar@redhat.com>
(cherry picked from commit 12e2cd550f)
2023-07-10 17:00:17 +00:00
Travis Nielsen 65f413ce1f Merge pull request #12286 from subhamkrai/fix-node-loss-rbd
core: faster recovery from rbd rwo node loss
2023-07-07 10:35:59 -06:00
subhamkrai 39b5c057ce core: faster recovery from rbd rwo node loss
in the existing node watcher, we'll check for node update
event and see if there are `out-of-service` taints are applied
and `ROOK_WATCH_FOR_NODE_FAILURE` is enabled in rook-ceph-operator-configmap,
if then we'll create the networkFence cr and delete the cr if nodes come back.
And, added the unit test too.

Signed-off-by: subhamkrai <srai@redhat.com>
2023-07-07 21:16:25 +05:30
Travis Nielsen 3ffec84100 Merge pull request #12462 from Madhu-1/fix-holderpod
csi: update csi holder daemonset template
2023-07-07 08:32:00 -06:00