Commit Graph
3803 Commits
Author SHA1 Message Date
parth-gr ec242d5ee7 pool: fix pool status check in rn controller
if the pool is just created and getting the status updated
rn controller can still go and proceed to check the pool status
which result in panic
and later it stop re-trying because of panic get swallowed
https://github.com/rook/rook/commit/cf13deee6f0aaa1ff854d57493bf91df70f8f436

Signed-off-by: parth-gr <partharora1010@gmail.com>
2025-11-11 18:39:01 +05:30
Travis Nielsen 7a515eb24a csi: convert csi operator volume settings
The csi volumes and volume mount settings are now
converted to the csi operator driver CR, for example
to allow nix os mounts to be applied to the csi
node plugins.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2025-10-01 10:37:22 -06:00
Travis Nielsen c069e73c91 Merge pull request #16520 from parth-gr/fix-rn-status
rbdmirror: fix mirroring monitoring settings for rn
2025-09-26 14:48:01 -05:00
parth-gr 49c26dbfb0 rbdmirror: fix mirroring monitoring settings for rn
currently if we disable the monitoring for rn,
it doesnt reset the status

Signed-off-by: parth-gr <partharora1010@gmail.com>
2025-09-25 19:26:52 +05:30
subham rai 96d631168c Merge pull request #16516 from Madhu-1/csi-op-bugs
csi: Remove liveness probe setting from the csi-op
2025-09-23 10:48:02 +05:30
Blaine Gardner cad2be9f0e Merge pull request #16499 from jhoblitt/feature/cephbn-phase
object: add status.{phase,observedGeneration} to cephbn
2025-09-22 16:26:53 -06:00
Madhu Rajanna 333082c397 csi: use recreate deployment strategy
This is a fix/workaround to set the Recreate
deployment strategy as default in Rook as
its long proven working without any problem.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2025-09-22 12:48:18 +02:00
subhamkrai 0c296545a5 csi: add labels to the csi-operator driver pod
currently, labels are not passed to csi-operator but
for csi-driver lables works as expected. This commit
add changes to add labels on csi-operator driver pod as well.

Signed-off-by: subhamkrai <srai@redhat.com>
2025-09-22 16:10:35 +05:30
Madhu Rajanna 46c7d2cc26 csi: remove liveness from the driver spec
CephCSI will remove the livess sidecar
container functionality as it was created
very long back and it should be replaced with
kubernetes GRPC livessness problem.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2025-09-22 09:43:28 +02:00
Travis Nielsen 270d4d4c65 Merge pull request #16501 from subhamkrai/update-ceph-to-tentacle
core: add support for ceph tentacle
2025-09-19 07:09:40 -06:00
subhamkrai 11fac627b0 core: add support for ceph tentacle
we are now adding tentacle to the supported versions and add the
upgrade test from squid to tentacle. Also, clean some unused code.

Signed-off-by: subhamkrai <srai@redhat.com>
2025-09-19 12:03:45 +05:30
Santosh Pillai f2bf0eb200 osd: updated blocking pdbs if drained node is back
If the drained node is added back and one or more others nodes are down
update the blocking pdbs, that is, add blocking pdb to node that was
just added back.

Signed-off-by: Santosh Pillai <sapillai@redhat.com>
2025-09-18 13:05:26 +05:30
Joshua Hoblitt 864c349c1f object: add status.{phase,observedGeneration} to cephbn
Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
2025-09-16 12:19:20 -07:00
Travis Nielsen 50a4a39e62 test: dependency unit test fix for blocking deletion
The dependency blocking unit test was failing with the latest
library updates due to change in behavior that the garbage
collector is not actually deleting the cluster CR after
the dependencies are cleaned up. Instead, check that the
condition indicates the resource has no dependencies remaining.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2025-09-16 11:56:31 -06:00
dependabot[bot] 5a980c8b7a build(deps): bump the k8s-dependencies group with 8 updates
Bumps the k8s-dependencies group with 8 updates:

| Package | From | To |
| --- | --- | --- |
| [k8s.io/api](https://github.com/kubernetes/api) | `0.33.4` | `0.34.0` |
| [k8s.io/apiextensions-apiserver](https://github.com/kubernetes/apiextensions-apiserver) | `0.33.4` | `0.34.0` |
| [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) | `0.33.4` | `0.34.0` |
| [k8s.io/cli-runtime](https://github.com/kubernetes/cli-runtime) | `0.33.4` | `0.34.0` |
| [k8s.io/client-go](https://github.com/kubernetes/client-go) | `0.33.4` | `0.34.0` |
| [k8s.io/cloud-provider](https://github.com/kubernetes/cloud-provider) | `0.33.4` | `0.34.0` |
| [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) | `0.21.0` | `0.22.0` |
| [sigs.k8s.io/mcs-api](https://github.com/kubernetes-sigs/mcs-api) | `0.2.0` | `0.3.0` |

Updates `k8s.io/api` from 0.33.4 to 0.34.0
- [Commits](https://github.com/kubernetes/api/compare/v0.33.4...v0.34.0)

Updates `k8s.io/apiextensions-apiserver` from 0.33.4 to 0.34.0
- [Release notes](https://github.com/kubernetes/apiextensions-apiserver/releases)
- [Commits](https://github.com/kubernetes/apiextensions-apiserver/compare/v0.33.4...v0.34.0)

Updates `k8s.io/apimachinery` from 0.33.4 to 0.34.0
- [Commits](https://github.com/kubernetes/apimachinery/compare/v0.33.4...v0.34.0)

Updates `k8s.io/cli-runtime` from 0.33.4 to 0.34.0
- [Commits](https://github.com/kubernetes/cli-runtime/compare/v0.33.4...v0.34.0)

Updates `k8s.io/client-go` from 0.33.4 to 0.34.0
- [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kubernetes/client-go/compare/v0.33.4...v0.34.0)

Updates `k8s.io/cloud-provider` from 0.33.4 to 0.34.0
- [Commits](https://github.com/kubernetes/cloud-provider/compare/v0.33.4...v0.34.0)

Updates `sigs.k8s.io/controller-runtime` from 0.21.0 to 0.22.0
- [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases)
- [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/main/RELEASE.md)
- [Commits](https://github.com/kubernetes-sigs/controller-runtime/compare/v0.21.0...v0.22.0)

Updates `sigs.k8s.io/mcs-api` from 0.2.0 to 0.3.0
- [Release notes](https://github.com/kubernetes-sigs/mcs-api/releases)
- [Changelog](https://github.com/kubernetes-sigs/mcs-api/blob/master/RELEASE.md)
- [Commits](https://github.com/kubernetes-sigs/mcs-api/compare/v0.2.0...v0.3.0)

---
updated-dependencies:
- dependency-name: k8s.io/api
  dependency-version: 0.34.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: k8s-dependencies
- dependency-name: k8s.io/apiextensions-apiserver
  dependency-version: 0.34.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: k8s-dependencies
- dependency-name: k8s.io/apimachinery
  dependency-version: 0.34.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: k8s-dependencies
- dependency-name: k8s.io/cli-runtime
  dependency-version: 0.34.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: k8s-dependencies
- dependency-name: k8s.io/client-go
  dependency-version: 0.34.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: k8s-dependencies
- dependency-name: k8s.io/cloud-provider
  dependency-version: 0.34.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: k8s-dependencies
- dependency-name: sigs.k8s.io/controller-runtime
  dependency-version: 0.22.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: k8s-dependencies
- dependency-name: sigs.k8s.io/mcs-api
  dependency-version: 0.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: k8s-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: subhamkrai <srai@redhat.com>
2025-09-16 10:30:46 -06:00
Santosh Pillai 1ff7604f82 core: use updated context in prevalidaiton checks
If the CephCluster spec is updated before the prevalidation check, then
Cluster.context still refers to the cancelled context of the operator.
This PR just updates the cluster context to use the latest operator
context.

Signed-off-by: Santosh Pillai <sapillai@redhat.com>
2025-09-16 12:57:12 +05:30
Travis Nielsen 1ed0057756 Merge pull request #16468 from parth-gr/fix-external-ipv6
external: fix ipv6 monitoring endpoint reconcile
2025-09-15 10:46:19 -06:00
Travis Nielsen 59add8b5de Merge pull request #16484 from sp98/fix-shouldFailoverMonImmediately
mon: fix mon health nil pointer exception with mons on PVC
2025-09-15 07:59:00 -06:00
Santosh Pillai d399615bdc mon: fix mon health nil pointer exception
shouldFailoverMonImmediately has a nil pointer exception with mons on
PVC. Rook-ceph-mon-endpoint does not store node information of the mons
on PVC. So `mapping.Hostname` throws nill pointer

Signed-off-by: Santosh Pillai <sapillai@redhat.com>
2025-09-15 18:13:46 +05:30
parth-gr e1873cb2e7 external: fix ipv6 monitoring endpoint reconcile
currently the extraction ipv6 was not correct
used the net package to extract the host ip from
the ipadress

Signed-off-by: parth-gr <partharora1010@gmail.com>
2025-09-12 12:50:05 +05:30
Blaine Gardner 1c3ebbd01a Merge pull request #16456 from subhamkrai/rotate-nfs-keys
nfs: rotate nfs cephx key
2025-09-11 10:43:22 -06:00
subhamkrai 5e21d43365 nfs: rotate nfs cephx key
Signed-off-by: subhamkrai <srai@redhat.com>
2025-09-11 16:10:46 +05:30
Santosh Pillai 5c91f87fd2 Merge pull request #16112 from elias-dbx/pdb_safer_down
osd: exclude down OSDs from main PDB when cluster is clean
2025-09-11 10:09:57 +05:30
Elias Carter 60a15306e9 osd: exclude down OSDs from main PDB when cluster is clean
Currently, when there are down OSDs but all PGs are clean we add the
number of downed OSDs ot the main PDB maxUnavailable. For example if
OSDs 1,3,5 are down and all PGs are clean we create the following PDB:
```yaml
  maxUnavailable: 4
  selector:
    matchLabels:
      app: rook-ceph-osd
```

This is potentially dangerous as there can be race conditions which can
break the cluster, for example:
1. A new node is added to the cluster with 4 OSDs
2. Those OSDs are down as they have not started up and joined the cluster yet
3. All PGs are healthy as the new OSDs haven't started yet and they are new
4. The rook operator sets maxUnavailable to 5 on the OSD PDB
5. The new OSDs move from down to up as they start
6. Something in the cluster starts a disruption (eviction request)
7. Any 5 OSDs can be disrupted as maxUnavilable is still 5 and the downed OSDs are now up
8. If the 5 disrupted OSDs contain all the replicas of a PG it will cause the PG to go down

To better protect from this scenario, we can instead exclude the downed
OSDs from the main PDB instead of adding to maxUnavailable.
```yaml
  maxUnavailable: 1
  selector:
    matchExpressions:
    - key: app
      operator: In
      values: ["rook-ceph-osd"]
    - key: osd
      operator: NotIn
      values: ["1", "3", "5"]
```

This allows drains to still process when there are downed OSDs and PGs
are clean without allowing the non-downed OSDs to be disrupted.

Signed-off-by: Elias Carter <elias@dropbox.com>
2025-09-10 12:05:55 -07:00
Travis Nielsen e294c280ed csi: allow csi controller pod to set host networking
The ceph csi controller plugin did not have the capability to
set host networking, in case the host networking is being enforced
with ROOK_ENFORCE_HOST_NETWORK: true.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2025-09-10 11:47:54 -06:00
Blaine Gardner 1e31e87529 Merge pull request #16452 from BlaineEXE/csi-fix-keeppriorkeycountmax-logic
csi: fix prior cephx key deletion logic
2025-09-10 10:02:27 -06:00
Blaine Gardner 7911469016 csi: fix prior cephx key deletion logic
Fix an issue where keepPriorKeyCountMax would be counted differently
when rotation was currently in progress, versus when rotation was not in
progress.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
2025-09-09 15:26:28 -06:00
subhamkrai d2a1286606 csi: add multus network annotation to csi-operator
this commit adds multus network annotation to the
csi-operator node plugin and controller plugin pods
when multus is enabled in the ceph cluster.

Signed-off-by: subhamkrai <srai@redhat.com>
2025-09-09 21:22:15 +05:30
Blaine Gardner f90fa269f0 Merge pull request #16421 from parth-gr/cephx-osd-bootstrap
osd: remove the osd bootstrap keyring
2025-09-04 09:41:42 -06:00
parth-gr 794a232835 osd: remove the osd bootstrap keyring
when the osd is created there is no need for
osd bootstrap keyring, so remove the keyring
and keyring file,

New keyring will be created if
new osd need to be provisoned

Signed-off-by: parth-gr <partharora1010@gmail.com>
2025-09-03 21:41:52 +05:30
Blaine Gardner 982b2fe632 Merge pull request #16372 from sp98/delete-bootstrap-keys
core: delete bootstrap keys
2025-09-02 12:16:59 -06:00
Blaine Gardner ff3ef88c61 Merge pull request #16409 from sp98/rotate-lockbox-keys
osd: rotate lockbox keys for encrypted osd
2025-09-02 12:16:06 -06:00
Santosh Pillai 4cdba0df54 core: delete bootstrap keys
Delete the client.boostrap.* keys. These keys are not created by rook so
it can't rotate them. This PR just delete these keys in the
postMonStartUpAction.

Signed-off-by: Santosh Pillai <sapillai@redhat.com>
2025-09-01 08:55:23 +05:30
Santosh Pillai b4e1c1720d osd: rotate lockbox keys for encrypted osd
ceph-volume creates osd-lockbox keys for the encryted osds. This PR
rotates those keys along with the OSD keys.

Signed-off-by: Santosh Pillai <sapillai@redhat.com>
2025-09-01 08:44:14 +05:30
Travis Nielsen 7ef6c250ed Merge pull request #16381 from subhamkrai/delete-csi-op-resource
csi: delete csi operator CR's when disabled
2025-08-29 08:32:31 -06:00
Travis Nielsen 12f1673385 Merge pull request #16382 from subhamkrai/add-cm-watcher
csi: add watcher for cm cluster controller
2025-08-29 08:24:17 -06:00
subhamkrai 3b7a7b8958 csi: delete csi operator CR's when disabled
this commit deletes csi operator CR's when
user wants to revert back to csi driver for
some reasons. This commits deletes CR's like
`clientProfile, cephConnection, driver,
operatorConfig, and clientProfileMapping`.

Signed-off-by: subhamkrai <srai@redhat.com>
2025-08-29 15:38:20 +05:30
subhamkrai dd6693ff97 csi: add watcher for cm cluster controller
this commit add watcher for cm `rook-ceph-operator-config`
to look for updated value of `ROOK_USE_CSI_OPERATOR` before
adding this watcher we had to restart rook operator pod
so that it reconciles and create cephConnection CR.

Signed-off-by: subhamkrai <srai@redhat.com>
2025-08-29 13:29:34 +05:30
Travis Nielsen 0a9262e73b csi: cleanup formatting of csi log statement
The csi key creation was not correctly logging params

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2025-08-28 14:07:18 -06:00
Travis Nielsen b2b28e1280 csi: set csi operator as default if no settings found
If the ROOK_USE_CSI_OPERATOR setting is not found in the
rook-ceph-operator-config configmap, the default now
is to use the csi operator instead of the previous
csi driver

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2025-08-28 12:26:28 -06:00
Travis Nielsen 3edbe6c550 Merge pull request #16402 from cuiweixie/reflect.TypeFor
operator: refactor to use reflect.TypeFor
2025-08-28 10:29:28 -06:00
Travis Nielsen 57bdd548e2 Merge pull request #16399 from travisn/update-client-profile
csi: Set the cephfs kernel mount options when network encryption is enabled
2025-08-28 10:27:02 -06:00
cuiweixie 20b3b9deef operator: refactor to use reflect.TypeFor
Signed-off-by: cuiweixie <cuiweixie@gmail.com>
2025-08-28 23:02:19 +08:00
Travis Nielsen 6309cd367e csi: default to secure kernel mount options if network encrypted
If the network is encrypted with msgr2, cephfs requires
the mount options to include ms_mode=secure. Now this
will be set by default if the mount options are not
already set in the cephcluster CR or the operator env
var CSI_CEPHFS_KERNEL_MOUNT_OPTIONS.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2025-08-27 16:30:47 -06:00
Travis Nielsen eeebfbf496 csi: set kernel mount options from env var if not in cluster spec
If the cephfs kernel mount options are not specified in the
cephcluster.spec.csi CR settings, fall back to the setting
in the operator env var CSI_CEPHFS_KERNEL_MOUNT_OPTIONS.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2025-08-27 16:11:34 -06:00
Travis Nielsen cc39368964 csi: update client profile when changing
The csi client profile CR needed to be updated if
the spec changed. Previously, the client profile was never
being updated because it was calling Update() on the
existing CR retreived from Get(), rather than with
the updated spec.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2025-08-27 15:57:28 -06:00
Blaine Gardner b162873623 Merge pull request #16271 from BlaineEXE/admin-key-rotation
core: rotate client.admin cephx key
2025-08-27 15:20:28 -06:00
Blaine Gardner b023eebc8c Merge pull request #16396 from BlaineEXE/csi-fix-cephx-status-from-config
csi: fix wrong use of daemon config for cephx status
2025-08-27 15:14:14 -06:00
Blaine Gardner 7c33186e72 core: admin cephx key rotation
Implement CephX key rotation for Rook's client.admin user.

Admin user rotation is risky, so this has been tested extensively both
in unit tests as well as by manually injecting failures during runtime.
In testing, all failures were able to be recovered by the recovery
routine.

A mutex is also added to help ensure that two simultaneous admin key
rotation processes cannot be running simultaneously for any given
namespace. The mutex is tested in unit tests, and it was verified during
runtime via  manual testing.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
2025-08-27 14:47:45 -06:00
Blaine Gardner 480b407bc2 csi: fix wrong use of daemon config for cephx status
Fix a wrong usage of the CephX daemon config that should be CephX CSI
config.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
2025-08-27 14:36:54 -06:00