Commit Graph
4392 Commits
Author SHA1 Message Date
Praveen M a467f57350 security: key rotation support for vault kms
Signed-off-by: Praveen M <m.praveen@ibm.com>
(cherry picked from commit d8c0242c29)
2024-10-24 17:39:18 +00:00
Travis Nielsen 37f7a81e98 ci: update code for exporter changes
A recent ceph exporter change missed the codegen updates

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2024-10-22 10:09:30 -06:00
Joshua Hoblitt 241a68c21d object: set obc user quota(s) in one SetUserQuota() call
Previously, up to 3 calls to SetUserQuota() could be made. This has been
consolidated into a single call. Additionally, the `addtionalConfigSpec`
struct is introduced to centralize handling of `.spec.additionalConfig`
keys and as foundational work to support new keys in the future.

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
(cherry picked from commit 9243764359)
2024-10-21 14:53:17 +00:00
Peter Razumovsky c55756cf73 core: define empty securityContext for pods to fix CIS 5.7.3
Resolves CIS benchmark rule 5.7.3, Pods part. SecurityContext
should be explicitly defined in pod level of Pod spec section.
It is sufficient to specify empty securityContext to satisfy
CIS 5.7.3 rule.

5.7.3 Apply Security Context to Your Pods and Containers

When designing your containers and pods, make sure
that you configure the security context for your pods,
containers, and volumes.

Signed-off-by: Peter Razumovsky <prazumovsky@mirantis.com>
(cherry picked from commit 516eab4d8a)
2024-10-17 17:47:21 +00:00
Santosh Pillai f43e088fda core: fix deletion of the osd-replace-config cm
MustDelete DeleteOption was set to `true` when deleting
osd-repalce-config configMap.  This cm won't existing after
all the OSDs get migrated. So deletion of the non-existent
cm will result in error. This PR removes `mustDelete: true` from
the DeletionOption when deleting osd-replace-config configmap

Signed-off-by: Santosh Pillai <sapillai@redhat.com>
(cherry picked from commit 8dd237b460)
2024-10-16 13:50:55 +00:00
Travis Nielsen a4aea241b5 core: skip counting exporter pods as a ceph pod
The exporter pods were being counted as a ceph pod,
so once an exporter pod was added to a node, it would never
be removed since the controller thinks the exporter pod
itself is a ceph pod for which the exporter must be present.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit a71078b733)
2024-10-15 16:10:38 +00:00
Madhu Rajanna 34f81ec820 csi: disable fencing in Rook
Disabling the RBD and CephFS fencing
in Rook for now as its having bugs where
Rook is blocklisting wrong IP address
due to timing issues.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 1d1ed5e962)
2024-10-11 16:27:09 +00:00
Blaine Gardner fcc1bc20d7 multus: do not force delete in validation cleanup
Do not force delete resources in validation cleanup. Force deletion can
result in CNI IP address management (IPAM) addresses not being released
cleanly, exhausting them. This can then lead to Rook cluster deploy
failure if the CNI IPAM isn't able to garbage collect the IPs quickly.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
(cherry picked from commit 936fe60a76)
2024-10-09 18:05:51 +00:00
Travis Nielsen b8ea67f56e mon: do not remove extra mon in middle of failover
If the mon failover is in progress, ensure the removal
of an extra mon deployment is skipped since that code
path only has one mon in the list for the mon that was
just newly started. The extra mon was erroneously removing
a random mon in that case, followed immediately by the mon
failover completing and removing the expected failed mon,
and potentially causing mon quroum loss.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit e2cadab6fe)
2024-10-07 13:27:56 +00:00
Blaine Gardner 07884a3028 mds: fix liveness probe timeout
When the MDS liveness probe times out, it should not fail the probe. If
the cluster has a network partition or other issue that causes the Ceph
mon cluster to become unstable, `ceph ...` commands can hang and cause
a timeout. In this case, the MDS should not be restarted so as to not
cause cascading cluster disruption.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
(cherry picked from commit ad1bae9e1b)
2024-10-07 06:18:54 +00:00
Joshua Hoblitt 8ed15f773c rgw: change CephObjectZone.spec.{dataPool,metadataPool} to optional
These fields must be optional in order to allow usage of pre-existing
pools managed by CephBlockPool CR(s).

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
(cherry picked from commit 76fa776795)
2024-10-03 19:50:06 +00:00
Joshua Hoblitt 89a3eb5542 rgw: fix cephObjectStore failing with pre-existing pools
When attempting to use pre-existing (or cephBlockPool managed) pools and
the cephObjectStore.spec.{metadataPool,dataPool} fields are not
specified, rgw creation will fail with this error:

    2024-09-25 21:00:17.744358 E | ceph-object-controller: failed to reconcile CephObjectStore "rook-ceph/test1". failed to create object store deployments: failed to create object pools: failed to create metadata pools: failed to create pool "test1.rgw.control": pool "test1.rgw.control" type is not defined as replicated or erasure coded

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
(cherry picked from commit 9b952e0a55)
2024-10-03 17:51:30 +00:00
Michael Adam d60966a626 core: add ROOK_REVISION_HISTORY_LIMIT operator setting
This adds an operator config setting ROOK_REVISION_HISTORY_LIMIT
defaulting to kubernetes'value for RevisionHistoryLimit.

If configured, the provided value will be used as RevisionHistoryLimit

for all Deployments rook creates.

Fixes: #12722

Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit ab8fd90aa6)
2024-10-02 20:11:54 +00:00
mergify[bot] d815286186 Merge pull request #14788 from rook/mergify/bp/release-1.15/pr-14755
core: preserve pool application name change (backport #14755)
2024-10-01 17:28:33 +00:00
Santosh Pillai 771c165e69 core: preserve pool application name change
default application name is updated inside the `CreatePool` method. Send
pool spec as address in order to preserve this change.

Signed-off-by: Santosh Pillai <sapillai@redhat.com>
(cherry picked from commit 1a95d6f533)
2024-10-01 17:01:44 +00:00
parth-gr a65087b00b csi: add sc privileged to logrotate sidecar container
deployments on openshift where we need csi container pods
to be run on privileged, the logrotate sidecar container was missing the
privileged permission letting, side car to not run properly

Signed-off-by: parth-gr <partharora1010@gmail.com>
(cherry picked from commit 21ca333ed7)
2024-10-01 15:56:18 +00:00
subhamkrai 812c44e7f9 build: keep specific z version in go mod 1.22.5
let's keep specific z version in go.mod 1.22.5.

Signed-off-by: subhamkrai <srai@redhat.com>
(cherry picked from commit b818dd1c7d)
2024-09-24 11:07:27 -06:00
parth-gr 448f89c48c csi: fix the disable driver flag in the csi driver reconcile
ROOK_CSI_DISABLE_DRIVER was not working accurate
from https://github.com/rook/rook/pull/14489
The csi driver was installed even if its not
expected

Signed-off-by: parth-gr <partharora1010@gmail.com>
(cherry picked from commit 166e4f35b2)
2024-09-23 16:20:57 +00:00
Travis Nielsen 8c64dec248 core: enable annotations on crash collector
The crash collector daemon had missed the ability to
add custom annotations via the cephcluster CR, as already
supported for all the other daemons.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit fa2941d098)
2024-09-19 17:49:17 +00:00
Artem Torubarov 362cf539eb exporter: move config to cluster CRD
allows to set prio-limit and stats-period options to ceph exporter

Signed-off-by: Artem Torubarov <artem.torubarov@clyso.com>
(cherry picked from commit b2c39ace25)
2024-09-18 20:16:36 +00:00
Travis Nielsen 63e7c8125d pool: allow negative step num in crush rule
The crush rules may have a negative step num.
Rook had assumed negative values were not possible,
but just had not been encountered previously in
a custom crush rule.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit b9188c793a)
2024-09-10 13:58:34 +00:00
Travis Nielsen 1a1daf6bff Merge pull request #14707 from rook/mergify/bp/release-1.15/pr-14693
csi: stop deleting csi-operator resources (backport #14693)
2024-09-09 12:19:15 -06:00
subhamkrai 3eaf33b077 csi: stop deleting csi-operator resources
to keep it simple we'll not delete the csi-operator resources
we'll only document this for users who want to switch to csi-drivers.
Anyways by next release we'll only support csi-operator only.

Signed-off-by: subhamkrai <srai@redhat.com>
(cherry picked from commit a16ad75c92)
2024-09-09 16:42:53 +00:00
sp98 a19ad79353 core: check for duplicate ceph fs pool names
Only single pool will get created if there are multiple
data pool entries with same name. This PR just adds a check
to fail if duplicate pools are present.

Signed-off-by: sp98 <sapillai@redhat.com>
(cherry picked from commit 8fa8612201)
2024-09-09 16:40:49 +00:00
Madhu Rajanna 5f2be2e52c csi: update to new cephcsi release
we have 3.12.2 as the new cephcsi release
updating the rook to use the same.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit d041be4bcf)
2024-09-06 14:52:00 +00:00
Travis Nielsen 8cbd486f99 Merge pull request #14683 from rook/mergify/bp/release-1.15/pr-14645
osd: discover metadata and wal devices for raw device cleanup (backport #14645)
2024-09-05 11:52:06 -06:00
Travis Nielsen 7723c5a100 Merge pull request #14691 from rook/mergify/bp/release-1.15/pr-14585
introduce a way to enforce host network on all pods (backport #14585)
2024-09-05 11:51:50 -06:00
Travis Nielsen 09c90655a7 mon: remove extra mon from quorum before taking down pod
When removing a mon from quorum, there is a race condition that
can result in mon quorum going being lost at least temporarily.
The mon pod was being deleted first, and then the mon removed
from quorum. If any other mon went down between the time the
pod of the bad mon was deleted and when the mon was removed from
quorum, there may not be sufficient quorum to complete the
action of removing the mon from quorum and the operator would
be stuck.

For example, there could be 4 mons temporarily due to timing
of upgrading K8s nodes where mons may be taken down for some
number of minutes. Say a new mon is started while the down
mon also comes back up. Now the operator sees it can remove
the 4th mon from quorum, so it starts to remove it. Now say
another mon goes down on another node that is being updated
or otherwise drained. Since the 4th mon pod was deleted
and another mon is down, there are only two mons remaining
in quorum, but 3 mons are required in quorum when there
are 4 mons. Therefore, the quorum is stuck until the
third mon comes back up.

The solution is to first remove the extra mon from quorum
before taking down the mon pod.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit 8987d26a6d)
2024-09-05 17:12:16 +00:00
Michael Adam d73f4ffb0f network: add a new operator config setting ROOK_ENFORCE_HOSTNETWORK
This new setting is of Boolean type and defaults to "false".

    When set to "true", it changes the behavior of the
     rook operator to
    nable host network on all pods created by the cephcluster controller

     new method to check the setting:  opcontroller.EnForceHostNetwork()

Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit e378588359)
2024-09-05 16:57:09 +00:00
Mathias Chapelain 98fc04793b osd: discover metadata and wal devices for raw device cleanup
When doing the clean-up of raw device OSDs, it was not taking metadata
and wal devices into account. This commit discover them via the output
of `ceph-volume raw list`, which is returning `device_db` and/or
`device_wal` if they are present.

After discovering the metadata and wal device it also clean them and
close the encrypted device if any.

Signed-off-by: Mathias Chapelain <mathias.chapelain@proton.ch>
(cherry picked from commit 52ca68d46e)
2024-09-03 19:51:16 +00:00
Madhu Rajanna 21daa24046 csi: update csi-addons to v0.9.1
updating csi-addons to latest
v0.9.1 release.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 05d579b607)
2024-09-03 18:15:40 +00:00
Blaine Gardner ad5b332e77 rgw: allow users to add custom volume mounts
Allow RGW users to mount arbitrary volumes to RGW pods. This follows the
pattern that was established for NFS to support SSSD and LDAP, and
reuses much of the same code.

This opens the door wider for advanced users to take advantage of some
Ceph RGW features that Rook doesn't have first class support for.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
(cherry picked from commit eea43b7b79)
2024-08-28 22:51:16 +00:00
mergify[bot] 23e2663504 Merge pull request #14639 from rook/mergify/bp/release-1.15/pr-14636
core: fix Ceph monitor deployment in separate zones (backport #14636)
2024-08-27 19:36:17 +00:00
chanyoung d8073bc36f tests: fix unit test failure on macOS due to temp directory path
Use os.TempDir() instead of '/tmp'. This is for the peermap tests.

Signed-off-by: chanyoung <park910113@gmail.com>
(cherry picked from commit d77f6e5e3d)
2024-08-23 13:16:17 +00:00
Benoît Knecht 83a20249d1 core: fix Ceph monitor deployment in separate zones
Previously, Rook would fail to create monitors for a `CephCluster` spec that
required them to be located in distinct failure domains:

```yaml
spec:
  mon:
    count: 3
    failureDomainLabel: topology.kubernetes.io/zone
    zones:
    - eu-central-1a
    - eu-central-1b
    - eu-central-1c
```

This was due to the fact that Rook was mistakenly getting the
`failureDomainLabel` from `spec.mon.stretchCluster.failureDomainLabel`.

This commit ensures `spec.mon.failureDomainLabel` is being used instead, which
fixes the cluster deployment for the spec above.

Signed-off-by: Benoît Knecht <bknecht@protonmail.ch>
(cherry picked from commit 1c45677f5e)
2024-08-23 13:15:15 +00:00
Travis Nielsen 1016b0ecfc Merge pull request #14610 from rook/mergify/bp/release-1.15/pr-14598
core: add configuration option for metrics bindAddress (backport #14598)
2024-08-20 12:52:20 -06:00
parth-gr dd1e1a6120 osd: reweight osd while resizing
osd got resized by cryptsetup bluestore cmd
but it should also be reweight to balance the pgs properly

closes: https://github.com/rook/rook/issues/14430

Signed-off-by: parth-gr <partharora1010@gmail.com>
(cherry picked from commit 17cfda5bd6)
2024-08-20 18:15:26 +00:00
Justin Cichra 8a0eadaa39 core: add configuration option for metrics bindAddress
Alerting on controller-runtime's workqueue_depth can be useful for
debugging controllers. Also having a prometheus target for a pod gives
another data point that the system is working as expected. It is useful
for uptime alerts.

Make the bind address configurable via the configmap while still retaining the default
behavior that it is disabled.

Resolves: #14538

Signed-off-by: Justin Cichra <jcichra@cloudflare.com>
(cherry picked from commit 74a79b24b3)
2024-08-20 18:15:21 +00:00
Travis Nielsen 1283f1d132 Merge pull request #14605 from rook/mergify/bp/release-1.15/pr-14357
csi: update csi sidecars' image version (backport #14357)
2024-08-20 12:11:53 -06:00
mergify[bot] 8ca25e9c74 Merge pull request #14606 from rook/mergify/bp/release-1.15/pr-14599
csi: update csi-operator to use latest tag v0.1 (backport #14599)
2024-08-20 17:57:29 +00:00
subhamkrai 4f96664ba0 build: changes forced by latest controller-runtime
this commit contains changes that are forced by latest
controller-runtime version v0.19.0.

Signed-off-by: subhamkrai <srai@redhat.com>
(cherry picked from commit 2556e14780)
2024-08-20 17:28:15 +00:00
subhamkrai 4dca62d0ea csi: update csi-operator to use latest tag v0.1
updating csi-operator version in go.mod and csi-operator.yaml
to use latest release v0.1. And also fixing one small bug
where csi-driver log level was set in csi-operator log level.

Signed-off-by: subhamkrai <srai@redhat.com>
(cherry picked from commit 89e9077e72)
2024-08-20 17:28:14 +00:00
Praveen M cf42f35f12 csi: update csi sidecars' image version
Below csi sidecars are updated with latest available versions

csi-resizer: v1.11.1
csi-provisioner: v5.0.1
csi-attacher: v4.6.1
csi-snapshotter: v8.0.1
csi-node-driver-registrar: v2.11.1

Signed-off-by: Praveen M <m.praveen@ibm.com>
(cherry picked from commit a1ddf4535d)

# Conflicts:
#	deploy/examples/images.txt
2024-08-20 17:22:10 +00:00
ShravaniVangur b8db2e6e81 csi: storageclass update to gp2-csi
Updating storageClassName for cluster-on-pvc.yaml file from gp2 to gp2-csi.

Signed-off-by: ShravaniVangur <shravanivangur@gmail.com>
(cherry picked from commit 9656d1963a)
2024-08-20 13:34:16 +00:00
Travis Nielsen ac849d947a build: update codegen deepcopy for swift
The codegen needs updating since the swift
types were added.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit 52f892af76)
2024-08-20 06:29:09 +00:00
Travis Nielsen 6d4837c4cb core: add annotations and labels to detect version jobs
The jobs to detect the ceph and csi versions now can have
custom annotationso and labels added to them. They are
very short-lived jobs, but they may need custom annotations
in some environments to run.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit 5014d5bcf2)
2024-08-16 16:04:59 +00:00
Madhu Rajanna 9e64a840aa csi: update cephcsi to 3.12.0
updating cephcsi image to 3.12.0
release.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 7c7e8a2b32)
2024-08-16 08:43:34 -06:00
Madhu Rajanna 9e98ae6512 csi: update csi-addons to v0.9.0
As we have new csi-addons v0.9.0
updating the same here as well.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 123025f22c)

# Conflicts:
#	go.sum
2024-08-16 14:36:41 +00:00
subhamkrai 3293c16d0c csi: add unit test for csi-op resources
adding unit test for csi-op resources and also
fixing small pointer issue with this commit.

Signed-off-by: subhamkrai <srai@redhat.com>
(cherry picked from commit f40cb392c9)
2024-08-15 16:45:06 -06:00
subhamkrai be9114e2b1 csi: add annotation to existing CSI driver
adding annotation to existing CSI driver resource so that
csi-operator can take ownership of existing CSI driver resources.

Signed-off-by: subhamkrai <srai@redhat.com>
(cherry picked from commit 64cce51f03)
2024-08-15 16:45:05 -06:00