Commit Graph
3475 Commits
Author SHA1 Message Date
Madhu Rajanna d15d61e44e csi: change sidecar images repo to new link
Change sidecar images repo to registry.k8s.io
which is a redirect to k8s.gcr.io.

Ref: https://github.com/kubernetes/k8s.io/wiki/
New-Registry-url-for-Kubernetes-(registry.k8s.io)

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 15da42cf0c)
2022-06-06 12:50:03 -06:00
mergify[bot] b4923adde4 Merge pull request #10393 from rook/mergify/bp/release-1.9/pr-10373
osd: do not hide the error (backport #10373)
2022-06-06 07:57:59 +00:00
Sébastien Han fcf7943883 osd: do not hide the error
Return the error instead of hiding it, err could be non-nil for a lot of
reasons, eg: a canceled context or a non-existing object.

Signed-off-by: Sébastien Han <seb@redhat.com>
(cherry picked from commit 219e017564)
2022-06-06 07:31:19 +00:00
Sébastien Han 4cead01d96 csi: do not block the reconcile if all clusters are not ready
If some clusters don't have their monitors up and running, we don't have
a clusterInfo (internal detail struct). We don't want to block the csi
controller reconcile if all the clusters are not ready. So let's proceed
with the elements that are ready and reconcile again to see if others
have made progress.

Signed-off-by: Sébastien Han <seb@redhat.com>
(cherry picked from commit 95b2e60679)
2022-06-06 07:25:09 +00:00
Travis Nielsen 6c347e1348 pool: delete ceph pool when blockpool cr is deleted
During deletion of a CephBlockPool CR, the underlying ceph
pool was not being deleted. During the deletion sequence
this is due to the spec being refreshed upon a call to
check for dependents in ReportDeletionNotBlockedDueToDependents().
The pool name was then coming up blank during the deletion
request and rook of course then wasn't finding the pool
to delete.

Now Rook properly sets the pool name in the named spec
every time it is converted internally from a CephBlockPool
type to a NamedPoolSpec.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit e3ca5bfbcc)
2022-06-03 14:33:42 +00:00
Prasanna Kumar Kalever d98c6962bc csi: add --extra-create-metadata arg to csi sidecars
This argument in csi-provisioner and csi-snapshotter sidecar allows us
to receive additional metadata in the CreateVolume and CreateSnapshot()
request.

For ex:
as part of CreateVolume request:
csi.storage.k8s.io/pvc/name
csi.storage.k8s.io/pvc/namespace
csi.storage.k8s.io/pv/name

and
as part of CreateSnapshot request:
csi.storage.k8s.io/volumesnapshot/name
csi.storage.k8s.io/volumesnapshot/namespace
csi.storage.k8s.io/volumesnapshotcontent/name

This is useful information which can be used depend on the use case we have
at our csi driver level. The features like adding metadata to CephFS subvolume,
RBD image or snapshot can consume this based on the need.

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
(cherry picked from commit 1666ce2d9c)
2022-05-31 13:59:42 +00:00
Sébastien Han b67a949a50 osd: remove broken argument
During the tini's binary removal you overlooked that scenario and
introduced a bug in the OSD startup line.
We were passing the binary path as an argument, which is obviously wrong
and makes the OSD crash at boot.

Signed-off-by: Sébastien Han <seb@redhat.com>
(cherry picked from commit f79de7d69a)
2022-05-23 15:56:55 +00:00
Blaine Gardner a3a5d7d0d7 operator: rename telemetry rook-version to rook/version
The Rook and Ceph teams settled on using slashes to separate Rook
telemetry items into a hierarchy in https://github.com/rook/rook/pull/10254.
Rename the config-key used to `rook/version`, and create a `telemetry`
package to define the telemetry key constants.

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
(cherry picked from commit 6888d545d2)
2022-05-19 00:11:12 +00:00
mergify[bot] 71570f5871 Merge pull request #10261 from rook/mergify/bp/release-1.9/pr-10246
osd: exit immediately if pvc block has not changed (backport #10246)
2022-05-12 18:22:11 +00:00
mergify[bot] efaee7da68 Merge pull request #10260 from rook/mergify/bp/release-1.9/pr-10161
operator: set 'rook-version' in mon k/v store (backport #10161)
2022-05-12 18:13:55 +00:00
Sébastien Han 8b4d6c6709 osd: exit immediately if pvc block has not changed
We don't need to run any `cp` command since a destination path already
exists. Using `--no-clobber` is not needed and it results in a noop
anyways.
Instead, let's print the reason why we exit the container.

Signed-off-by: Sébastien Han <seb@redhat.com>
(cherry picked from commit 4234216db8)
2022-05-12 17:52:19 +00:00
Blaine Gardner 53330e4934 operator: set 'rook-version' in mon k/v store
Ceph upstream telemetry (which Rook users could optionally enable via
Ceph CLI or Dashboard) does not easily identify if a cluster is managed
by Rook. Identifying Rook clusters is possible only if users also enable
the rook mgr module, which is optional and not often used.

To get better upstream insights into Ceph clusters managed by Rook, set
a new 'rook-version' field in Ceph's generic k/v store. This field can
be used to determine if a cluster is managed by Rook by its presence.
It additionally provides information about the Rook version used to
manage the cluster, which is another piece of potentially useful
information.

Regarding Ceph cluster identification via telemetry:
Ceph telemetry is anonymous and uses a different ID from the Ceph
cluster ID. Identifying the Rook version in telemetry does not add
directly identifying information. Therefore, there should be little
risk that adding the Rook version field will decrease anonymity of Ceph
clusters via telemetry.

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
(cherry picked from commit 94b622c302)
2022-05-12 16:49:33 +00:00
Travis Nielsen 07e42b789e osd: allow the osd to take a long time to start
The startup probe for the OSD has been too aggressive to kill the OSD
in case the OSD is taking some time to start. The OSD may be self-optimizing,
scrubbing, or some other internal operation before it is ready to start.
Rather than disable the startup probe completely, the default is now
to retry for two hours in case the OSD is performing those operations.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit 28e721d877)
2022-05-12 16:25:30 +00:00
mergify[bot] c12571745d Merge pull request #10205 from rook/mergify/bp/release-1.9/pr-10172
mon: quorumStatus.MonMap.Mons changed to quorumStatus.Quorum (backport #10172)
2022-05-12 14:19:35 +00:00
subhamkrai e582035c88 webhook: update the check-in cluster spec validation
we should iterate older clusters spec instead of
new cluster spec since in case of new storageClassdeviceset
added in spec. The total count of the new clusters and older
spec cluster is will not be the same and we'll get panic.

Closes: https://github.com/rook/rook/issues/10222
Signed-off-by: subhamkrai <srai@redhat.com>
(cherry picked from commit 0c593d5420)
2022-05-10 14:14:03 +00:00
Sébastien Han 891a56e752 core: add mountpoint detection to the prepare pod
Amount various filters let's add a mountpoint property and skip the
device if its filesystem is mounted.

Signed-off-by: Sébastien Han <seb@redhat.com>
(cherry picked from commit 8328ec6d31)
2022-05-10 00:07:58 +00:00
Sébastien Han c2f7e85126 core: add more debug info to the prepare pod
When running the device property commands, let's also log their results
for better debugging/visibility.

Signed-off-by: Sébastien Han <seb@redhat.com>
(cherry picked from commit 77b2e10c14)
2022-05-10 00:07:58 +00:00
Sébastien Han b75364f19e core: append filesystem property on disk
When detecting the device property the filesystem was not passed but
used later to validate if the device should be taken or not. Now we read
the filesystem info from "lsblk" and populate it in the device type.

Closes: https://github.com/rook/rook/issues/9470
Signed-off-by: Sébastien Han <seb@redhat.com>
(cherry picked from commit 8c1bf0f3f0)
2022-05-10 00:07:58 +00:00
Satoru Takeuchi 573b4dfe62 osd: fix disk uuid management
- disk UUID should only be got for "disk" type device.
- It's not necessary to fail prepare job when failing to get disk UUID
- We should consider that `sgdisk` reports UUID even if there is no GPT.

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

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
(cherry picked from commit 4c46dd1abd)
2022-05-09 10:05:38 +00:00
FengJiankui f9620ad594 mon: quorumStatus.MonMap.Mons changed to quorumStatus.Quorum
The path use quorum instead of monMap to determine if there is enough mon. (bug #10165).

Signed-off-by: FengJiankui <fengjiankui@inspur.com>
(cherry picked from commit d335dc59eb)
2022-05-04 15:26:23 +00:00
Sébastien Han e1e89d5df2 osd: close the encrypted disk after cleanup is done
Once we are done cleaning up the content of the encrypted osd, let's
close the main LUKS device.
This avoids having dm devices on the system after the cleanup.

Closes: https://github.com/rook/rook/issues/10181
Signed-off-by: Sébastien Han <seb@redhat.com>
(cherry picked from commit 6ef491d9fc)
2022-05-04 09:13:45 +02:00
Alexander Trost cf139d2fc8 rgw: fix dashboard admin creation for multiple object stores
Check the radosgw-admin realm user list per object store instead of relying
on the ceph dashboard get-rgw-api- command.

Resolves #9099

Signed-off-by: Alexander Trost <galexrt@googlemail.com>
(cherry picked from commit 5d03061d47)
Signed-off-by: Alexander Trost <galexrt@googlemail.com>
2022-04-27 20:08:26 +02:00
Sébastien Han 7503d1a558 core: fix csi-cephfsplugin pod restart on non-hostnetworking env
Implementation of the design proposed in
https://github.com/rook/rook/pull/9903.

Signed-off-by: Sébastien Han <seb@redhat.com>
(cherry picked from commit 73b1347675)
2022-04-27 09:42:39 +00:00
Sébastien Han 4079a66a8d core: move clusterInfo code to the controller package
The CSI package needs to load clusterInfo, today this code is in the mon
package which makes the call of LoadClusterInfo impossible without
having a circular import.

Signed-off-by: Sébastien Han <seb@redhat.com>
(cherry picked from commit 583791c45c)
2022-04-27 09:42:39 +00:00
Jiffin Tony Thottan 6edbd1bcb8 object: allocate keys for user after the creation
The access/secrets keys for the user struct need to allocate only if
ceph user creation succeeds.

Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
(cherry picked from commit 60da73a786)
2022-04-26 22:06:04 +00:00
Travis Nielsen e4cc14f70d build: update min version to k8s 1.17
Support is removed for k8s for various limitations such as
priority classes not working and csi driver feature
incompleteness and missing snapshots. Documentation is updated
with the new min version of k8s 1.17 and also the tests are
updated to run on the min version of 1.17.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit d26b6cf403)
2022-04-26 13:02:34 -06:00
mergify[bot] 89f8f1882d Merge pull request #10155 from rook/mergify/bp/release-1.9/pr-10139
core: RGW realm pull spec is optional (backport #10139)
2022-04-25 14:17:56 +00:00
Travis Nielsen 07ea7139eb core: rgw realm pull spec is optional
The endpoint on the rgw realm pull spec is causing a failure
if not specified even when it is not expected to be
required. Now the endpoint has the json property to be
ommitted if not specified.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit 7f709776b5)
2022-04-25 13:49:58 +00:00
Sébastien Han fbca65c738 csi: update cephcsi to v3.6.1 release
A new Ceph-CSI release is out so let's use it.

Signed-off-by: Sébastien Han <seb@redhat.com>
(cherry picked from commit 1093b0a166)
2022-04-25 09:05:38 +00:00
mergify[bot] 0d7b63d6a7 Merge pull request #10138 from rook/mergify/bp/release-1.9/pr-10124
csi: move setting csi param to setParams (backport #10124)
2022-04-24 12:12:47 +00:00
Madhu Rajanna 2a3a90c34f csi: add/remove mon IP from csi config
If a mon is added or removed in a ceph
cluster all the CSI clusterID's belongs
to the ceph cluster should also gets updated.

Added a new cluster identifier to the csi configmap,
i.e ceph clusterNamespace which helps to identify
the clusterID's belongs to that ceph cluster.

Note:- to support the upgraded clusters,we
can ask users to update the mon IP's for the
problamatic clusterID as it wont be updated
by the operator.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 8ab17e3b83)
2022-04-22 17:57:11 +00:00
Madhu Rajanna 5febd0de26 csi: move setting csi param to setParams
moving setting csi parameter to setParams
function as `setParams` is mostly used to set
the csi parameters for the templates.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit c255e35225)
2022-04-22 13:59:59 +00:00
Travis Nielsen 81a9bc4894 Merge pull request #10117 from rook/mergify/bp/release-1.9/pr-10111
subvolumegroup: refractor subvolumegroup controller (backport #10111)
2022-04-20 13:54:39 -06:00
subhamkrai 5328491880 core: make code changes to support latest cntrl runtime
making necessary code changes to support controller
runtime version.

Signed-off-by: subhamkrai <srai@redhat.com>
(cherry picked from commit bf7daccf60)
2022-04-20 17:52:53 +00:00
Madhu Rajanna 7c6c1beb59 subvolumegroup: refractor subvolumegroup controller
improved the logging and also reorganized code to
handle external and non external cases for better
code readability.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 541d63d31e)
2022-04-20 17:50:10 +00:00
Madhu Rajanna d4be1ee1c7 csi: use k8s.gcr.io for csi nfsplugin image
use k8s.gcr.io like other kubernetes sidecar
image to pull the nfsplugin image.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 52c8211e43)
2022-04-20 14:02:22 +00:00
mergify[bot] be2fb09893 Merge pull request #10104 from rook/mergify/bp/release-1.9/pr-9940
csi: add CSI encryption support (backport #9940)
2022-04-19 20:28:55 +00:00
mergify[bot] 8e38edd718 Merge pull request #10102 from rook/mergify/bp/release-1.9/pr-10094
build: update golang version to v1.17 (backport #10094)
2022-04-19 20:27:39 +00:00
Travis Nielsen b2815830c4 Merge pull request #10103 from rook/mergify/bp/release-1.9/pr-10074
csi: make GRPC timeout configurable (backport #10074)
2022-04-19 14:09:12 -06:00
Rakshith R 1f9a614e08 csi: add CSI encryption support
Ceph-CSI supports LUKS encryption for RBD volumes.
This commit adds support for the same by adding capability
of mounting required `rook-ceph-csi-kms-config` configmap
into csi-rbdplugin-provisioner and nodeplugin pods.
Required documentations, helm charts and examples yamls
are also updated.

Resolved: #7032

Signed-off-by: Rakshith R <rar@redhat.com>
(cherry picked from commit 2e18d5bbaa)
2022-04-19 15:27:31 +00:00
mergify[bot] b56c959350 Merge pull request #10092 from rook/mergify/bp/release-1.9/pr-10088
osd: Enable quincy osd release version (backport #10088)
2022-04-19 14:12:29 +00:00
Madhu Rajanna b85c79f9df csi: make GRPC timeout configurable
setting the GRPC timeout configurable helps
in some cases where ceph cluster takes more time
to respond.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 54de442e22)
2022-04-19 13:55:22 +00:00
subhamkrai 5ad92bd548 build: update golang version to v1.17
update golang version to v1.17

Signed-off-by: subhamkrai <srai@redhat.com>
(cherry picked from commit 81d696652d)
2022-04-19 13:25:59 +00:00
Madhu Rajanna 9f0281a40e block: validate updating name in BlockPool CR
Currently we are allowing users to change the name
of the pool to be created in the BlockPool CR. with
this we have a bug of leaving stale resources in the
cluster. With new changes we are blocking the update
of the pool name in the BlockPool CR.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 99224ad102)
2022-04-19 13:05:33 +00:00
Travis Nielsen 9b2bef7334 osd: enable quincy osd release version
After all OSDs are updated to each major release of Ceph, the
require-osd-release version is set to that release so all the latest
functionality for osds can be enabled by Ceph. In Quincy there is
a warning if all osds are on Quincy and this flag is not set, so
this will resolve the health warning.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit 03b0546fec)
2022-04-15 14:46:59 +00:00
mergify[bot] 92358e374c Merge pull request #10055 from rook/mergify/bp/release-1.9/pr-9927
csi: add nfs nodeplugin & provisioner (backport #9927)
2022-04-14 14:42:20 +00:00
Madhu Rajanna 1d8aa05a23 subvolumegroup: add webhook for subvolumegroup
As we are not suppose to update the filesystem name
once the subvolumegroup is created.
added webhook validation for subvolumegroup update.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 74c4397973)
2022-04-13 17:06:45 +00:00
Madhu Rajanna c0697432fd namespace: add webhook for radosnamespace
As we are not suppose to update the pool name
once the rados namespace is created.
added webhook validation for radosnamespace
update.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 6aea438288)
2022-04-13 17:06:44 +00:00
Madhu Rajanna 106171a68e core: add code to update the webhook configurations
As we are adding new webhook configuration we
need to update the webhooks validations.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 024c034a95)
2022-04-13 17:06:44 +00:00
Travis Nielsen 20aa0dfa5c Merge pull request #10052 from rook/mergify/bp/release-1.9/pr-10003
core: support arbitrary node affinity inputs (backport #10003)
2022-04-13 08:43:29 -06:00