Commit Graph
4408 Commits
Author SHA1 Message Date
Grant Fleming 171a45e006 operator: monitors should always be allowed to failover
Previously arbiter monitors were allowed to failover in supported versions
of Ceph. This behaviour regressed. Since all supported versions of Ceph now
support this, we no longer need to check this at all.

Signed-off-by: Grant Fleming <gfleming@evroc.com>
(cherry picked from commit cdf692d227)
2024-11-08 16:23:52 +00:00
Artem Torubarov f7613e2643 rgw: keep default-placement in zone config
Signed-off-by: Artem Torubarov <artem.torubarov@clyso.com>
(cherry picked from commit 8ad2bf88bb)
2024-11-05 17:55:25 +00:00
Artem Torubarov 6694d88e67 rgw: support custom name for default pool placement
introduce Default flag to CRD

Signed-off-by: Artem Torubarov <artem.torubarov@clyso.com>
(cherry picked from commit b47dff9770)
2024-11-05 16:23:06 +00:00
Travis Nielsen f33731d8b8 Merge pull request #14931 from rook/mergify/bp/release-1.15/pr-14715
rgw: support new zone pools (backport #14715)
2024-11-05 09:20:54 -07:00
Travis Nielsen 84e3e2f18f Merge pull request #14953 from rook/mergify/bp/release-1.15/pr-14949
osd: Allow scheduling on unschedulable nodes (backport #14949)
2024-11-04 17:51:05 -07:00
Travis Nielsen 5ecef3010f Merge pull request #14960 from rook/mergify/bp/release-1.15/pr-14941
core: Set resources on the detect version job (backport #14941)
2024-11-04 13:28:25 -07:00
Travis Nielsen e51ac39b78 mds: wait for mds standby upgrade for same fs
The upgrade of the mds daemons pauses to wait for the
stopping of standby daemons before the filesystem upgrade
is completed. If there are multiple filesystems, there
could be standbys for other filesystems that will not be
stopped at the time of the upgrade of another filesystem.
Thus, the standbys may not upgrade and be stuck on the
previous version. Now, the standby upgrade will only wait
for standbys for the same filesystem.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit 99d60c5bba)
2024-11-04 17:41:01 +00:00
Travis Nielsen 86af6cb0ba core: set resources on the cmd reporter jobs
If the cmd-reporter key is set under the resources
element in the CephCluster CR, the memory and cpu request
and limits will be set on the ceph detect version job
and network job accordingly.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit f489f99e13)
2024-11-04 17:15:32 +00:00
Travis Nielsen 52b4a61a72 osd: allow scheduling on unschedulable nodes
For nodes that are explicitly requested for deploying
OSDs, they will be skipped temporarily if not
schedulable or not ready. A future reconcile is
expected to schedule them. Allow the OSDs to be
scheduled even on these nodes that are temporarily
down, even if it blocks the reconcile from completing.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit 7fbe4e7db5)
2024-11-01 20:19:18 +00:00
Travis Nielsen 9fd6e308e7 csi: remove version check for k8s and cephcsi
The version checks for the csi driver are removed now
since they are all obsolete. The K8s version and cephcsi
versions are no longer checked. Anyway, the move to the
csi operator would take ownership of version checks
needed in the future, so for now we simplify rook
deployment of the csi driver.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit 2ff429e479)
2024-10-31 07:47:27 -06:00
Artem Torubarov 0f0f03918a rgw: support v19 zone pools
add rgw shared pools rados ns to topics_pool, account_pool, and group_pool

Signed-off-by: Artem Torubarov <artem.torubarov@clyso.com>
(cherry picked from commit f6a25b0c4b)
2024-10-29 15:43:11 +00:00
Artem Torubarov 3712566c9b rgw: pool placement
Signed-off-by: Artem Torubarov <torubarov.a.a@gmail.com>
(cherry picked from commit 59175f0b40)
2024-10-29 08:37:58 -06:00
Travis Nielsen d117b52783 Merge pull request #14905 from rook/mergify/bp/release-1.15/pr-14818
kms: key rotation support for vault kms (backport #14818)
2024-10-25 14:45:50 -06:00
Blaine Gardner c781db7c03 object: also use system certs for validating RGW cert
When generating the HTTP client used for RGW admin ops, use both system
certs as well as the user-given cert.

As a real world example, admins may use ACME to rotate Letsencrypt certs
every 2 months. For an external CephObjectStore, the cert used by Rook
and RGW may not be rotated at the same time. This can cause the Rook
operator to fail CephObjectStore reconciliation until both certs agree.

When Rook also relies on system certs in the container, Rook's
reconciliation will not have reconciliation failures because
Letsencrypt's well-known and trusted root certificates can be loaded
from the system to validate the RGW's newly-rotated cert.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
(cherry picked from commit 7bb72a0171)
2024-10-25 17:59:00 +00:00
Guillaume Abrioux aa8af31a7f osd: mount /run/udev in the init container for ceph-volume activate
The /run/udev directory is now mounted in the OSD init container. This change
is necessary because `ceph-volume activate` needs access to /run/udev [1] in order
to properly handle devices. Without this mount, `ceph-volume activate` could
fail to discover devices during OSD initialization.

[1] https://github.com/ceph/ceph/commit/c2e8c295dc46f1bd74861feb163d9d82f8bb5509

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
(cherry picked from commit dbcd0d46dd)
Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2024-10-25 10:03:21 +00:00
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
Madhu Rajanna 7cabfd056f core: cleanup blockpool with annotation
This is similar to #14052 we did for radosnamespace
and this is an extension to support cleanup
at the blockpool level to cleanup the images
and the snapshots in a pool.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 4e29717317)
2024-10-24 16:29:20 +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