Commit Graph
5036 Commits
Author SHA1 Message Date
Jiffin Tony Thottan ba40f84123 object: update cosi images
Updating images for ceph cosi driver and side car.

Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
2024-06-04 19:32:45 +05:30
subhamkrai 4be450ae4b csi: skip creating networkFence when csi disabled
skip creating networkFence when 'ROOK_CSI_DISABLE_DRIVER' is set to
'false'.

Signed-off-by: subhamkrai <srai@redhat.com>
2024-06-04 18:17:38 +05:30
Blaine Gardner 08a27940ed multus: add and test ipv6 support for validation tool
Add IPv6 support for multus validation tool. Also test that IPv6 support
works by specifying one of the NetAttachDefs with an IPv6 address range.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
2024-06-03 17:30:36 -06:00
Travis Nielsen 2a5301a5cc Merge pull request #14269 from rook/dependabot/go_modules/github-dependencies-f460172902
build(deps): bump the github-dependencies group across 1 directory with 5 updates
2024-05-31 15:56:28 -06:00
dependabot[bot] 2ddbdebf43 build(deps): bump the github-dependencies group across 1 directory with 5 updates
Bumps the github-dependencies group with 5 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [github.com/IBM/keyprotect-go-client](https://github.com/IBM/keyprotect-go-client) | `0.13.0` | `0.14.0` |
| [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) | `1.53.0` | `1.53.10` |
| [github.com/hashicorp/vault/api](https://github.com/hashicorp/vault) | `1.13.0` | `1.14.0` |
| [github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring](https://github.com/prometheus-operator/prometheus-operator) | `0.73.2` | `0.74.0` |
| [github.com/prometheus-operator/prometheus-operator/pkg/client](https://github.com/prometheus-operator/prometheus-operator) | `0.73.2` | `0.74.0` |

Updates `github.com/IBM/keyprotect-go-client` from 0.13.0 to 0.14.0
- [Release notes](https://github.com/IBM/keyprotect-go-client/releases)
- [Changelog](https://github.com/IBM/keyprotect-go-client/blob/master/CHANGELOG.md)
- [Commits](https://github.com/IBM/keyprotect-go-client/compare/v0.13.0...v0.14.0)

Updates `github.com/aws/aws-sdk-go` from 1.53.0 to 1.53.10
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.53.0...v1.53.10)

Updates `github.com/hashicorp/vault/api` from 1.13.0 to 1.14.0
- [Release notes](https://github.com/hashicorp/vault/releases)
- [Changelog](https://github.com/hashicorp/vault/blob/main/CHANGELOG.md)
- [Commits](https://github.com/hashicorp/vault/compare/v1.13.0...v1.14.0)

Updates `github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring` from 0.73.2 to 0.74.0
- [Release notes](https://github.com/prometheus-operator/prometheus-operator/releases)
- [Changelog](https://github.com/prometheus-operator/prometheus-operator/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus-operator/prometheus-operator/compare/v0.73.2...v0.74.0)

Updates `github.com/prometheus-operator/prometheus-operator/pkg/client` from 0.73.2 to 0.74.0
- [Release notes](https://github.com/prometheus-operator/prometheus-operator/releases)
- [Changelog](https://github.com/prometheus-operator/prometheus-operator/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus-operator/prometheus-operator/compare/v0.73.2...v0.74.0)

---
updated-dependencies:
- dependency-name: github.com/IBM/keyprotect-go-client
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-dependencies
- dependency-name: github.com/aws/aws-sdk-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-dependencies
- dependency-name: github.com/hashicorp/vault/api
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-dependencies
- dependency-name: github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-dependencies
- dependency-name: github.com/prometheus-operator/prometheus-operator/pkg/client
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-31 12:28:20 -06:00
Michael Adam 823df7be98 build: add result of codegen
`make codegen`resulted in a diff, so that needed to be committed.

Signed-off-by: Michael Adam <obnox@samba.org>
2024-05-31 19:16:23 +02:00
Travis NielsenandBlaine Gardner f7f12ecf99 network: improve the IsHost function
This change is a follow-up to PR https://github.com/rook/rook/pull/13651 .

It is also meant to provide a continuation of the closed, stale
PR https://github.com/rook/rook/pull/13878 .

It is  furthermore  intended as a preparation for the introduction of
a way to enforce host networking in the next round of updates to PR
    https://github.com/rook/rook/pull/13651 .

This change improves the documentation,  implementation,  and unit testing for the   method of the
 spec.

Signed-off-by: Michael Adam <obnox@samba.org>
Co-authored-by: Blaine Gardner <b.blaine.gardner@gmail.com>
Co-authored-by: Travis Nielsen <tnielsen@redhat.com>
2024-05-31 12:53:25 +02:00
Travis Nielsen e479b051bc osd: configure cluster full settings when osds fill up
When the clusters reach full, nearfull, or backfill full thresholds
ceph will raise health warnings and stop allowing IO or backfill
depending on the threshold. These settings require special ceph
commands instead of being generic ceph config. Allow these settings
to be set from the CephCluster CR in the spec.storage
section.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2024-05-30 12:10:41 -06:00
Travis Nielsen 48b657099d Merge pull request #14232 from sp98/configure-balancer-mode
mgr: setting balancer mode from cluster spec.
2024-05-29 10:44:29 -06:00
Santosh Pillai f5ca09e385 Merge pull request #14196 from sp98/skip-osd-uprade-during-migration
osd: skip upgrade if migration is pending
2024-05-29 12:33:39 +05:30
sp98 322549cbe1 osd: skip upgrade if migration is pending
Currently we allow upgrade of other OSDs while migration
of OSD, due to change in backing store, is pending. This
will not work if the updated OSD ceph version does not support
the currently applied backing store. So rook will skip any
OSD upgrade if the OSD migration is pending.

Signed-off-by: sp98 <sapillai@redhat.com>
2024-05-28 11:27:28 +05:30
Brian Dowling ef0ed93134 osd: reduce safe-to-destroy retry timeout to 15s
This reduces the safe-to-remove retry interval from 1m to 15s.

Closes #14247

Signed-off-by: Brian Dowling <bjd-dev@simplicity.net>
2024-05-27 13:54:21 -04:00
sp98 1ad37ecce9 mgr: setting balancer mode from cluster spec
This PR adds a `settings` option in the `Module` struct
which can help users to futher customize the `balancer`
module with a differet mode.

Signed-off-by: sp98 <sapillai@redhat.com>
2024-05-27 11:30:10 +05:30
subhamkrai 85c25bbc6e ci: fix codespell ci by skipping some words
fixing 'secert' to `secret` and adding workds like
`NotIn, addin` to skip work list.

Signed-off-by: subhamkrai <srai@redhat.com>
2024-05-27 10:26:34 +05:30
Blaine Gardner a138a38cdb Merge pull request #14248 from BlaineEXE/fix-mon-ipv6-networking
mon: fix bind addr when IPv6 and msgr2 are enabled
2024-05-23 07:31:12 -06:00
Blaine Gardner 573a47e736 mon: fix bind addr when IPv6 and msgr2 are enabled
When IPv6-only network mode is enabled and when mons are configured to
listen only on msgrV2 port, Rook has to add the port to the mon
--public-bind-addr in order to force mons to stop listening on the
msgrV1 port. This can cause problems for IPv6 clusters where adding
':<port>' to the end of an IP addr looks like a valid IPv6 address.

In IPv6 mode, Rook needs to set this to '[<ip>]:<port>' with the
brackets to be a non-ambiguous IPv6 address.

In IPv4 mode, Rook needs to keep its existing behavior. IPv4 mode should
also continue to be the defualt assumption if the network config isn't
specified.

If 'dualStack: true' is specified, Rook is informed that the environment
is dual stack, but Rook doesn't know which IP family to expect from the
pod IP. In this scenario, it is safest for Rook not to apply the port,
since assuming either IPv4 or IPv6 format could be incorrect. In this
scenario, mons may still listen on msgrV1 ports, but this is preferable
to an environment where mons perpetually crash.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
2024-05-21 14:42:06 -06:00
subham rai 161306a484 Merge pull request #14186 from parth-gr/heartbeat-node
core: do not watch resourceversion and heartbeat node updates
2024-05-21 16:58:15 +05:30
parth-gr c235a99cf9 core: do not watch resourceversion and heartbeat node updates
currently node predicate watches for resourceVersion and heartbeat
changes, which are not critical things. So with the PR we will add
a early-exit condition for the predicate as an optimization and to
ignore considering for a reconcile of cephcluster if updates are
not crucial

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

Signed-off-by: parth-gr <partharora1010@gmail.com>
2024-05-20 22:25:39 +05:30
NymanRobin 05315ae64f csi: add cephfs encryption support
Ceph-CSI support for fscrypt encryption of cephfs.
To achieve this commit add capability of mounting the
required `rook-ceph-csi-kms-config` configmap into
csi-cephfsplugin-provisioner and nodeplugin pods.

Further it modifies the ClusterRoles `cephfs-csi-nodeplugin` and
`cephfs-external-provisioner-runner` to grant privileges
required for reading encryption configuration and fetching
encryption secrets from either kubernetes secrets or
from a Key Management System (KMS).

These privileges are essential for the proper functioning of
ceph-csi-cephfs with fscrypt encryption.

The following privileges have been added:
- `secrets/get`: Allows reading of secrets for encryption.
- `configmaps/get`: Grants access to configuration maps,
    this is used to read encryption configuration.
- `serviceaccounts/get`: Enables retrieval of service accounts for
    authentication to KMS and for retrieving encryption secrets
    stored there.
- `serviceaccounts/token/create`: Allows creation of service account tokens,
    which are required for authenticating requests to KMS
    when retrieving encryption secrets.

The commit also updated the csi documentation to include cephfs
in the encryption section, with examples updated accordingly.

Signed-off-by: NymanRobin <robin.nyman@est.tech>
2024-05-20 14:03:02 +03:00
Travis Nielsen 2555e51cba Merge pull request #14234 from sp98/remove-owner-ref-in-cleanupjob
core: remove owner refs in resource cleanup jobs
2024-05-18 10:02:00 -06:00
sp98 33ce8f0c8e core: fix missing env in svg cleanup job
SVG cleanup job uses the cephSubvolumeGroup env name
from spec.Name. But sometimes it can be empty. In that
case rook should use the CR name.

Signed-off-by: sp98 <sapillai@redhat.com>
2024-05-17 18:55:01 +05:30
sp98 c98fc86918 core: remove owner refs in resource cleanup jobs
Removed owner reference from Radosnamespace and
subVolumeGroup cleanup resources.

Signed-off-by: sp98 <sapillai@redhat.com>
2024-05-17 18:39:34 +05:30
Satoru Takeuchi f776c0b35e core: remove pacific specific code
Since pacific is no longer supported, we can remove pacific specific
code.

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2024-05-15 02:26:33 +00:00
Travis Nielsen 3628e83892 osd: add cephcluster status for legacy osds to replace
LVM-based OSDs on PVCs are legacy and are not well tested.
Therefore, we add status to the cephcluster CR that at least
gives a clue that the OSDs should be replaced.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2024-05-10 16:00:41 -06:00
dependabot[bot] e9602861e9 build(deps): bump the github-dependencies group across 1 directory with 7 updates
Bumps the github-dependencies group with 7 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [github.com/IBM/keyprotect-go-client](https://github.com/IBM/keyprotect-go-client) | `0.12.2` | `0.13.0` |
| [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) | `1.51.11` | `1.52.2` |
| [github.com/ceph/go-ceph](https://github.com/ceph/go-ceph) | `0.26.0` | `0.27.0` |
| [github.com/hashicorp/vault/api](https://github.com/hashicorp/vault) | `1.12.2` | `1.13.0` |
| [github.com/k8snetworkplumbingwg/network-attachment-definition-client](https://github.com/k8snetworkplumbingwg/network-attachment-definition-client) | `1.6.0` | `1.7.0` |
| [github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring](https://github.com/prometheus-operator/prometheus-operator) | `0.72.0` | `0.73.2` |
| [github.com/prometheus-operator/prometheus-operator/pkg/client](https://github.com/prometheus-operator/prometheus-operator) | `0.72.0` | `0.73.2` |

Updates `github.com/IBM/keyprotect-go-client` from 0.12.2 to 0.13.0
- [Release notes](https://github.com/IBM/keyprotect-go-client/releases)
- [Changelog](https://github.com/IBM/keyprotect-go-client/blob/master/CHANGELOG.md)
- [Commits](https://github.com/IBM/keyprotect-go-client/compare/v0.12.2...v0.13.0)

Updates `github.com/aws/aws-sdk-go` from 1.51.11 to 1.52.2
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.51.11...v1.52.2)

Updates `github.com/ceph/go-ceph` from 0.26.0 to 0.27.0
- [Release notes](https://github.com/ceph/go-ceph/releases)
- [Changelog](https://github.com/ceph/go-ceph/blob/master/docs/release-process.md)
- [Commits](https://github.com/ceph/go-ceph/compare/v0.26.0...v0.27.0)

Updates `github.com/hashicorp/vault/api` from 1.12.2 to 1.13.0
- [Release notes](https://github.com/hashicorp/vault/releases)
- [Changelog](https://github.com/hashicorp/vault/blob/main/CHANGELOG.md)
- [Commits](https://github.com/hashicorp/vault/compare/v1.12.2...v1.13.0)

Updates `github.com/k8snetworkplumbingwg/network-attachment-definition-client` from 1.6.0 to 1.7.0
- [Release notes](https://github.com/k8snetworkplumbingwg/network-attachment-definition-client/releases)
- [Commits](https://github.com/k8snetworkplumbingwg/network-attachment-definition-client/compare/v1.6.0...v1.7.0)

Updates `github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring` from 0.72.0 to 0.73.2
- [Release notes](https://github.com/prometheus-operator/prometheus-operator/releases)
- [Changelog](https://github.com/prometheus-operator/prometheus-operator/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus-operator/prometheus-operator/compare/v0.72.0...v0.73.2)

Updates `github.com/prometheus-operator/prometheus-operator/pkg/client` from 0.72.0 to 0.73.2
- [Release notes](https://github.com/prometheus-operator/prometheus-operator/releases)
- [Changelog](https://github.com/prometheus-operator/prometheus-operator/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus-operator/prometheus-operator/compare/v0.72.0...v0.73.2)

---
updated-dependencies:
- dependency-name: github.com/IBM/keyprotect-go-client
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-dependencies
- dependency-name: github.com/aws/aws-sdk-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-dependencies
- dependency-name: github.com/ceph/go-ceph
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-dependencies
- dependency-name: github.com/hashicorp/vault/api
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-dependencies
- dependency-name: github.com/k8snetworkplumbingwg/network-attachment-definition-client
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-dependencies
- dependency-name: github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-dependencies
- dependency-name: github.com/prometheus-operator/prometheus-operator/pkg/client
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-06 13:50:39 -06:00
Redouane Kachach ee7c71c89e mgr: fix UpdateActiveMgrLabel to retry label update on failure
fix UpdateActiveMgrLabel to retry label update on failure. Previously,
the function always returned the current manager, even if update
failed, leading to inconsistent labels. This fix ensures retries on
failures.

Fixes: https://github.com/rook/rook/issues/13601

Signed-off-by: Redouane Kachach <rkachach@ibm.com>
2024-05-06 19:30:44 +02:00
Blaine Gardner 1af97d09a8 Merge pull request #14154 from BlaineEXE/csi-config-map-fix-empty-namespace
csi: fix missing namespace bug in csi cluster config map
2024-05-03 12:09:52 -06:00
Travis Nielsen 3364bd65bb Merge pull request #14134 from subhamkrai/add-validation-scds
osd: limit storageClassDeviceSets to 63 chars
2024-05-03 07:29:28 -06:00
subhamkrai 6f5cc9b01d osd: limit storageClassDeviceSets to 63 chars
there are some cases where storageClassDeviceSets length
are more 63 chars and osd provisioned failed due to this.
with error
```
 failed to run osd provisioning job for PVC "ocs-deviceset-*-local-volume-storageclass-0-data-*": Job.batch "rook-ceph-osd-prepare-*" is invalid: [spec.template.spec.volumes[10].name: Invalid value: "ocs-deviceset-*-local-volume-storageclass-0-data-*": must be no more than 63 characters, spec.template.spec.containers[0].volumeMounts[9].name: Not found: "ocs-deviceset-*-local-volume-storageclass-0-data-*",
```

Using x-validator to limit the maxLength to the deviceClassSet.Name to
40 chars and adding code check that overall pvc name should be less than
63 chars.

Signed-off-by: subhamkrai <srai@redhat.com>
2024-05-03 10:52:18 +05:30
Blaine Gardner 4ff881240f csi: fix missing namespace bug in csi cluster config map
Someone testing the Multus holder pod removal feature encountered an
issue where the migration process failed to lead to a system state where
PVCs could be created successfully.

The root cause was found to be a ceph csi config map wherein the primary
CephCluster entry was lacking a value for the "namespace" field.

I observed this once in my development on the holder pod removal
feature, but I was unable to reproduce and assumed it was my own error.
Since this has been seen in a user environment, it must be that the
error is a race condition, and I am unable to determine the exact source
of the bug.

I do not believe this bug would be present if the code that updates the
CSI configmap were properly idempotent, but it has many conditions based
on prior states, and I was unable to determine how to resolve this
underlying impelementation pattern issue.

Instead, I opted to separate the `clusterKey` parameter into two clear
parts:
1. `clusterID` for when `clusterKey` is used as an analogue for
   `clusterID`
2. `clusterNamespace` for when `clusterKey` is used as an analogue for
   `clusterNamespace`

I added unit tests to ensure that SaveClusterConfig() will be able to
detect when the namespace is currently missing, and using the new
`clusterNamespace` field, it should always know what value to use as
input when correcting the bug in already-installed systems.

I also verified that this update works when the function simultaneously
removes netNamespaceFilePath entries, and that those entries are removed
properly.

Finally, manual testing also verifies the change.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
2024-05-02 13:58:00 -06:00
Travis Nielsen 954b000ba6 mon: disable v1 port if msgr2 is required
The mon was listening on both v1 and v2 ports inside the daemon
even though the service endpoint would not redirect any traffic
to the v1 port. When msgr2 is required, disable the mon from
listening on the v1 port for reduced security footprint.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2024-05-01 15:07:10 -06:00
Travis Nielsen 25d36c4c75 mon: remove quincy check since quincy is min version
With the removal of Ceph Pacific support, no need to check if Quincy
is avaiable to support encryption on the wire.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2024-05-01 15:07:09 -06:00
Travis Nielsen 539543e211 Merge pull request #14106 from subhamkrai/fix-portable-mon-scaledwon
mon: fix mon scaledown when mons are portable
2024-04-25 10:39:52 -06:00
subhamkrai d23a8433ed mon: fix mon scaledown when mons are portable
in case of portable mons, mon scaledown was skipped
with below code
```
if mon.NodeName == "" {
			logger.Debugf("mon %q is not scheduled to a specific host", mon.DaemonName)
			continue
		}
```
which skips mon removal if mon nodeName is empty
but if mons are scale down in case of portable mons
in that case also we want to remove extra mons to match
the cephCluster configuration.

Signed-off-by: subhamkrai <srai@redhat.com>
2024-04-25 21:28:49 +05:30
Travis Nielsen 85b542faaf Merge pull request #14082 from momantech/master
docs: delete duplicate words and revise the names of some methods
2024-04-25 08:52:52 -06:00
Praveen M faf7837621 csi: update csi sidecars' image version
Below sidecars are updated with latest available versions

csi-node-driver-registrar: v2.10.1
csi-resizer: v1.10.1
csi-provisioner: v4.0.1
csi-attacher: v4.5.1
csi-snapshotter: v7.0.2

Signed-off-by: Praveen M <m.praveen@ibm.com>
2024-04-25 18:58:00 +05:30
momantech 496afdbad3 docs: delete duplicate words and revise the names of some methods
delete duplicate words and revise the names of some methods

Signed-off-by: momantech <cuimoman@qq.com>
2024-04-25 15:43:40 +08:00
Travis Nielsen 1bde2ed8b1 Merge pull request #14124 from findmyhappy/master
core: fix function names in comment
2024-04-24 11:19:34 -06:00
findmyhappy c43c7aaf98 core: fix function names in comment
Some function names in the comments do not match. This PR will fix such problems.

Signed-off-by: findmyhappy <findhappy@sohu.com>
2024-04-24 21:04:58 +08:00
parth-gr 47ed6a8632 csi: create csi configmap if csi controller is disabled
Creating a cluster never succeeds if CSI driver is disabled
So to fix that we need to always create the csi configmap

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

Signed-off-by: parth-gr <partharora1010@gmail.com>
2024-04-24 18:06:09 +05:30
Steven Fackler 0c38dd81c2 operator: support custom dashboard service labels and annotations
Unlike other components, the Ceph dashboard Service object could not be
configured with custom labels and annotations. This can be useful when
integrating Rook into a cluster with custom controllers similarly to how
the RGW service is customized.

Signed-off-by: Steven Fackler <sfackler@gmail.com>
2024-04-23 15:28:19 -04:00
Travis Nielsen acd7b4faa0 osd: legacy osds on lvm pvcs crash on resize init container
OSDs on LVM-mode PVCs are failing to come up and crashing
in the expand-bluefs init container. To avoid the crash
and allow the OSDs to start, a workaround was found to
simply remove that init container. Now we disable the
OSD resize for this case to avoid others hitting this
during upgrade as well.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2024-04-19 16:26:45 -06:00
Blaine Gardner 605b9633ea csi: ensure correct csi config map owner during creation
In the primary CSI reconcile, ensure the CSI config map
(`rook-ceph-csi-config`) has the correct owner info.

This corrects any pre-existing config maps that might have incorrect
owner info, which has observed to include references to CephClusters.
The config map should only have a single reference, and it should refer
to the operator deployment.

If any existing Rook clusters have a CSI config map which has a
CephCluster as an owner, this change will ensure that the config map is
not deleted when the CephCluster is deleted. This is especially
important for any environments with multiple CephClusters installed.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
2024-04-18 12:53:48 -06:00
Blaine Gardner eb3278d575 csi: only create CSI config configmap in CSI reconciler
There have been some issues with non-CSI Rook controllers that are
creating the CSI config configmap (`rook-ceph-csi-config`). This causes
problems with the K8s OwnerReference. The primary CSI reconciler
(controller) creates the configmap with the correct owner reference,
which is supposed to be the operator deployment.

Other instances were creating the configmap with owner references set to
the CephCluster. This is a minor bug, but it can result in this
configmap being deleted along with the first CephCluster that initially
created it.

To fix this issue, remove all instances of `CreateCsiConfigMap()` except
the single usage which the CSI reconcile uses to initially create the
configmap. Other controllers that might have attempted to create this
configmap previously will return an error indicating that it is waiting
for the configmap to be created.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
2024-04-18 12:22:00 -06:00
Travis Nielsen a9fded2345 Merge pull request #14079 from BlaineEXE/load-cluster-owner-info-in-LoadClusterInfo
operator: load cluster owner info in LoadClusterInfo
2024-04-16 16:00:11 -06:00
Blaine Gardner bd9447ea4c operator: load cluster owner info in LoadClusterInfo
The CreateOrLoadClusterInfo (and therefore LoadClusterInfo) methods were
not loading the ClusterInfo.OwnerInfo. This should help future CRD
controllers get the full ClusterInfo struct without having missing
information. Current controllers that need ClusterInfo fill the field
themselves.

During testing, I observed one corner case where an upgraded cluster was
missing the `rook-ceph-csi-config` configmap. The cluster had a
CephFilesystemSubVolumeGroup resource created, and the reconcile for
that resource was attempting to create the missing CSI configmap and
failing with a nil pointer exception due to the missing OwnerInfo field
in ClusterInfo. This cluster condition hasn't been reproduced in healthy
environments, and it is unknown how the CSI configmap came to be
missing. However, the case did expose the missing loaded info as a
potential for causing nil pointer exceptions during corner cases when
code is otherwise correct.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
2024-04-16 13:09:39 -06:00
Travis Nielsen 61332caa4b Merge pull request #14049 from NymanRobin/crd-output-enhancements
operator: make CephBlockPoolRadosNamespace and CephFilesystemSubVolumeGroup get outputs more verbose
2024-04-16 12:00:15 -06:00
NymanRobin 70a7e61da5 operator: make crds outputs more verbose
The following printcolumns were added

CephBlockPoolRadosNamespace: Phase,
BlockPoolName, Age
CephFilesystemSubVolumeGroup: Phase,
FilesystemName, PinningConfig, Age

Also improved the error messages in
SubVolumeGroupClient

Signed-off-by: NymanRobin <nyman.robin@gmail.com>
2024-04-16 08:40:16 +03:00
Travis Nielsen 319a12fd18 Merge pull request #14042 from clonefetch/master
core: fix function names in comment
2024-04-15 11:35:33 -06:00
clonefetch 29ff8d9823 core: fix function names in comment
Signed-off-by: clonefetch <c0217@outlook.com>
2024-04-16 00:54:42 +08:00