Commit Graph
5036 Commits
Author SHA1 Message Date
Sébastien Han 219e017564 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>
2022-06-03 11:00:10 +02:00
Sébastien Han 95b2e60679 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>
2022-06-03 10:59:31 +02:00
Travis Nielsen e3ca5bfbcc 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>
2022-06-01 10:20:57 -06:00
Travis Nielsen 636f2c4d8c Merge pull request #10346 from pkalever/metadata
csi: add --extra-create-metadata arg to csi sidecars
2022-05-31 07:59:07 -06:00
Travis Nielsen d6f71760fd Merge pull request #10208 from travisn/force-builtin-pool
pool: Built-in pools require flag to force creation
2022-05-27 16:39:28 -06:00
Prasanna Kumar Kalever 1666ce2d9c 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>
2022-05-27 16:30:53 +05:30
Travis Nielsen 34b237abb6 Merge pull request #10171 from fengjiankui121/cephpool
mds: pool changed to cephpool
2022-05-26 11:33:43 -06:00
Travis Nielsen dd3ea3e760 pool: built-in pools require flag to force creation
Ceph added a check recently that prevents creation of the
built-in pools that start with a dot, such as .nfs, .mgr,
and .rgw.root. These pools require a --yes-i-really-mean-it
flag to be passed to force the creation now.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-05-25 17:26:15 -06:00
Sébastien Han f79de7d69a 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>
2022-05-23 16:44:10 +02:00
Blaine Gardner 6888d545d2 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>
2022-05-18 15:09:02 -06:00
Travis Nielsen c75e834da0 Merge pull request #10246 from leseb/blk-mapper-message
osd: exit immediately if pvc block has not changed
2022-05-12 11:51:35 -06:00
Travis Nielsen 929bc9720f Merge pull request #10161 from BlaineEXE/identify-rook-clusters-via-mon-kv-field
operator: set 'rook-version' in mon k/v store
2022-05-12 10:48:48 -06:00
Blaine Gardner 94b622c302 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>
2022-05-12 09:31:13 -06:00
Travis Nielsen 28e721d877 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>
2022-05-11 14:29:25 -06:00
Sébastien Han 4234216db8 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>
2022-05-11 15:02:18 +02:00
Travis Nielsen c1ab415c40 Merge pull request #10226 from subhamkrai/update-validate-cluster
webhook: update the check-in cluster spec validation
2022-05-10 08:13:22 -06:00
subhamkrai 0c593d5420 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>
2022-05-10 09:32:44 +05:30
Satoru Takeuchi e66b35aa55 Merge pull request #10230 from leseb/fix-9470
core: append filesystem property on disk
2022-05-10 09:07:09 +09:00
Sébastien Han 8328ec6d31 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>
2022-05-09 15:26:50 +02:00
Sébastien Han 77b2e10c14 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>
2022-05-09 15:26:50 +02:00
Sébastien Han 8c1bf0f3f0 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>
2022-05-09 15:26:48 +02:00
Satoru Takeuchi 286e8248aa Merge pull request #10212 from cybozu-go/osd-fix-disk-uuid-management
osd: fix disk uuid management
2022-05-09 19:04:59 +09:00
Satoru Takeuchi 4c46dd1abd 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>
2022-05-09 18:25:09 +09:00
Travis Nielsen a3306a7911 core: add reef version info
Since Quincy is released, Ceph master builds will soon
be tagged with the reef v18 version. This adds the capability
for rook to check for the reef version of Ceph.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-05-06 07:35:08 -06:00
Travis Nielsen fe3c024e8d Merge pull request #10172 from fengjiankui121/mon_health_improve
mon: quorumStatus.MonMap.Mons changed to quorumStatus.Quorum
2022-05-04 09:26:04 -06:00
Sébastien Han 6ef491d9fc 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>
2022-05-03 16:47:59 +02:00
FengJiankui bfcce7d484 mds: pool changed to cephpool
The path resolved the problem that the variable pool is the same as the package name. (bug #9275)

Signed-off-by: FengJiankui <fengjiankui@inspur.com>
2022-04-29 11:15:09 +08:00
FengJiankui d335dc59eb 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>
2022-04-29 09:46:21 +08:00
Alexander Trost 3005a6fc68 Merge pull request #10137 from koor-tech/fix_9099
rgw: fix dashboard admin creation for multiple object stores
2022-04-27 16:13:38 +00:00
Alexander Trost 5d03061d47 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>
2022-04-27 14:57:17 +02:00
Sébastien Han ed3121defd Merge pull request #9925 from leseb/multus-plugin-restart-fix
core: fix csi-cephfsplugin pod restart on non-hostnetworking env
2022-04-27 11:41:59 +02:00
Travis Nielsen d5070dc418 Merge pull request #10125 from subhamkrai/update-go-ceph
build: update go-ceph version and remove ceph_preview
2022-04-26 16:05:49 -06:00
Sébastien Han 73b1347675 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>
2022-04-26 17:53:01 +02:00
Sébastien Han 583791c45c 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>
2022-04-26 11:05:02 +02:00
Travis Nielsen d26b6cf403 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>
2022-04-25 15:32:09 -06:00
Alexander Trost f381f0a94a Merge pull request #10147 from koor-tech/linter 2022-04-25 17:38:07 +02:00
Jiffin Tony Thottan 60da73a786 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>
2022-04-25 20:01:03 +05:30
Travis Nielsen 318205026d Merge pull request #10139 from travisn/optional-realm
core: RGW realm pull spec is optional
2022-04-25 07:49:43 -06:00
Alexander Trost 8686296e17 core: remove double imported packages
This removes double package imports. Example:
```
"github.com/rook/rook/pkg/apis/ceph.rook.io/v1"
cephv1 "github.com/rook/rook/pkg/apis/ceph.rook.io/v1"
```
Only one is now being used as shown in go-staticcheck ST1019

Signed-off-by: Alexander Trost <galexrt@googlemail.com>
2022-04-25 13:51:45 +02:00
Sébastien Han 1093b0a166 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>
2022-04-25 10:26:10 +02:00
Travis Nielsen ab4ae017d2 Merge pull request #10135 from Madhu-1/fix-mon-problem
csi: add/remove mon IP from csi config
2022-04-22 11:56:55 -06:00
Madhu Rajanna 8ab17e3b83 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>
2022-04-22 22:26:06 +05:30
Travis Nielsen 7f709776b5 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>
2022-04-22 08:08:12 -06:00
Madhu Rajanna c255e35225 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>
2022-04-22 15:14:50 +05:30
Travis Nielsen 622f3c09b8 Merge pull request #10023 from subhamkrai/update-cntrl-runtime
core: update controller-runtime version to v0.11.2
2022-04-20 11:52:46 -06:00
subhamkrai bf7daccf60 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>
2022-04-20 22:30:15 +05:30
Madhu Rajanna 541d63d31e 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>
2022-04-20 20:30:09 +05:30
Travis Nielsen 09c7b305c7 Merge pull request #10059 from Madhu-1/update-nfs-image-reg
csi: use k8s.gcr.io for csi nfsplugin image
2022-04-20 08:01:47 -06:00
Travis Nielsen 6cd1de4776 Merge pull request #9940 from Rakshith-R/csi/add-kms-support
csi: add CSI encryption support
2022-04-19 09:26:52 -06:00
Travis Nielsen 4d23911fd9 Merge pull request #10074 from Madhu-1/make-rpc-timeout-configurable
csi: make GRPC timeout configurable
2022-04-19 07:54:50 -06:00