Commit Graph
4171 Commits
Author SHA1 Message Date
subhamkrai dbe1c0988d build: update go mod files
updating go.mod and pkgs/apis/go.mod file with
latest updates.

Signed-off-by: subhamkrai <srai@redhat.com>
2024-02-19 18:15:09 +05:30
Travis Nielsen 04a5fd6ab5 Merge pull request #13744 from travisn/pool-application
pool: Allow setting the application on a pool
2024-02-15 09:55:35 -07:00
Travis Nielsen 73f22c38fb Merge pull request #13766 from travisn/pg-autoscaler-remove
mgr: Remove remaining pg_autoscaler examples
2024-02-15 07:49:48 -07:00
travisn 806608cdbc pool: allow setting the application on a pool
Rook has been setting the application automatically on all
pools to rbd for CephBlockPools, rook-ceph-rgw for
CephObjectStores, mgr on the built-in .mgr pool,
and nfs on the built-in .nfs pool.

The legacy pool device_health_metrics is long gone
from Pacific which is no longer supported, so we can
remove special handling for that pool in the upgrade
guide and in the code.

The application setting is now available on the pool spec
although it is not expected to commonly need to override
the default applications set by Rook.

The application for CephFilesystem pools is now being
set to cephfs, where it was previously blank.

Signed-off-by: travisn <tnielsen@redhat.com>
2024-02-14 16:53:25 -07:00
travisn ef13dd3edc mgr: remove remaining pg_autoscaler examples
The pg_autoscaler is always enabled by ceph and cannot be disabled.
In a previous PR the pg_autoscaler config was removed from the main example.
Now the remaining config for the pg_autoscaler is removed as well.

Signed-off-by: travisn <tnielsen@redhat.com>
2024-02-14 11:13:29 -07:00
Madhu Rajanna ca21bd9715 core: retry other pvc if active client not found
retry other cephfs/rbd pvc if there
are no active clients found on ceph cluster.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2024-02-14 19:01:46 +01:00
Madhu Rajanna eb97390df2 core: use error wraping in fenceCephFSVolume
to keep the code consistent and to propogate
more details about error rook uses error wraping.
updating current code whereever its required to
wrap the details.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2024-02-14 11:04:50 +01:00
Madhu Rajanna 0e115c44bf core: fix cephfs pvc network fencing
The cephfs PVC might exist on the kubernetes
node object but due to some timing issues the
ip might not be visible on the ceph cluster or
the client might already got evicted or disconnected
from ceph cluster. In this case we will not be
able to get IP details for the subvolume and we dont
have any check for empty ip's in the code and rook
tries to create NetworkFence CR with empty Ip's
and the NetworkFence will get moved to the Failed state.
This PR adds the necessary check and logging to prevent
this one.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2024-02-14 11:04:43 +01:00
dependabot[bot] 650e71ac22 build(deps): bump the github-dependencies group with 2 updates
Bumps the github-dependencies group with 2 updates: [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) and [github.com/hashicorp/vault/api](https://github.com/hashicorp/vault).

Updates `github.com/aws/aws-sdk-go` from 1.50.12 to 1.50.15
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.50.12...v1.50.15)

Updates `github.com/hashicorp/vault/api` from 1.11.0 to 1.12.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.11.0...v1.12.0)

---
updated-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
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-13 15:52:47 -07:00
Travis Nielsen 29b7bd9715 Merge pull request #13718 from subhamkrai/remove-namespace-from-networkFence
core: Delete networkFence CRs during cluster removal
2024-02-13 14:54:36 -07:00
subhamkrai 5bff860380 core: remove namespace/ownerRef from networkFence
since networkFence is a cluster-based resource so that we don't need
the namespace and ownerReferences as it cause garbage-collector errors.
Also, now we create the networkFence with clusteUID label so when doing
cleanup we match the cephCluster uid and networkFence label clusterUID.

Signed-off-by: subhamkrai <srai@redhat.com>
2024-02-13 21:47:04 +05:30
Travis Nielsen 932400aeb8 Merge pull request #13741 from rkachach/fix_issue_13719
mgr: remove privileged security context from mgr sidecar container
2024-02-13 07:58:15 -07:00
Travis Nielsen 1a3d242cc6 Merge pull request #13693 from obnoxxx/disallow-legacy-and-provider
Disallow legacy hostNetwork  together with  non-default provider
2024-02-13 07:14:20 -07:00
subham rai e7969ff9ab Merge pull request #13613 from iPraveenParihar/fix/issue-13580
csi: update netNamespaceFilePath for all clusterIDs
2024-02-13 18:48:10 +05:30
Redouane Kachach db4b3322fa mgr: remove privileged security context from mgr sidecar container
Mgr sidecar was using a privileged security context because it needed
to create the /var/lib/rook directory, generate the config on it, and
then copy it to the /etc/ceph directory. This change creates empty
directories on /var/lib/rook and /etc/ceph so the mgr sidecar can use
them, removing the need for using a privileged security context.

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

Signed-off-by: Redouane Kachach <rkachach@redhat.com>
2024-02-13 14:03:39 +01:00
Michael Adam 25aa15e6c1 network: disallow legacy hostNetwork together with non-default provider
Fixes: #13692

Since the introduction of the "host" network provider, the  legacy
"hostNetwork" setting is intended to be used only in combination with
the default network provider (""), but the code did not enforce this.

This change adds the required validation checks to throw errors
in invalid constellations.

These checks are added both in the operator's input  validation code
and as kubernetes x-validation admission policies in the Cepcluster CRD.

Signed-off-by: Michael Adam <obnox@samba.org>
2024-02-12 22:22:48 +01:00
Travis Nielsen 5ce7fd97bd Merge pull request #13736 from Madhu-1/csi-3.10.2
csi: update cephcsi image to 3.10.2
2024-02-09 11:20:10 -07:00
Travis Nielsen 142ac703d7 Merge pull request #13665 from iPraveenParihar/remove/CSI_ENABLE_READ_AFFINITY
csi: remove CSI_ENABLE_READ_AFFINITY
2024-02-09 07:46:27 -07:00
Madhu Rajanna c22597a32c csi: update cephcsi image to 3.10.2
Updating the cephcsi image to 3.10.2
which is the latest released one.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2024-02-09 08:21:05 +01:00
Satoru Takeuchi f1aa4f37cf Merge pull request #13314 from microyahoo/partition
osd: support create osd with metadata partition
2024-02-09 06:19:14 +09:00
Travis Nielsen ebcb0a424f Merge pull request #13728 from subhamkrai/remove-ownerRef-nf
core: remove ownerRef from networkFence
2024-02-08 11:26:16 -07:00
subhamkrai 2ac418a3b2 core: remove ownerRef from networkFence
since networkFence is a cluster-based resource so that we don't need
the namespace and ownerReferences as it cause garbage-collector errors.

Signed-off-by: subhamkrai <srai@redhat.com>
2024-02-08 23:12:39 +05:30
Liang Zheng ee05e82cea osd: support create osd with metadata partition
Currently, when rook provisions OSDs(in the OSD prepare job), rook effectively run a
c-v command such as the following.
```console
ceph-volume lvm batch --prepare <deviceA> <deviceB> <deviceC> --db-devices <metadataDevice>
```
but c-v lvm batch only supports disk and lvm, instead of disk partitions.

We can resort to `ceph-volume lvm prepare` to implement it.

Signed-off-by: Liang Zheng <zhengliang0901@gmail.com>
2024-02-07 11:34:09 +08:00
Satoru Takeuchi 753bbfe1c4 osd: correct counting the devices when metadataDevice is set
The validation logic of checking the number of devices is
wrong when `metadataDevice` is set and `osdsPerDevice` > 1.
`len(cvReports)` is the expected number of OSDs and is
the number of specified data devices multiplied
by `osdsPerDevice`.

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

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2024-02-07 00:17:48 +00:00
Travis Nielsen 4e0c4f6ea3 Merge pull request #13511 from ushitora-anqou/set-pdb-even-if-pgs-remain-active-clean
core: set blocking PDB even if no unhealthy PGs appear
2024-02-06 11:45:27 -07:00
Praveen M d28febaa61 csi: remove CSI_ENABLE_READ_AFFINITY
This commit removes the `CSI_ENABLE_READ_AFFINITY` since
it is no longer utilized after addition of the read affinity
option per cluster via CSIDriverSpec.

Signed-off-by: Praveen M <m.praveen@ibm.com>
2024-02-06 20:21:57 +05:30
Travis Nielsen 7f7e8d44fa Merge pull request #13623 from thotz/ceph-cosi-driver-name-namespace-check
object: add check specific to name and namespace for ceph cosi driver
2024-02-05 09:01:18 -07:00
Travis Nielsen 73427c9091 Merge pull request #13615 from riya-singhal31/node-name
csi: update network fence CR name
2024-02-05 07:10:49 -07:00
travisn 0240ee8563 core: skip reconcile if override configmap is empty
If the configmap rook-config-override is empty,
there is no need to trigger the reconcile to update
the ceph daemons. This configmap update is causing
unnecessary reconciles periodically in some clusters
even when it is empty.

Signed-off-by: travisn <tnielsen@redhat.com>
2024-02-01 14:29:20 -07:00
Travis Nielsen 60d6fe5362 Merge pull request #13663 from iPraveenParihar/fix/netNamespaceFilePath-generation
csi: Fix NetNamespaceFilePath generation with namespace instead of name
2024-02-01 09:32:33 -07:00
Travis Nielsen e39ee8caba Merge pull request #13653 from travisn/exporter-delete-ns
exporter: Don't delete exporter service on daemon deletion
2024-02-01 09:30:32 -07:00
subham rai 949016d53a Merge pull request #13639 from rook/dependabot/go_modules/github-dependencies-99794afd47
build(deps): bump the github-dependencies group with 5 updates
2024-02-01 16:33:35 +05:30
Praveen M f67bbc834b csi: fix netNamespaceFilePath addition and removal for all clusterIDs
This commit resolves the issue where the netNamespaceFilePath
was not being updated for all clusterIDs present in the csi configMap.

Signed-off-by: Praveen M <m.praveen@ibm.com>
2024-02-01 12:46:55 +05:30
Praveen M 67ff924b57 csi: fix NetNamespaceFilePath generation
Corrected the NetNamespaceFilePath generation in the
subvolumegroup & radosnamespace controller by replacing
the cephCluster.Name with cephCluster.Namespace.

Signed-off-by: Praveen M <m.praveen@ibm.com>
2024-02-01 11:24:08 +05:30
dependabot[bot] 6cdb48e989 build(deps): bump the github-dependencies group with 5 updates
Bumps the github-dependencies group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) | `1.50.0` | `1.50.5` |
| [github.com/google/uuid](https://github.com/google/uuid) | `1.5.0` | `1.6.0` |
| [github.com/hashicorp/vault/api](https://github.com/hashicorp/vault) | `1.10.0` | `1.11.0` |
| [github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring](https://github.com/prometheus-operator/prometheus-operator) | `0.71.0` | `0.71.2` |
| [github.com/prometheus-operator/prometheus-operator/pkg/client](https://github.com/prometheus-operator/prometheus-operator) | `0.71.0` | `0.71.2` |

Updates `github.com/aws/aws-sdk-go` from 1.50.0 to 1.50.5
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.50.0...v1.50.5)

Updates `github.com/google/uuid` from 1.5.0 to 1.6.0
- [Release notes](https://github.com/google/uuid/releases)
- [Changelog](https://github.com/google/uuid/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/uuid/compare/v1.5.0...v1.6.0)

Updates `github.com/hashicorp/vault/api` from 1.10.0 to 1.11.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.10.0...v1.11.0)

Updates `github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring` from 0.71.0 to 0.71.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.71.0...v0.71.2)

Updates `github.com/prometheus-operator/prometheus-operator/pkg/client` from 0.71.0 to 0.71.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.71.0...v0.71.2)

---
updated-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/google/uuid
  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/prometheus-operator/prometheus-operator/pkg/apis/monitoring
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-dependencies
- dependency-name: github.com/prometheus-operator/prometheus-operator/pkg/client
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-31 16:41:12 -07:00
Travis Nielsen 6739e32d33 Merge pull request #13644 from rkachach/fix_issue_13594
mgr: use the ac-user-set-password cmd to update the password
2024-01-31 08:45:36 -07:00
Travis Nielsen 2f82d0a520 Merge pull request #13655 from parth-gr/objectstore-fix-zonegroup
object: fix the default multisite zonegroup creation
2024-01-31 07:56:54 -07:00
Jiffin Tony Thottan 5b5e1c0292 object: add check specific to name and namespace for ceph cosi driver
The name for cephcosi driver should be ceph-cosi-driver and namespace
should same as the rook operator. Otherwise request need to be failed.

Fixes: #13025
Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
2024-01-31 11:32:47 +05:30
parth-gr a9c77280c6 object: fix the deafult multisite zonegroup creation
there was a bug in the code which doesn't
sets realm if we try to get the zonegoup
so because of that 1.12 this backport pr
for original change was not working

Signed-off-by: parth-gr <partharora1010@gmail.com>
2024-01-31 10:06:44 +05:30
travisn a1fc70f2fc exporter: dont delete exporter service on daemon deletion
The exporter service and service monitor should not
be deleted if an individual daemon is being removed
from a node. As long as the exporter is enabled with
v18 and newer, the exporter service and service monitor
should exist. Clusters were seeing their metrics stop
collection when the exporter service and service monitor
would disappear, especially when multiple clusters are
configured.

Signed-off-by: travisn <tnielsen@redhat.com>
2024-01-30 16:23:10 -07:00
Redouane Kachach cb028f3a28 mgr: use the ac-user-set-password cmd to update the password
previous code was calling the following command to create the
dashboard user:
> ceph dashboard ac-user-create <username> -i <password-file>
this works the first time when the user doesn't exist, however subsequent
calls for example when the password has changed or when the secret was
deleted from k8s, will not take place as this command will succeeded
because the user already exists but the password is not updated in
this case. The fix consists in adding an explicit call to the command:
> ceph dashboard ac-user-set-password <username> -i <password-file>
which ensures the password is updated correctly in the access control db

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

Signed-off-by: Redouane Kachach <rkachach@redhat.com>
2024-01-30 18:04:44 +01:00
Blaine Gardner 8802648456 Merge pull request #13621 from thotz/cosicrdupdate
object: watch updates for cosidriver crd
2024-01-30 09:06:29 -07:00
Travis Nielsen 3b1a428688 Merge pull request #13622 from Madhu-1/csi-name-prefix
csi: option to customize csi driver name prefix
2024-01-29 10:55:55 -07:00
Jiffin Tony Thottan 3da2331fa3 object: watch updates for cosidriver crd
The changes made to cosi driver are reflected. Add the cosidriver crd to
predicate workflow.

Fixes: #12545
Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
2024-01-29 22:15:21 +05:30
Madhu Rajanna c35a8532aa csi: option to customize csi driver name prefix
For now we are using the operator namespace name
as the prefix for the csi driver, This PR provides
an option for the users if someone wants to have
their own prefix for the csi driver, if someone tries
to change the prefix for existing csi driver rook
operator will fail to reconcile the csi driver.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2024-01-29 10:54:25 +01:00
Travis Nielsen f85ba88089 Merge pull request #13604 from rkachach/fix_issue_13577
mgr: fixing dashboard configuration handling
2024-01-25 18:51:50 -07:00
Redouane Kachach 39c06d2fa5 mgr: adding logic to keep retrying in case mgr config delete fails
we dont set removeMgrDaemonConfiguration to true unless all the
delete operations went successfull.

Signed-off-by: Redouane Kachach <rkachach@redhat.com>
2024-01-25 21:55:13 +01:00
Riya Singhal c2e3cf367c csi: update network fence CR name
this commit updates the name of network fence CR to
node name + driver name, which will allow the creation of
multiple network fence per drivers on the same node, and
modifies the unit test and deletion procedure for the
same.

Signed-off-by: Riya Singhal <rsinghal@redhat.com>
2024-01-26 00:18:00 +05:30
subhamkrai f8af64ae02 test: update unit test to add TypeMeta
with controller runtime v0.17.0, fake client
set TypeMeta for unstructured only, for other
types we need to add TypeMeta.

Signed-off-by: subhamkrai <srai@redhat.com>
2024-01-25 18:56:59 +05:30
subhamkrai 38004bd355 build: update go dependencies
updating go dependencies, like kubernetes api, controller runtime, NAD
client.

Signed-off-by: subhamkrai <srai@redhat.com>
2024-01-25 18:55:29 +05:30