Commit Graph
3949 Commits
Author SHA1 Message Date
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
Madhu Rajanna bd9b42d221 file: ignore exit code 22 when adding datapool
Ignore the exit code 22 when adding the
datapool to a filesystem.

updates: #12673

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2023-08-15 16:01:48 +02:00
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
subhamkrai ab3763767f build: update vault and other indirect imports
update vault and other indirect imports. Also,
updating k8s package to `v0.28.0-rc.0` since with
v0.27.4 it was through build error.

Signed-off-by: subhamkrai <srai@redhat.com>
2023-08-08 08:24:19 +05:30
karthik-us 2675c976d5 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>
2023-08-07 19:48:21 +05:30
Lucas Henry c948183c0e 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>
2023-08-04 15:45:54 +02:00
Travis Nielsen 5f2a8bca61 Merge pull request #12561 from henrydavies1/remove-duplicate-ParseMonEndpoints
mon: delete ParseMonEndpoints from mon package
2023-08-03 08:00:46 -06:00
Deepika Upadhyay b67bf2d6f0 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>
2023-08-03 17:01:51 +05:30
Deepika Upadhyay 0d86588620 mon: fix some of the zonal storageclass support failures
Signed-off-by: Deepika Upadhyay <deepika@koor.tech>
2023-08-03 16:41:24 +05:30
Deepika Upadhyay 764f6597c0 mon: add failure domain label for zonal topology
Signed-off-by: Deepika Upadhyay <deepika@koor.tech>
2023-08-03 16:41:24 +05:30
Deepika Upadhyay 2231d73259 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>
2023-08-03 16:41:23 +05:30
Henry Davies 2c8949e195 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>
2023-08-01 19:36:28 +01:00
Travis Nielsen e7b23a779e Merge pull request #12537 from parth-gr/v2-external
external: set RequireMsgr2 if v2 port is configured
2023-07-31 13:19:37 -06:00
parth-gr 2c4897f88c 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>
2023-07-31 23:29:03 +05:30
Sheetal Pamecha d86fa2abbc osd: use cp -a command for copying init-containers
remove copy-binaries cmd and related code

Signed-off-by: Sheetal Pamecha <spamecha@redhat.com>
2023-07-31 09:31:38 +05:30
Sachin Prabhu 6cf4627ccd 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>
2023-07-28 11:53:10 +01:00
Blaine Gardner a2658b13fd Merge pull request #12517 from spuiuk/sssd_kerberos
nfs: mount krb5.conf and krb5.keytab in the sssd container
2023-07-26 16:52:30 -06:00
subhamkrai 72386eb1d0 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>
2023-07-26 14:35:41 +05:30
Blaine Gardner 5979b38162 Merge pull request #12560 from polyedre/do-not-add-objectstore-endpoint-to-zone-when-sync-is-disabled
object: do not add objectstore endpoint to zone when sync is disabled
2023-07-25 15:31:42 -06:00
Blaine Gardner 6e12df32ad Merge pull request #12466 from sp98/osd-store
osd: configure backend store
2023-07-25 15:20:13 -06:00
Blaine Gardner 75e31a126c Merge pull request #12575 from sp98/delete-exportor-pod
core: force delete rook-ceph-exporter pod
2023-07-25 15:17:42 -06:00
sp98 dd90ef5db2 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>
2023-07-24 20:50:26 +05:30
sp98 c13d34f8d3 osd: configure backend store
Configure osd backend store from the cephCluster spec

Signed-off-by: sp98 <sapillai@redhat.com>
2023-07-24 09:16:30 +05:30
Jiffin Tony Thottan 1bf33f125e 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>
2023-07-20 14:19:15 +05:30
Lucas Henry 564afef4c7 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>
2023-07-20 08:34:41 +02:00
travisn 4c98669148 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>
2023-07-18 14:53:22 -06:00
travisn 990cb40043 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>
2023-07-18 14:35:54 -06:00
Travis Nielsen 2e7f9045ab Merge pull request #12460 from pgoron/admin-caps-spelling
object: align spelling of user admin capabilities with ceph
2023-07-18 13:23:15 -06:00
Travis Nielsen 91fea5395e Merge pull request #12415 from thotz/ceph-cosi-driver
object: adding ceph cosi driver
2023-07-18 12:12:12 -06:00
Jiffin Tony Thottan b48dc8a335 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>
2023-07-18 22:49:41 +05:30
Lucas Henry 393d09347e 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>
2023-07-17 09:27:20 +02:00
Sachin Prabhu 0a151e913d 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>
2023-07-15 18:55:09 +01:00
Javier 46cb9435a6 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>
2023-07-10 15:24:36 -06:00
Rakshith R 12e2cd550f 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>
2023-07-10 16:12:13 +05:30
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