Commit Graph
5036 Commits
Author SHA1 Message Date
travisn 0484a3973f csi: update port to 3300 if msgr2 is required
When msgr2 is required, ensure the mon endpoints passed to
the csi configmap are on port 3300. The mons will be
listening on both 6789 and 3300. Existing volumes can
continue using port 6789 while new volumes will use
port 3300.

Signed-off-by: travisn <tnielsen@redhat.com>
2023-03-10 10:34:56 -07:00
Travis Nielsen eeb9403774 Merge pull request #11864 from thenamehasbeentake/cephcluster-fsid
core: add fsid to the additionalPrinterColumns on cephcluster custom resource
2023-03-10 07:54:41 -07:00
parth-gr c22f5f36cb osd: validate and remove duplicate topology
remove the duplicate topology added to the node,
and the priority to keep duplicate would be give to
the one who is lowest in the hierarchy

Closes: https://github.com/rook/rook/issues/11800

Signed-off-by: parth-gr <paarora@redhat.com>
2023-03-09 21:34:38 +05:30
avanthakkar e235e01fa1 core: add missing labels in exporter deployment
Adding missing `ceph_daemon_id` & `rook_cluster` labels to the exporter deployment.
Signed-off-by: avanthakkar <avanjohn@gmail.com>
2023-03-09 20:57:48 +05:30
xiaobaowen df95c1add0 core: add fsid to the additionalPrinterColumns on cephcluster custom resource
Signed-off-by: xiaobaowen <xiaobaowen@deeproute.ai>
2023-03-09 21:47:22 +08:00
Rakshith R f39a32fcdb osd: add capability to reconcile key rotation cron jobs
This commits adds code to reconcile key rotation cron jobs.

Signed-off-by: Rakshith R <rar@redhat.com>
2023-03-08 12:07:26 +05:30
Rakshith R ef38aea2a4 osd: add util function to create key rotation cron job
This commit adds util function to create key rotation cron job
such as getKeyRotationContainer, getKeyRotationCronPodTemplateSpec
and makeKeyRotationCronJob.

Signed-off-by: Rakshith R <rar@redhat.com>
2023-03-08 12:07:26 +05:30
Rakshith R 71e011f731 osd: add rotate-key functionality to rook's key-management cmd
This commit adds functionality to be able to rotate
key encryption key of encrypted PVC backed OSDs.
Necessary changes such as adding update functionality
to kms and rbac changes are made as well.

Signed-off-by: Rakshith R <rar@redhat.com>
2023-03-08 12:07:26 +05:30
Rakshith R b41fdfbb62 osd: add support for updating secret for default KMS
This commit adds support for updating secret for default KMS.
This is required for encryption key rotation.

Signed-off-by: Rakshith R <rar@redhat.com>
2023-03-08 12:07:26 +05:30
Rakshith R 973723cbdd osd: add util functions to support encryption key rotation
This commit adds util functions to support encryption key rotation
such as RemoveEncryptionKeySlot, AddEncryptionKey and
ensureEncryptionKey.

Signed-off-by: Rakshith R <rar@redhat.com>
2023-03-08 12:07:26 +05:30
Rakshith R 46dd2eb5ff core: add KeyRotationSpec to cephcluster CR
This commit adds KeyRotationSpec to cephcluster CR
to support encryption key rotation feature.
If enabled Rook will create a cronjob for each
encrypted PVC based OSD with given schedule set
to rotate their respective key encryption key.

Signed-off-by: Rakshith R <rar@redhat.com>
2023-03-08 12:07:26 +05:30
avanthakkarandTravis Nielsen b6013d9b11 core: add env var to exporter for ceph config
The exporter requires the mon config and keyring.
Use the CEPH_ARGS env var to specify the config
instead of expecting a ceph.conf to be generated
by another component on the host path.

Co-Authored-By: Travis Nielsen <tnielsen@redhat.com>
Signed-off-by: Avan Thakkar <athakkar@redhat.com>
2023-03-07 13:26:31 -07:00
Redouane Kachach 0ae7867dd1 Revert "mgr: use k8s readiness probe to implement mgr HA"
This reverts commit dc76f81fea.

Signed-off-by: Redouane Kachach <rkachach@redhat.com>
2023-03-07 13:12:50 +01:00
Redouane Kachach 456a0c328c Revert "mgr: remove mgr sidecar"
This reverts commit ff75ec96b7.

Signed-off-by: Redouane Kachach <rkachach@redhat.com>
2023-03-07 13:12:50 +01:00
Redouane Kachach adc79d4ee4 Revert "mgr: addressing review comments"
This reverts commit 9f37439a07.

Signed-off-by: Redouane Kachach <rkachach@redhat.com>
2023-03-07 13:12:50 +01:00
Redouane Kachach 0c652d28e2 Revert "ci: fix MultiClusterDeploySuite CI"
This reverts commit b464428978.

Signed-off-by: Redouane Kachach <rkachach@redhat.com>
2023-03-07 13:12:50 +01:00
Redouane Kachach c31832095d Revert "mgr: wait for the mgr pod to be running"
This reverts commit 4d1017f805.

Signed-off-by: Redouane Kachach <rkachach@redhat.com>
2023-03-07 13:12:50 +01:00
Blaine Gardner 29ad3282a0 Merge pull request #11665 from BlaineEXE/object-make-obc-gen-user-name-work-for-multisite
object: make OBC genUserID unique across clusters
2023-03-01 15:29:09 -07:00
Travis Nielsen 064a9138fe Merge pull request #11584 from parth-gr/realm-exteranl
external: add realm support for external cluster
2023-03-01 12:42:59 -07:00
Blaine Gardner e88b920411 Merge pull request #11221 from zhucan/bugfix-11204
file: check if fs exists before checking dependencies
2023-03-01 12:18:03 -07:00
parth-gr 96ea7817f8 external: add realm support for external cluster
if a cluster won't use the deafult realm and try to
execute the python script it will fail to vaildate rgw
as the rgw-admin-user would be created on default realm
So creating user in specific realm if the realm name is passed

Signed-off-by: parth-gr <paarora@redhat.com>
2023-03-01 20:55:48 +05:30
Richard Bateman 0ca9da23e8 nfs: add hostNetwork option for the ganesha daemon
Add a hostNetwork option for a Ganesha server.
This allows you to use host networking for the cluster but still
use regular pod networking for NFS Ganesha servers

Signed-off-by: Richard Bateman <taxilian@gmail.com>
2023-02-28 20:48:27 -07:00
sp98 12bbc9b1a8 osd: add container ports only if mcs is enabled
Add container ports for OSD container only when multi cluster service is
enabled in the cluster spec.

Signed-off-by: sp98 <sapillai@redhat.com>
2023-03-01 09:07:08 +05:30
Travis Nielsen 23f6d90880 Merge pull request #11760 from opencmit/fix-11657
core: on crash pod ensure rook version label is not set
2023-02-28 11:25:21 -07:00
Ben Gao ed6ed25257 core: on crash pod ensure rook version label is not set
ceph crash pod gets rook version label added unintentionally, which is only for deployment label.
changes include:
1, make a copy of the labels for pod spec from deployment labels just before adding rook version label.
2, add unit test to make sure it works as designed.
This fix along with pr 11674 is to stop ceph daemons pod restarting unnecessarily after upgrading rook operator.

Signed-off-by: Ben Gao <bengao168@msn.com>
2023-02-28 22:19:25 +08:00
Travis Nielsen 6bcf9004a0 Merge pull request #11567 from cybozu-go/fix-10860
osd: handle device name change and device removel correctly
2023-02-27 11:54:30 -07:00
sp98 7292ac5927 core: export mon and OSD services
Signed-off-by: sp98 <sapillai@redhat.com>
2023-02-27 21:36:59 +05:30
Travis Nielsen d655c86b2f osd: create a service for each osd
The osd needs to bind to an ip that will allow both internal
and external access for rbd mirroring scenarios.
THe operator will create a service for each osd and
instruction the osd to bind to the pod ip while
publishing the clusterIP of the service as the
public IP.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit 14e7225e0a18aff85ede1d476fcaddbbfbcbb732)
2023-02-27 21:05:48 +05:30
sp98 dd941de241 core: multiClusterService API spec changes
Add API changes for export services to peer cluster

Signed-off-by: sp98 <sapillai@redhat.com>
2023-02-27 21:05:48 +05:30
Satoru Takeuchi 3a44a394b5 osd: handle device name change and device removel correctly
If a kernel device name change happens and a block device file
in the OSD directory becomes dangling link, this OSD fails
to start continuously. This problem can be resolved by confirming
the validity of the device file and recreating it if necessary.

The original problem happened in host-based clusters. A similar
problem exists in PVC-based clusters. In this case, if a PV,
corresponds to an existing OSD, and points to a missing block
device file, the OSD pod fails to consume this PV. Although this
behavior is undesirable, I don't think this problem should be
handled in Rook. If doing so, we must re-create the existing PV.
Rook shouldn't do such work.

Closes: https://github.com/rook/rook/issues/10860

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2023-02-24 05:29:14 +00:00
parth-grandBlaine Gardner 69ae9569cd build: update k8s version to 1.26.1
Update the Kubernetes API version used to 1.26.1, and start testing
against Kubernetes version 1.26.1 in CI.

Co-authored-by: parth-gr <paarora@redhat.com>
Co-authored-by: Blaine Gardner <blaine.gardner@redhat.com>

Signed-off-by: parth-gr <paarora@redhat.com>
Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2023-02-23 20:18:47 -07:00
Madhu Rajanna b01180580c csi: update cephcsi to v3.8.0
updating the cephcsi image to v3.8.0
release and also removing support for
3.6.0 as its deprecated and not supported
any more.

More details at
https://github.com/ceph/ceph-csi/releases/tag/v3.8.0
and https://github.com/ceph/ceph-csi/tree/release-v3.8
\#ceph-csi-container-images-and-release-compatibility

fixes #11688

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2023-02-22 15:49:36 +01:00
Travis Nielsen 2abb8aa08c Merge pull request #11661 from rkachach/fix_issue_removing_sidecar
mgr: remove legacy mgr HA logic and watch-active sidecar
2023-02-21 22:19:30 -07:00
Redouane Kachach 9f37439a07 mgr: addressing review comments
Signed-off-by: Redouane Kachach <rkachach@redhat.com>
2023-02-21 23:44:02 +01:00
Travis Nielsen 18c9977e04 Merge pull request #11716 from microyahoo/fix_11715
object: update os user caps
2023-02-21 12:26:11 -07:00
Redouane Kachach ff75ec96b7 mgr: remove mgr sidecar
With the new mgr HA implementation (based on readiness probe) we
don't need the mgr sidecar (live-watch) anymore. This commit is
intended to remove all the related code.

Signed-off-by: Redouane Kachach <rkachach@redhat.com>
2023-02-21 17:25:39 +01:00
Liang Zheng c81aa7f856 object: update os user caps
Removing user caps will be skipped as the UserCaps is empty, which will cause updating user caps to not take effect.

Signed-off-by: Liang Zheng <zhengliang0901@gmail.com>
2023-02-21 17:06:41 +08:00
Travis Nielsen 4d1017f805 mgr: wait for the mgr pod to be running
After an update, the mgr pod will be restarted. Since the
readiness probe will indicate the standby mgr pod is never
ready, we need to check simply for the running mgr pod
and not whether or not it is ready.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2023-02-20 16:55:51 -07:00
zhucan 46c2bef9bc file: check if fs exists before checking dependencies
Signed-off-by: zhucan <zhucan.k8s@gmail.com>
2023-02-20 11:53:59 +08:00
parth-gr a84daf9bf0 core: change io/ioutil package to use io and os package
few functions got change as they were deprecated
for ex: ioutil.Readfile change to os.Readfile
ioutil.TempFile change to os.CreateTemp
And fixed golang-ci-lint-issues

Signed-off-by: parth-gr <paarora@redhat.com>
2023-02-17 20:38:29 +05:30
Travis Nielsen 0a80789367 Merge pull request #11690 from rkachach/fix_issue_11685
ci: fix MultiClusterDeploySuite CI
2023-02-16 11:19:04 -07:00
Redouane Kachach b464428978 ci: fix MultiClusterDeploySuite CI
This fixes the the MultiClusterDeploySuite CI failure. The operator
is timing out waiting for the mgr deployments to be
ready, according to the WaitForDeploymentToStart() method. After
the reconcile times out after about five minutes, the next
reconcile succeeds since the wait is only done for new mgr
deployments.

Closes: https://github.com/rook/rook/issues/11685

Signed-off-by: Redouane Kachach <rkachach@redhat.com>
2023-02-16 18:43:38 +01:00
Rakshith R 8b9ded1f77 csi: add option to enable read affinity for rbd volumes
This commit adds code to supply variables required
to enable read affinity for rbd volumes.
It leverages `read_from_replica=localize,crush_locations=key:value`
krbd map option from ceph to serve reads from the most local OSD.
refer:
https://docs.ceph.com/en/latest/man/8/rbd/#kernel-rbd-krbd-options

Signed-off-by: Rakshith R <rar@redhat.com>
2023-02-16 19:09:39 +05:30
Travis Nielsen 06eb431525 Merge pull request #11674 from travisn/osd-version-label
osd: Ensure rook version label is not set on pod
2023-02-15 12:21:09 -07:00
Travis Nielsen ace2e152e8 Merge pull request #11673 from travisn/rgw-pool-pgs
object: RGW metadata pg count reduction on 16.2.11
2023-02-15 12:20:23 -07:00
Travis Nielsen 3dabc6dcb6 Merge pull request #11317 from avanthakkar/introduce-ceph-exporter
core: introduce ceph-exporter
2023-02-15 11:59:05 -07:00
Travis Nielsen b9be333651 Merge pull request #11678 from Madhu-1/fix-v2-map
core: set rbd default map options
2023-02-15 11:49:04 -07:00
Travis Nielsen b008c5753f Merge pull request #11643 from rkachach/fix_issue_11640
mgr: use k8s readiness probe to implement mgr HA
2023-02-15 09:51:48 -07:00
Blaine Gardner 2733375ca4 object: make OBC genUserID unique across clusters
Rook's implementation of OBC's GenerateUserID could generate colliding
user IDs for multisite clusters where each site is configured with the
same namespace/name of CephObjectStore. Add the Ceph cluster FSID to the
generated name to ensure the names won't conflict for multiple sites.

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2023-02-15 09:08:52 -07:00
Madhu Rajanna 0ab6c34bf2 core: set rbd default map options
Set the rbd map default option to ms_mode=prefer_crc
when v2 ports are used and encryption is disabled.
If we dont pass/set the ms_mode in the map options
the kernel client will assume its using v1 ports
and map operation will fail.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2023-02-15 12:46:40 +01:00