Commit Graph
3052 Commits
Author SHA1 Message Date
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
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
Travis Nielsen 18e2502a69 Merge pull request #12295 from subhamkrai/remve-default-scc
security: remove default scc privileges
2023-07-07 08:24:37 -06:00
subhamkrai 48f84b37e8 security: drop all capabilities to the container
adding drop `ALL` capabilities in rook operator container
as this is not required and will remove warning in ocp cluster.

Signed-off-by: subhamkrai <srai@redhat.com>
2023-07-07 17:06:48 +05:30
Travis Nielsen 46dd374e30 Merge pull request #12478 from Rakshith-R/csi/rm-checks
csi: drop checks for k8s version below the support minimum version
2023-07-06 11:53:47 -06:00
Rakshith R aa0aa34c23 csi: update csi sidecars' image version
Signed-off-by: Rakshith R <rar@redhat.com>
2023-07-06 16:18:35 +05:30
Rakshith R 76f4b1f586 csi: remove code related to betav1CsiDriver
This commit removes code related to betav1CsiDriver
since minimum k8s version support by rook is now
k8s v1.22 which does not support betav1 csi driver crd.

Signed-off-by: Rakshith R <rar@redhat.com>
2023-07-06 15:55:57 +05:30
Rakshith R d6b8a8f380 csi: remove k8s version check for oidc token
This commit removes k8s version check for oidc token
which required k8s v1.20 or above since minimum
k8s version that rook supports now is v1.22.

Signed-off-by: Rakshith R <rar@redhat.com>
2023-07-06 15:44:45 +05:30
Madhu Rajanna 1ba3aa4d19 csi: update csi holder daemonset template
Currently the holder daemonset is never updated
which will leaves the images the daemonset also
not updated. we should update the daemonset
template but not restart the csi holder pods
which causes the CSI volume access problem,
set the updateStrategy to OnDelete (already set in
yaml files) which allow us to update the holder
daemonset but not restart/update the pods, when a
pod is deleted or node is rebooted
the new changes will take effect.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2023-07-03 14:13:38 +02:00
travisn 4ff18dadf4 object: remove obsolete bucket health checker removal
The bucket health checker was removed in 1.10. Now in 1.12
we no longer need this removal of the bucket health
checker since it will no longer exist to remove.

Signed-off-by: travisn <tnielsen@redhat.com>
2023-06-28 16:07:51 -06:00
Rakshith R fa1be14bca csi: update csiaddons k8s-sidecar to v0.7.0
This commit updates k8s-sidecar to v0.7.0
and all links now point to v0.7.0 tag.

Signed-off-by: Rakshith R <rar@redhat.com>
2023-06-28 20:38:29 +05:30
Rakshith R 1af70aca60 csi: update cephcsi to v3.9.0
This commit updates cephcsi image to
v3.9.0 release and also removes support
for v3.7.x.

refer:
https://github.com/ceph/ceph-csi/releases/tag/v3.8.0

Signed-off-by: Rakshith R <rar@redhat.com>
2023-06-28 20:38:29 +05:30
Rakshith R c488693cb3 csi: add SeLinuxMount: true Option to csidriver obj
This feature is alpha and available from k8s 1.25.
This enabled faster mounting of volumes using
RWOP access pod.

refer:
https://kubernetes.io/blog/2023/04/18/kubernetes-1-27-\
efficient-selinux-relabeling-beta/

Signed-off-by: Rakshith R <rar@redhat.com>
2023-06-28 20:23:51 +05:30
travisn 96ff80f8b0 ci: add exporter to commit prefixes
Add the exporter to the list of commit prefixes

Signed-off-by: travisn <tnielsen@redhat.com>
2023-06-27 11:03:03 -06:00
travisn 417f05311f exporter: ignore failed deletion of service monitor
If the ceph version does not suppport the exporter, the operator
will attempt to delete the service monitor related to the exporter
to ensure it does not exist for a node. If the expected rbac does
not exist, this will cause unnecessary errors since there would anyway
be no service monitor to delete. So we ignore the error of deleting
the service monitor for the exporter.

The context is also passed to the exporter so a new kubeconfig does
not need to be initiated and cause unnecessary logging about
invalid options for the config.

Signed-off-by: travisn <tnielsen@redhat.com>
2023-06-26 12:26:09 -06:00
travisn 557a3e06cc core: api updates for controller runtime v0.15
For the controller runtime v0.15 there are some breaking
changes to the api that need to be updated.

Signed-off-by: travisn <tnielsen@redhat.com>
2023-06-22 10:33:28 -06:00
Travis Nielsen d7dcf58f7c Merge pull request #12406 from polyedre/confusing-message
Fix confusing successful message when reconciling CephObjectStoreUser
2023-06-20 13:12:55 -06:00
Travis Nielsen 9a8e93cee8 Merge pull request #12341 from thotz/add-tls-secret-ref-in-objectstoreuser-secret
object : add ssl ref in cephobjectstore user secret
2023-06-20 10:20:35 -06:00
Lucas Henry 87bc3dfcdc operator: remove confusing successful message when reconciling CephObjectStoreUser
When creating a CephObjectStoreUser with a value spec.store that refers to an
unexisting CephObjectStore, after the reconciliation loop the
CephObjectStoreUser is in the ReconcileFailed state. However, a
ReconcileSucceeded event is created with this message:

"successfully configured CephObjectStoreUser"

The success message results of the return value for the error which is currently
`nil`. Let's replace it with the error message.

Signed-off-by: Lucas Henry <polyedre@disroot.org>
2023-06-20 11:02:04 +02:00
YZ775 ed9da20d68 operator: add ceph image version label to PVC
This PR makes Rook operator to add a label on PVC that contains an image version of Ceph when creating an OSD.

Signed-off-by: YZ775 <yuzuki-mimura@cybozu.co.jp>
2023-06-19 08:19:46 +09:00