Commit Graph
4282 Commits
Author SHA1 Message Date
Travis Nielsen a8a05d3741 Merge pull request #14492 from rook/mergify/bp/release-1.14/pr-14484
mgr: Properly detect if dashboard cert already exists to avoid unnecessary dashboard module restarts (backport #14484)
2024-07-24 14:22:47 -06:00
Travis Nielsen f4cd2261ec manifest: update the ceph recommended version to v18.2.4
Since Reef v18.2.4 is released, set it to the default
ceph version that is deployed with Rook.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit e26920a483)

# Conflicts:
#	deploy/examples/images.txt
2024-07-24 19:32:25 +00:00
Travis Nielsen f5a7f0eb0d mgr: properly detect if dashboard cert already exists
If the dashboard cert already exists when ssl is enabled,
we need to not restart the dashboard module. The module
should only be restarted when there is a change to the
dashboard configuration. When ssl is enabled, the dashboard
is essentially being restarted every time there is a reconcile
which is causing issues with the mgr getting blocklisted
unnecessarily by ceph during failover.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit 6ce616bf96)
2024-07-24 19:31:21 +00:00
Artem Torubarov 65ee4f9035 mgr: lookup cluster crd on active mgr watch
Signed-off-by: Artem Torubarov <artem.torubarov@clyso.com>
(cherry picked from commit 3f2d0eb1f8)
2024-07-24 16:56:57 +00:00
yite.gu 4b69af18a9 csi: make kube apiserver qps configurable
This commit adds the flexibility to configure kube apiserver qps
as per the user requirement and also keeps the existing values as
the default one.

Signed-off-by: yite.gu <yitegu0@gmail.com>
(cherry picked from commit 80541a23c9)
2024-07-16 12:28:17 -06:00
Blaine Gardner 91685f0a04 multus: reset validation tool debounce time to 30
Reset the Multus validation tool debounce time to its intended 30 second
value. It was changed to 5 for testing, and the change was accidentally
committed.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
(cherry picked from commit 5884f1c900)
2024-07-11 18:07:57 +00:00
Blaine Gardner 745ad91974 multus: add host checking to validation tool
In order to help users check that they have implemented the newly-added
Multus host configuration prerequisites, add a check to the validation
tool to verify connectivity.

Because users who are already running clusters with Multus enabled, add
a flag that allows users to only check for host configuration
prerequisites. This mode will not start the large number of clients that
would normally be started because those clients could disrupt a running
Rook cluster negatively.

Host checking pods require host network access. Many Kubernetes
distributions have pod security features enabled. In order to allow
non-Vanilla distros to run this tool, allow specifying a service account
that pods will run as, which can be configured by the admin to allow
test pods.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
(cherry picked from commit 33f5407dd4)

# Conflicts:
#	Documentation/CRDs/Cluster/network-providers.md
#	deploy/examples/multus-validation.yaml
2024-07-11 11:25:15 -06:00
Travis Nielsen af8b1769df pool: skip updating crush rules for stretch clusters
Pools in stretch clusters must all specify the same
CRUSH rule. No pools can use a different rule. When there
is a change in the device class, we do not even expect to update
the crush rules in a stretch cluster. Different device classes
are not supported in stretch clusters, and it's expected to be
a homogenous environment. Therefore, skip all crush rule updates
in stretch clusters.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit b92bbba671)
2024-07-10 12:31:43 -06:00
subham rai af459c9813 Merge pull request #14392 from rook/mergify/bp/release-1.14/pr-14391
build: update go-retryablehttp from 0.7.6 to 0.7.7 (backport #14391)
2024-06-28 11:29:11 +05:30
subhamkrai e910215c4e build: update go-retryablehttp from 0.7.6 to 0.7.7
this commit updates go-retryablehttp from 0.7.6 to 0.7.7
and without this govulcheck ci is failing.

Signed-off-by: subhamkrai <srai@redhat.com>
(cherry picked from commit 9fbf3d3)

Signed-off-by: subhamkrai <srai@redhat.com>
2024-06-28 10:45:45 +05:30
subham rai e92e7427ef Merge pull request #14371 from rook/mergify/bp/release-1.14/pr-14367
osd: Use old passphrase to kill the LUKS slot (backport #14367)
2024-06-28 10:27:16 +05:30
Blaine Gardner c8c51a25c6 Merge pull request #14378 from rook/mergify/bp/release-1.14/pr-14374
osd: fix activate failure when block device moves (backport #14374)
2024-06-26 14:28:37 -06:00
subhamkrai 5ff5356a3f 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>
(cherry picked from commit 4be450ae4b)
2024-06-25 15:38:34 +00:00
Blaine Gardner 2f5ea65d1d osd: fix activate failure when block device moves
Block devices can move between reboots. In corner cases, an OSDs block
device might move to a lower-indexed device while the previous device
does not exist. For example, an OSD on /dev/sde might move to /dev/sdd
on reboot if the original /dev/sdd died. There would be no /dev/sde
after that.

Users report that NVMe drives commonly change names, even when there are
no disk failures.

For these cases, ensure the activate script properly handles cases where
the previous disk is not present on the node and where the OSD is still
available on a different disk.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
(cherry picked from commit f2304bf8b8)
2024-06-25 14:08:24 +00:00
Niraj Yadav afad6aca63 osd: use old passphrase to kill the luks slot
While adding a new encryption key to slot 1
if there exists a key in slot 1 which is not
equal to the one we want to update it with,
we kill the slot and then add the new key to it.

While killing the slot, the existing code uses
the new key, which is not valid in such cases.

This patch modifies the code to use the key in
slot 0 (the one that we know works) to kill the slot.

Signed-off-by: Niraj Yadav <niryadav@redhat.com>
(cherry picked from commit b8b7af3495)
2024-06-24 07:24:36 +00:00
subhamkrai b37af76d85 osd: revert limit storageClassDeviceSets to 63 chars
This reverts commit 6f5cc9b01d.

Signed-off-by: subhamkrai <srai@redhat.com>
(cherry picked from commit e8aeb0d263)
2024-06-21 15:54:49 +00:00
subhamkrai f6eff6dc71 core: revert increase storage deviceset name limit to 50
This reverts commit 1dcc99ec1d.

Signed-off-by: subhamkrai <srai@redhat.com>
(cherry picked from commit c7d07562c4)
2024-06-21 15:54:48 +00:00
subhamkrai 7caf672b74 core: increase storage deviceset name limit to 50
initially, we have the limit of 40 char set on
storageclassdeviceset.Name but seems like that is not enough and
upgrade clusters can face issue with this. So, increasing the limit to
50.

Signed-off-by: subhamkrai <srai@redhat.com>
(cherry picked from commit 1dcc99ec1d)
2024-06-20 06:57:04 +00:00
Travis Nielsen fd28c8d805 monitoring: set honor labels on the service monitor
The endpoint property honorLabels: true should be set so that
different rgw instances can show separate prometheus
values instead of being aggregated.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit eed1033485)
2024-06-14 23:52:26 +00:00
Travis Nielsen a20981901b Merge pull request #14335 from rook/mergify/bp/release-1.14/pr-14331
core: Update go modules for snyk security check (backport #14331)
2024-06-13 11:55:22 -06:00
Travis Nielsen 04a7b46333 core: update go modules for snyk security check
The snyk security check started failing with a warning
about the package being outdated:
github.com/libopenstorage/secrets/azure which depends on
github.com/Azure/azure-sdk-for-go/sdk/azidentity.
These and related packages are now updated.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit c5fd5cd0b5)
2024-06-13 10:46:46 -06:00
Deepika Upadhyay 222776b2f1 pool: get the exact deviceClass name instead of crushroot+deviceClass
this lead to creation of 2 crush rules because of difference in
deviceClass names:
eg:
creating a new crush rule for changed deviceClass
("default~hdd"-->"hdd") on crush rule "test-crush-bug-az-ab-4"

Signed-off-by: Deepika Upadhyay <deepikaupadhyay01@gmail.com>
(cherry picked from commit 41116be919)
2024-06-12 22:14:34 +00:00
Travis Nielsen 72193e915a Merge pull request #14306 from rook/mergify/bp/release-1.14/pr-14302
multus: add and test ipv6 support for validation tool (backport #14302)
2024-06-06 10:38:34 -06:00
Travis Nielsen dec8fed5dc mon: allow overriding the mon endpoint with annotation
For an advanced network configuration, the mon endpoints
expected for the ceph public network may be different from
the public IP address that is set on the K8s node. When
host networking is enabled in rook, the IP address of the
node was only allowed previously. Now, the IP address
used for a mon when scheduled on a node can be determined
by setting an annotation on each node where mons can run:
    network.rook.io/mon-ip: <ip-address>
This annotation must be set before the mons are created.
Mon endpoints cannot be changed after they are already
running.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit e90ed3b912)
2024-06-06 15:31:01 +00:00
Blaine Gardner 424b1a6da3 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>
(cherry picked from commit 08a27940ed)
2024-06-04 19:20:31 +00:00
Michael Adam 86bb07831e 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>
(cherry picked from commit 823df7be98)
2024-05-31 17:58:32 +00:00
Travis Nielsen ad70539d28 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>
(cherry picked from commit e479b051bc)
2024-05-30 18:52:35 +00:00
Travis Nielsen 0b4b3501b8 Merge pull request #14239 from rook/mergify/bp/release-1.14/pr-14234
core: remove owner refs in resource cleanup jobs (backport #14234)
2024-05-30 12:27:44 -06:00
Travis Nielsen 6642e74754 Merge pull request #14280 from rook/mergify/bp/release-1.14/pr-14232
mgr: setting balancer mode from cluster spec. (backport #14232)
2024-05-30 12:25:52 -06:00
sp98 ad9f34bdd5 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>
(cherry picked from commit 1ad37ecce9)
2024-05-29 16:45:02 +00:00
Brian Dowling 44c4eb378c 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>
(cherry picked from commit ef0ed93134)
2024-05-28 16:21:52 +00:00
subhamkrai df1ae9a223 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>
(cherry picked from commit 85c25bbc6e)
2024-05-27 06:42:40 +00:00
Blaine Gardner ccafc2b715 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>
(cherry picked from commit 573a47e736)
2024-05-23 13:32:05 +00:00
sp98 c556842e19 core: remove owner refs in resource cleanup jobs
Removed owner reference from Radosnamespace and
subVolumeGroup cleanup resources.

Signed-off-by: sp98 <sapillai@redhat.com>
(cherry picked from commit c98fc86918)
2024-05-18 16:03:12 +00:00
sp98 4fd104974f 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>
(cherry picked from commit 33ce8f0c8e)
2024-05-17 14:44:29 +00:00
Satoru Takeuchi d50517a316 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>
(cherry picked from commit f776c0b35e)
2024-05-15 23:45:02 +00:00
Travis Nielsen 5a34cd9f9e 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>
(cherry picked from commit 3628e83892)
2024-05-13 14:31:14 +00:00
Redouane Kachach da909b6da7 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>
(cherry picked from commit ee7c71c89e)
2024-05-06 19:00:43 +00:00
Blaine Gardner 9a58da323d 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>
(cherry picked from commit 4ff881240f)
2024-05-03 18:10:30 +00:00
subhamkrai 578f582c34 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>
(cherry picked from commit 6f5cc9b01d)
2024-05-03 13:30:13 +00:00
Travis Nielsen 2fda1a74b6 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>
(cherry picked from commit 954b000ba6)
2024-05-01 21:39:12 +00:00
Travis Nielsen fff583b4b3 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>
(cherry picked from commit 25d36c4c75)
2024-05-01 21:39:11 +00:00
subhamkrai 3af95231e2 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>
(cherry picked from commit d23a8433ed)
2024-04-25 16:40:56 +00:00
Praveen M affdd02f1c 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>
(cherry picked from commit faf7837621)
2024-04-25 08:43:50 -06:00
mergify[bot] 54275ecb1a Merge pull request #14127 from rook/mergify/bp/release-1.14/pr-14125
csi: create csi configmap if csi controller is disabled (backport #14125)
2024-04-24 15:18:36 +00:00
parth-gr 91292df78b 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>
(cherry picked from commit 47ed6a8632)
2024-04-24 14:51:48 +00:00
Steven Fackler a60dfda70f 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>
(cherry picked from commit 0c38dd81c2)
2024-04-23 20:22:54 +00:00
Travis Nielsen d0fbec4b8d 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>
(cherry picked from commit acd7b4faa0)
2024-04-22 03:35:11 +00:00
Blaine Gardner 9ca7cfc1c1 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>
(cherry picked from commit 605b9633ea)
2024-04-18 20:18:23 +00:00
Blaine Gardner 03c601349a 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>
(cherry picked from commit eb3278d575)
2024-04-18 20:18:22 +00:00