Commit Graph
2565 Commits
Author SHA1 Message Date
Travis Nielsen 221b3dfb72 object: update pool properties during reconcile
The reconcile was skipping updating most pool properties for
object stores. The implementation of pools between the file,
object, and pool controllers had some duplicate code, so
this change also factors out the common code for better
reuse in a single place. Anytime a pool is created or updated,
it will now consistently update all the pool properties
that are expected to be modifiable.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-02-04 13:41:12 -07:00
Satoru Takeuchi 2d8f9b67c6 core: eliminate unnecessary code
We can eliminate the OSD creation code for Ceph < v15.2.0 because Nautilus(v14.2.z)
is no longer supported. In other words, we can now expect that all newly-created
OSDs on PVC are raw mode.

Please note that the existing lvm mode OSDs on PVCs still be supported after this change.

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2022-02-04 13:59:01 +00:00
Sébastien Han 49f75c8ec3 subvolumegroup: handle external mode
If the cluster is external, users might still want to take advantage of
the ceph-csi configmap configuration for ceph filesystem subvolume
group. This configuration is handled by the controller whenever a
cephFilesystemSubVolumeGroup CR is created or deleted.
If the present cluster CephCluster is external, the controller
(cephFilesystemSubVolumeGroup) won't handle creation nor deletion of sub volume groups.
It just assumes that the given name is correct and the controller goes ahead with the
ceph-csi configuration.

Closes: #9551
Signed-off-by: Sébastien Han <seb@redhat.com>
2022-02-03 16:28:07 +01:00
Travis Nielsen 096dabfa6c Merge pull request #9578 from micalgenus/fix/pacific-rgw-rolling
rgw: gateway deployment strategy RollingUpdate on Pacific
2022-01-28 08:12:06 -07:00
Sébastien Han 278ca803f9 Merge pull request #9663 from leseb/fix-9544
core: dereference pointer before trying to compare with deepequal
2022-01-28 11:20:29 +01:00
Sébastien Han 5404ec13a2 core: dereference pointer before trying to compare with deepequal
Prior to this, we were comparing a pointer (the memory address) with a
struct. This was obviously always failing and returned false. We must
dereference the pointer to access the data contained at that memory
location.

Closes: https://github.com/rook/rook/issues/9544
Signed-off-by: Sébastien Han <seb@redhat.com>
2022-01-27 17:41:42 +01:00
Madhu RajannaandMathieu Parent cf46615688 csi: bump csi snapshotter image to v5
updating the csi-snapshotter and dependencies
to v5.0.1 released version.

Co-authored-by: Mathieu Parent <mathieu.parent@insee.fr>
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2022-01-27 21:17:51 +05:30
Travis Nielsen d0ac3b484b Merge pull request #9651 from sathieu/patch-2
Bump csi resizer and volume replication images
2022-01-27 08:30:09 -07:00
Travis Nielsen f9ac966048 osd: merge all osd resources including custom
The merging of OSD resource limits and requests assumed
that only the cpu and memory resources needed to be merged.
It is also possible to set custom resource properties such
as intel.com/sriov_net_in: '1' for use with multus, so
the merging needs to be more general.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-01-26 10:46:54 -07:00
Mathieu Parent 88a449d09c csi: bump csi resizer and volume replication images
Upgraded images:

- k8s.gcr.io/sig-storage/csi-resizer: v1.3.0 -> v1.4.0
- quay.io/csiaddons/volumereplication-operator: v0.1.0 -> v0.3.0

Detailed changelogs:

- https://github.com/kubernetes-csi/external-resizer/blob/release-1.4/CHANGELOG/CHANGELOG-1.4.md
- https://github.com/csi-addons/volume-replication-operator/tree/v0.2.0
- https://github.com/csi-addons/volume-replication-operator/tree/v0.3.0

Signed-off-by: Mathieu Parent <mathieu.parent@insee.fr>
2022-01-26 17:38:53 +01:00
Sébastien Han 287d9a3fbe Merge pull request #9647 from rzarzynski/wip-extra-env-vars-2
osd: allow for injecting extra env. variables via ConfigMap
2022-01-26 17:27:19 +01:00
Radoslaw Zarzynski 17ca41f557 osd: allow for injecting extra env. variables via ConfigMap
This patch brings a mechanism to define arbitrary environment
variables in OSD containers (both prepare and main ones).
It bases on idea proposed by Sebastien Han to use an optional
`ConfigMap` instance named `aook-ceph-daemon-env-override`
as the source of these settings.

The need for the patch comes from the fact that, although
crimson finally exposes the same CLI interface as the classical
OSD, the broadly used development builds have ASan built in.
As ASan, by default, complains if it isn't the very first loaded
DSO, we need a way to set the `ASAN_OPTIONS` environment variable
to `verify_asan_link_order=0` to mitigate the early aborts.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
2022-01-26 15:17:27 +00:00
Travis Nielsen e0cfb4fce6 pool: check for application already being set
If the pool application is already set, skip setting it again
to avoid a warning message being logged that it is already
set.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-01-25 15:05:18 -07:00
Blaine Gardner 18c1397bcc Merge pull request #9565 from thotz/rgw-tls-cert-fix-bucket-notifications
rgw: inject tls certs for bucket notification and topic operations
2022-01-24 11:56:09 -07:00
Jiffin Tony Thottan a97747cece rgw: inject tls certs for bucket notification and topic operations
The certs for accessing TLS enabled RGW is saved as secrets and inject
them if controllers for notification and topics if request is sent to
TLS enabled RGW endpoint.

Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
2022-01-24 22:39:57 +05:30
Eng Zer Jun ed63571530 test: use T.TempDir to create temporary test directory
The directory created by `T.TempDir()` and is automatically removed when
the test and all its subtests complete.

Reference: https://pkg.go.dev/testing#T.TempDir
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2022-01-24 23:52:54 +08:00
Madhu Rajanna 39825f2302 csi: update cephcsi to 3.5.1 release
This PR updates the cephcsi version from
3.5.0 to 3.5.1 which includes minor fixes

fixes: #9619

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2022-01-21 23:26:07 +05:30
Travis Nielsen 4ad99d6533 Merge pull request #9603 from cybozu-go/fix-issue-9494
rgw: handle the non-existence of the bucket correctly when removing bucket
2022-01-21 09:55:44 -07:00
Travis Nielsen 6ff9e5330d Merge pull request #9626 from yati1998/cleanup
csi: updates the default csi-addons image
2022-01-21 07:17:04 -07:00
yati1998 07c5fc7e46 csi: updates the default csi-addons image
This commit updates the csi-addons image version
from v0.1.0 to v0.2.1.
Also, this updates the staging path from
{{ .KubeletDirPath }}/plugins/kubernetes.io/csi/pv/ to
{{ .KubeletDirPath }}/plugins/kubernetes.io/csi/.

This changes is done as the reclaimspace on block mode
was not working.
For more details:
 https://github.com/csi-addons/kubernetes-csi-addons/pull/97

Signed-off-by: yati1998 <ypadia@redhat.com>
2022-01-21 17:09:59 +05:30
Yuma Ogami c4ee218da1 rgw: handle the non-existence of the bucket correctly when removing bucket
ceph might return NoSuchKey than NoSuchBucket when the target bucket does not exist.
then we can use GetBucketInfo() to judge the existence of the bucket.

see: https://github.com/ceph/ceph/pull/44413

Closes: https://github.com/rook/rook/issues/9494
Signed-off-by: Yuma Ogami <yuma-ogami@cybozu.co.jp>
2022-01-21 09:29:17 +00:00
Sébastien Han 739abf6662 csi: change rook-ceph-csi-config to expose clusterID for subvolume
The rook-ceph-csi-config config map now includes CephFS subvolumegroups
when a subvolumegroup CR is created. It is useful for ceph-csi to
understand which subvolumegroup to use for a given cluster.

Signed-off-by: Sébastien Han <seb@redhat.com>
2022-01-21 10:12:56 +01:00
Sébastien Han 640d30339d subvolumegroup: fix code deletion
We want to log properly when ENOTEMPTY is caught during deletion, so
fixing the condition.

Signed-off-by: Sébastien Han <seb@redhat.com>
2022-01-20 18:16:41 +01:00
Sébastien Han 92ada52610 nfs: use hashing function from existing k8sutil package
We have a function to hash a string so let's use it.

Signed-off-by: Sébastien Han <seb@redhat.com>
2022-01-20 18:16:41 +01:00
micalgenus a68151e2f2 rgw: gateway deployment strategy rolling on Pacific
When the strategy type of deployment is Recreate, from the moment the end is
started until the new pod is normally running, there is no pod in the
kubernetes service endpoints, so it goes to the service unavailable state.

Therefore, it is necessary to change it to `type: RollingUpdate` instead of
`type: Recreate` so that rolling updates can be made without downtime.

Before Pacific, creating a deployment as much as the instance was okay,
but after Pacific, the replicas was increased in one deployment, so rolling
updates were set up one by one as in the previous version.

Signed-off-by: micalgenus <micalgenus@gmail.com>
2022-01-21 00:27:37 +09:00
Sébastien Han 1208bc1410 core: reconcile operator configuration with env var
Previously, we were ignoring configuration changes coming from the
operator's pod env variables. We were assuming most users were using the
operator configmap "rook-ceph-operator-config" but most Helm users
don't. Now we will reconcile if a cephcluster is found during a CREATE
event (can be an operator restart or a cephcluster creation) AND no
"rook-ceph-operator-config" is found which means the operator's pod env
var are used.
Also, unit tests have been added (long due) for the predicate!

Closes: #9602, #9487, #9579
Signed-off-by: Sébastien Han <seb@redhat.com>
2022-01-20 16:13:11 +01:00
Blaine Gardner d0d83edc5f Merge pull request #9502 from cybozu-go/core-support-priority-class-for-crashcollector
core: support priority class for crashcollector
2022-01-19 10:38:29 -07:00
Satoru Takeuchi 5465481e0b core: support priority class for crashcollector
Support priorityClass to crashcollectors as mons, mgrs, and osds.

https://rook.io/docs/rook/v1.8/ceph-cluster-crd.html#priority-class-names-configuration-settings

The main use case is applying the high priority to crashcollectors to preempt normal pods
under heavy load. Without this feature, we might lose crash information.

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

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2022-01-19 13:54:03 +00:00
subhamkrai 02d43e82e0 mon: add annotation to mon secret and cm
add annotations to secrets and configmaps to use
different tools to sync secrets and configmap.
Currently, these annotation is applied only on
the `rook-ceph-mon-endpoints` configmap and
the secrets `rook-ceph-mon` and `rook-ceph-admin-keyring`.

Closes: https://github.com/rook/rook/issues/8999
Signed-off-by: subhamkrai <srai@redhat.com>
2022-01-19 10:15:17 +05:30
yati1998 2b92dc812c csi: implement csi-addons sidecar
This commit implements the csi-addons sidecar.

Signed-off-by: yati1998 <ypadia@redhat.com>
2022-01-18 21:52:01 +05:30
Sébastien Han b2050b0f00 Merge pull request #9581 from humblec/release-3.5
Update ceph csi release 3.5 image and sidecars
2022-01-18 12:16:53 +01:00
Humble Chirammal b7584f3007 csi: update sidecar to the latest releases
Below sidecars are updated to the latest releases with this commit.

csi-provisioner      : 3.1.0
csi-attacher         : 3.4.0
node-driver-registrar: 2.4.0

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2022-01-17 23:32:48 +05:30
Humble Chirammal e8d9884f05 csi: update ceph csi images to release 3.5.0
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2022-01-17 23:32:45 +05:30
subhamkrai d87be97a50 osd: correct bluestore compression min blob size for ssd
Update bluestore compression min blob size for ssd to 8192.
It was typo which was added long time back.

Signed-off-by: subhamkrai <srai@redhat.com>
2022-01-17 15:13:15 +05:30
Travis Nielsen f3246228d8 Merge pull request #9467 from travisn/update-mgr-service
mgr: Update services when active mgr changes
2022-01-13 12:21:03 -07:00
Sébastien Han cf5f68f378 Merge pull request #9545 from rook/kms-hpcs
osd: add ibm key protect kms
2022-01-13 18:11:15 +01:00
Blaine Gardner 3b415ea15a Merge pull request #9482 from yuvalif/ceph-cloudevent-topic
rgw: add HTTP CloudEvent endpoints to CephBucketNotification CR
2022-01-13 08:40:07 -07:00
Sébastien Han a7acf490b6 osd: add ibm key protect kms
The cluster-wide encryption feature now has a new supported key
management system: IBM Key protect. More information about the backend
can be found in Rook documentation under the

Today's implementation stores OSD encryption keys has "Standard" keys.

Signed-off-by: Sébastien Han <seb@redhat.com>
2022-01-13 16:02:10 +01:00
Travis Nielsen 11127f54ca mgr: update services when active mgr changes
When the active mgr changes, there may be user-created services
that also need to have their selector updated to point to the
new active mgr. Now the operator will update any service in the
rook operator namespace that has the label app=rook-ceph-mgr
to point to the active mgr.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-01-13 07:25:24 -07:00
Yuval Lifshitz c99e2a37fd rgw: add HTTP CloudEvent endpoints to CephBucketNotification CR
this add a configuration parameter that allows an RGW, from
Ceph Quincy (v17) and on, to send bucket notifications to an HTTP CloudEvents
endpoint.
Header format:
https://github.com/cloudevents/spec/blob/main/cloudevents/adapters/aws-s3.md

Signed-off-by: Yuval Lifshitz <ylifshit@redhat.com>
2022-01-13 12:08:40 +02:00
Satoru Takeuchi af88b50fc7 rgw: fix startup probe
It's better to set the same handler to startupProbe as livenessProbe.
Otherwise, we might hit the following problem.

https://github.com/rook/rook/issues/6304

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2022-01-06 06:20:53 +00:00
Blaine Gardner 5b26cb1b22 Merge pull request #9400 from yuvalif/ceph-notification-events
rgw: add events to CephBucketNotification CR
2022-01-04 12:58:20 -07:00
Blaine Gardner 5b9ac16670 Merge pull request #9468 from BlaineEXE/startup-probes
core: rgw: allow specifying daemon startup probes
2022-01-04 11:03:12 -07:00
Sébastien Han dd67b866dc core: run discover daemonset as root uid
So that the tool inside the container has the permission to run
correctly, e.g: sgdisk.

Clsoes: https://github.com/rook/rook/issues/9493
Signed-off-by: Sébastien Han <seb@redhat.com>
2022-01-03 12:36:23 +01:00
Yuval Lifshitz 11727b1673 rgw: add events to CephBucketNotification CR
the events are used to mark the start/success/failure of the reconciliation
and also to log the bucket names on which the CephbucketNotification is
created

Signed-off-by: Yuval Lifshitz <ylifshit@redhat.com>
2021-12-26 16:58:49 +02:00
Blaine Gardner c07d89d9ea core: rgw: allow specifying daemon startup probes
Allow specifying daemon startup probes where we also allow configuring
liveness probes. Startup probes allow Rook to tolerate when Ceph daemons
occasionally take a long time to start up while not also making
Kubernetes liveness probes slower to detect runtime failures of daemons.

Startup probes are beta in Kubernetes 1.18, so we should not enable
probes by default for earlier Kubernetes versions.

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2021-12-21 15:12:41 -07:00
Blaine Gardner bb0d0d39f6 Merge pull request #9384 from leseb/fix-7036
subvolumegroup: add new crd
2021-12-21 10:24:23 -07:00
Blaine Gardner cb1b063e13 Merge pull request #9365 from thotz/bucketnotificationadditionimprovement
object: fix handling for notifications for OBC
2021-12-21 10:23:32 -07:00
Sébastien Han 6e9eb33782 subvolumegroup: add new crd
This introduces a new CRD to add the ability to create subvolumegroup
for a given ceph filesystem volume. Typically the name of the volume is
the name of the filesystem created by rook.

Closes: https://github.com/rook/rook/issues/7036
Signed-off-by: Sébastien Han <seb@redhat.com>
2021-12-21 16:28:38 +01:00
Sébastien Han 05775b068d osd: handle removal of encrypted osd deployment
This is handling a tricky scenario where the OSD deployment is manually
removed and the OSD never reconvers. This is unlikely to happen, but
still OSD should be able to run after that action. Essentially after a
manual deletion, we need to run the prepare job again to re-hydrate the
OSD information so that the OSD deployment can be deployed.
On encryption, it is a little bit tricky since ceph-volume list again
the main block won't return anything, so we need to target the encrypted
block to list.
There is another case this PR does not handle, which is the removal of
the OSD deployment and then the node is restarted. This means that the
encrypted container is not opened anymore. However, opening it requires
more work like writing the key on the filesystem (if not coming from the
Kubernete secret, eg,. KMS vault) and then run luksOpen. This is an
extreme corner case probably not worth worrying about for now.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-12-21 10:51:09 +01:00